where ‘op’ is one of ‘+’, ‘*’ and ‘ ’ (exponentiation) can be evaluated on a CPU with single register without storing the value of (a * b) if
The program below uses six temporary variables a,b,c,d,e,f.
Assuming that all operations take their operands from registers, what is the minimum number of registers needed to execute this program without spilling?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
Consider evaluating the following expression tree on a machine with load-store architecture in which memory can be accessed only through load and store instructions. The variables a,b,c,d and e are initially stored in memory. The binary operators used in this expression tree can be evaluated by the machine only when operands are in registers. The instructions produce result only in a register. If no intermediate results can be stored in memory, what is the minimum number of registers needed to evaluate this expression?
Consider the expression Let X be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture, in which (i) only load and store instructions can have memory operands a n d (ii) arithmetic instructions can have only register or immediate operands. The value of X is _____________ .
In programming languages like C, C++, Python . . . the memory used by a program is typically separated into two parts, the stack and the heap.
Consider the following statements:
1. A stack is efficient for managing nested function calls.
2. Stack space is limited while heap space is not.
3. The stack cannot be used for persistent data structures.
A part of the system software which under all circumstances must reside in the main memory is:
A linker is given object modules for a set of programs that were compiled separately. What information need to be included in an object module?
A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which one of the following is true?
In a resident – OS computer, which of the following systems must reside in the main memory under all situations?
Faster access to non-local variables is achieved using an array of pointers to activation records called a
A linker reads four modules whose lengths are 200,800,600,and 500 words, respectively. If they are loaded in that order, what are the relocation constants?
The process of assigning load addresses to the various parts of the program and adjusting the code and the data in the program to reflect the assigned addresses is called
Which one of the following is NOT performed during compilation?
Consider the following intermediate program in three address code
p = a - b
q = p * c
p = u * v
q = p + q
Which one of the following corresponds to a static single assignment form of the above code?
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar
What is the translation of xxxxyzz using the syntax directed translation scheme described by the above rules?
In a bottom-up evaluation of a syntax directed definition, inherited attributes can
Which one of the following is TRUE at any valid state in shift-reduce parsing?
Consider the grammar rule E → E1 – E2 for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have any common sub expression, in order to get the shortest possible code
Consider the following code segment.
x = u - t;
y = x * v;
x = y + w;
y = t - z;
y = x * y;
The minimum number of total variables required to convert the above code segment to static single assignment form is __________.
55 docs|215 tests
|
55 docs|215 tests
|