GATE Computer ScienceVery hardGATE CS
For the flow graph with entry 1 and edges 1→2, 2→3, 3→4, 4→5, 5→3, 4→6, 6→7, 7→2, 7→8, 8→9, 9→8, 9→10, 6→10, 3→9, which is the dominance frontier of node 4?
- A. {3, 8, 10}
- B. {2, 3, 8, 10}
- C. {2, 3, 10}
- D. {2, 3, 8, 9, 10}
Correct answer: B. {2, 3, 8, 10}
Node 4 dominates 4, 5, 6 and 7. The frontier is the set of nodes with a predecessor dominated by 4 that 4 does not strictly dominate: 3 (from 5), 2 (from 7), 8 (from 7) and 10 (from 6). Node 9 is not included: its predecessors 8 and 3 are not dominated by 4.
More Compiler Design questions
- An expression is very busy at a point if, along every path from that point, it is evaluated before any of its operands is redefined…
- A heap holds objects A to J. Roots point to A and E. Pointers: A→B, B→C, B→D, C→B, D→F, E→F, E→I, G→H, H→G, H→J. The root pointer to A is…
- The live ranges (inclusive of both end points, in instruction numbers) of ten variables are [1,8], [2,5], [3,9], [4,6], [7,12], [10,14]…
- Linear-scan register allocation processes the same ten live ranges [1,8], [2,5], [3,9], [4,6], [7,12], [10,14], [11,13], [6,10], [9,15]…
- A syntax-directed translation scheme prints as it reduces: E → T + E { print('+') } | T; T → F T { print('') } | F; F → id {…
- A lexical rule recognises the language (ab | abc | c)(bc | a) over {a, b, c}. How many states does the minimal complete DFA (dead state…