✍️ Get Writing Help
WhatsApp

Uncategorized

Code generator

1.       How are local variables resolved to memory addresses during the translation of intermediate code to target code by the code generator? Draw the stack layout showing the local variables. 2.       How are numeric and string literals in the intermediate code translated to the target code? Illustrate with an example each.

Code generator Read More »

Comparison operators

1.       How do you generate target code for indexed TAC operators in a template-based code generation approach? Illustrate with examples for   (a) L_INDEX_ASSIGN   (b) R_INDEX_ASSIGN. 2.       How do you generate target code for comparison TAC operators in a template-based code generation approach? Illustrate with examples for any three comparison operators. 3.       How do you generate

Comparison operators Read More »

Mechanism

1.       The ‘display’ scheme helps in resolving non-local variable access in the case of nested procedures in PASCAL. 2.       In ‘call by value-result’ parameter-passing mechanism used in languages like ADA, the final value of the formal parameters is copied back to the actual parameters. 3.       The literals are accessed using the label with a dollar($)

Mechanism Read More »

The storage location

1.       The term l-value refers to the storage location of an expression and r-value refers to the value of the expression. 2.       In call-by-reference method, the changes made to the formal parameters are reflected in the actual parameters at the caller site. 3.       The template-based approach for code generation produces sub-optimal code in terms of

The storage location Read More »

Target code generator

1.       Describe an algorithm for computing next use and liveness properties at each quad level in a basic block. 2.       Describe the data structures and the algorithm for a simple target code generator that retains the values of variables in registers for as long as possible. 3.       What is peep-hole optimisation? Give five examples of

Target code generator Read More »

The pre-header

1.       What are the steps in performing loop invariant code motion optimisation using the ud-chain information? 2.       What are the conditions to be satisfi ed in order to move a TAC statement from within the loop to the pre-header? 3.       What are the common steps taken by target code generators for producing efficient code? 4.      

The pre-header Read More »

Global dead code

1.       The ‘liveness’ data fl ow property helps in performing global dead code elimination and also in making decisions for retaining a variable’s value in a register. 2.       The iterative approach to solving data flow equations is used for resolving the cyclic dependency between the properties of flow graph nodes in the cases of input

Global dead code Read More »

Topologically sorted order

1.       The order in which DAG nodes are created from the intermediate code during the DAG construction process is in topologically sorted order. 2.       The leaf nodes in a DAG cannot have any attached identifiers to it. 3.       The input variables to a block manifest as leaves in the DAG during the DAG construction process

Topologically sorted order Read More »

Reduction transformations

1.       The strength reduction transformations identify and replace costly operations by less expensive counterparts. 2.       The DAG is a data structure used for implementing optimising transformations on the intermediate code across basic blocks. 3.       The loop optimisations in the intermediate code are performed during the local optimisation phase.

Reduction transformations Read More »

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102