Self Studies

Compiler Design...

TIME LEFT -
  • Question 1
    1 / -0

    Which of the following statement about peephole optimization is not correct?

  • Question 2
    1 / -0

    Consider the following C-code.  

    int i = 0;
    while( i < 1000)
    {
                printf(“%d”, i);
                i++;
    }
    Which of the following optimization technique can be applied?

  • Question 3
    1 / -0

    Which of the following statement about live variable analysis is correct?

  • Question 4
    1 / -0

    Consider the code segment
    int FUN()
    {
    int i, j, x, y, m, n;
    n=20;
    for (i = 0; i < n; i++)
    {
    for (j = 0; j < n; j++)
    {
    if (i % 2)
    {
    x += ((4*j) + 5*i);
    y += (7 + 4*j);
    }
    }
    }
    return x+y;
    }

    Which one of the following is/are true?

  • Question 5
    1 / -0

    Consider the following set of statements:

    S1: A DAG representation of a basic block is a directed a cyclic graph in which the nodes of the DAG represent the statements within the block and each child of a node corresponds to the statement that is the last definition of an operand used in the statement.

    S2: A basic block is a maximal sequence of consecutive three-address statements in which flow of control can only enter at the first statement of the block and leave at the last statement without halting or branching except possibly at the last statement in the basic block. 

    S3: Register assignment is the process of deciding which IR values to keep in registers. 

    Which of the above statements is/are true?

  • Question 6
    1 / -0

    Which of the following statement is/are related with the code motion?

  • Question 7
    1 / -0

    What is the result of following intermediate code after eliminating local common subexpression?

    Given code :

    t6 =  4 * i

    x = a[t6]

    t7 = 4 * i

    t8 = 4 * j

    t9 = a[t8]

    a[t7] = t9

    t10 = 4 * j

    a[t10] = x

    go to L

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 7

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
Submit Test
Selfstudy
Selfstudy
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now