Questions: Code Generation from IR

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

During instruction selection, what core challenge does a compiler face when mapping IR to machine instructions?

ADetermining whether the program terminates
BMany IR instruction sequences can be covered by multiple machine instruction patterns with different execution costs
CConverting floating-point values to integer types
DRemoving unused variables from the symbol table
Question 2 True / False

Register allocation is expected to happen before instruction selection because the number of available physical registers constrains which machine instructions can be chosen.

TTrue
FFalse
Question 3 Short Answer

What is instruction scheduling, and why is it a distinct concern from instruction selection in modern processors?

Think about your answer, then reveal below.