Lably
Skip to content

Dependence analysis

  • 2 min read
  • 3 chapters

Related on Lably

Through Compiler

Dependence analysis determines whether it is safe to reorder or parallelize statements.

Control dependencies

Control dependency is a situation in which a program instruction executes if the previous instruction evaluates in a way that allows its execution.

A statement S2 is control dependent on S1 (written S1δcS2) if and only if S2's execution is conditionally guarded by S1. S2 is control dependent on S1 if and only if S1∈PDF(S2) where PDF(S) is the post dominance frontier of statement S. The following is an example of such a control dependence:

S1 if x > 2 goto L1 S2 y := 3 S3 L1: z := y + 1

Here, S2 only runs if the predicate in S1 is false.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication