Optimization and Data Flow questions

Q48

GATE CS 2013 CSOptimization and Data FlowMCQ2 marks−2/3 if wrong
Suppose the instruction set architecture of the processor has only two registers. The only allowed compiler optimization is code motion, which moves statements from one place to another while preserving correctness. What is the minimum number of spills to memory in the compiled code?
Show answer without attempting

Answer: B

Q49

GATE CS 2013 CSOptimization and Data FlowMCQ2 marks−2/3 if wrong
What is the minimum number of registers needed in the instruction set architecture of the processor to compile this code segment without any spill to memory? Do not apply any optimization other than optimizing register allocation.
Show answer without attempting

Answer: B

0/20 correct0 marks

Related topics in Compiler Design