正在加载图片...
A Simple Code Generator One of the primary issues:deciding how to use registers to best advantage ·Four principal uses: In most machine architectures,some or all of the operands of an operation must be in registers in order to perform the operation. Registers make good temporaries to hold the result of a sub expression or a variable that is used only within a single basic block. - Registers are used to hold (global)values that are computed in one basic block and used in other blocks. Registers are often used to help with run-time storage management. CS308 Compiler Theory 2A Simple Code Generator • One of the primary issues: deciding how to use registers to best a dvantage • Four principal uses: – I hi hi ll f h d f i b i In most machine architectures, some or all o f t he operan ds o f an operation must be in registers in order to perform the operation. – Registers make good temporaries to hold the result of a sub expression or a variable that is used only within a single basic block. – Registers are used to hold (global) values that are computed in one basic block and used in other blocks. – Registers are often used to help with run-time storage management. CS308 Compiler Theory 2
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有