Compilers Quiz 14

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Replacing the ready list in list scheduling with a priority queue reduces the runtime cost of maintaining the data structure from O(n2) to

O(n log n)

a) loadAI [BP-4] => r7 b) multI r7, 2 => r8 c) loadI 0x18 => r6 d) loadAO [BP+r6] => r9 e) add r8, r9 => r10 Which of the following is the fastest valid schedule for these instructions, as determined by the list scheduling algorithm using a prioritization scheme of tree heights and latency weights (as we discussed in class)? (A "-" indicates an idle cycle.) You may assume that all loads and stores take 3 cycles, all multiplications take 2 cycles, and all other instructions take 1 cycle. a. c,a,-,d,b,-,e b. a,-,-,b,-,c,-,-,d,-,-,e c. c,a,d,b,e d. a,b,c,d,e e. a,-,-,b,c,-,-,d,-,-,e

a

The dependence graph for a basic block is

a forest of acyclic digraphs

List scheduling is best described as

a greedy, heuristic algorithm

In the context of instruction scheduling, a stall is a delay caused by the latency of

a required definition

a) loadAI [BP-4] => r7 b) multI r7, 2 => r8 c) loadI 0x18 => r6 d) loadAO [BP+r6] => r9 e) add r8, r9 => r10 Which of the following are true regarding direct data dependencies in the above instructions? (Multiple answers may be correct.) a. e depends on d b. b depends on a c. c depends on d d. a depends on b e. b depends on e f. e depends on b g. e depends on a

a, b, f

If a dependence graph for a basic block has two nodes A and B, and there is an edge from A to B, which property is true? a. There is no restriction on the ordering of A and B b. A must always be scheduled before B c. A must be scheduled before B if and only if any variables written in A are live at the end of the block d. A must be scheduled before B if and only if any variables written in A are NOT live at the end of the block e. B must always be scheduled before B

b

One approach for modeling instruction delay that incorporates contextual information about instruction-level parallelism is called

balanced scheduling

Which of the following is an example of an antidependency? a. a = b; c = d; b. a = b; a = b; c. a = b; b = c; d. a = b; a = c; e. a = b; c = a;

c

Which of the following is NOT true regarding interactions between instruction scheduling and register allocation? a. Renaming during scheduling introduces a need for register allocation. b. Register allocation can introduce antidependencies that constrain scheduling. c. Register allocation can introduce spill operations that constrain scheduling. d. Scheduling always increases the number of registers necessary for register allocation. e. Scheduling can change the lifetime of values, affecting register allocation for those values.

d

Which of the following tie-breaking scheduling mechanisms has proven to be most effective in practice? a. a node's latency b. a node's rank c. a node's total descendant count d. none of them e. a node's depth in the graph

d

A superscalar processor can

execute multiple instructions concurrenly

A loop-carried dependence is a dependence that

exists between iterations of a loop

Trace scheduling (one approach for regional code scheduling) requires additional out-of-band knowledge in the form of

profiling information

Instruction scheduling optimizes a program by

reordering instructions

The kernel of a loop is

the core repeated instructions

The critical path through a dependence graph is the path with

the highest latency

Backward list scheduling is different from forward list scheduling in that it

works over the dependence graph in the opposite direction


Kaugnay na mga set ng pag-aaral

ASSESSMENT OF IMMUNE FUNCTION Chapter 35 1010 Exam 7

View Set

World issues quiz: Urban Issues and WMDs

View Set

Chapter 39- Alterations in Renal and Urologic Function - Practice Questions

View Set

Entrepreneurship Exam 1: Small Business Entry - Paths to Full Time Entrepreneurship

View Set