Discussion
If a compiler is to be retargeted to a new machine, the part most likely to require rewriting is
Answer: C
Correct answer: the back end comprising code generation and machine dependent parts
The front end depends on the source language and the back end on the target machine, so changing the target leaves the front end untouched.
Instruction selection, register allocation, instruction scheduling and the machine-dependent optimisations all have to be rewritten. That separation is the whole argument for a common intermediate representation: front ends and back ends can be combined freely, so \( m \) languages and \( n \) machines need \( m+n \) components rather than \( m \times n \).
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development