Module 13: INTRODUCTION TO COMPILERS FOR HIGH PERFORMANCE COMPUTERS
  Lecture 26: SIMD Architecture
 


Basic Blocks

Useful for collecting information for optimization
Basic Block : Sequence of consecutive statements where flow of control enters at the beginning and leaves at the end. No branching permitted at an intermediate statement.

Partition Into Basic Blocks

Input : A sequence of three address statements
Output : A list of basic blocks

  1. Mark leaders
    1. First statement is a leader
    2. Any statement which is target of a goto is a leader
    3. Any statement that follows a goto statement is leader
  2. For each leader all the statement following it up to the next leader or the end of the program make a basic block.