chapter3-m2-ziavras

So that i is executed in correct program order only

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: instr., i, with respect to a branch instr. so that i is executed in correct program order only when it should be program order & only when it should be EXAMPLE : 2 Control Dependences if p1 { S1; }; if p2 { S2; }; • S1 is control dependent on p1 • S2 on p2 S. Ziavras Control Dependences (2) 2 constraints imposed by control dependences 1. An instr. that is control dependent on a branch cannot be moved before the branch so that its execution is no longer controlled by the branch 2. An instr. that is not control dependent on a branch instr that is not control dependent branch cannot be moved after the branch so that its execution is controlled by the branch S. Ziavras Control Dependences (3) • We may be willing to execute instrs. that should not have been executed (thereby violating the control dependences) if we can do so without affecting the program’s correctness correctness – Control dependence is not the critical property that must be preserved property that must be preserved – 2 properties are critical to program cor...
View Full Document

This document was uploaded on 02/09/2014.

Ask a homework question - tutors are online