Version 1 (modified by eamiri, 9 years ago) (diff)


Passes of the Compiler

  1. Parsing Python parser is used to parse the input. The output is an abstract syntax tree.
  1. Extracting List of Live Variables The list of live variables is extracted. The list will be used in dead code elimination.
  1. Inlining Functions calls are inlined. The functionality of this pass is restricted for now. This pass has a couple of internal phases in particular it handles all import statements.
  1. Translation The abstract syntax tree is translated to an abstract syntax tree based on bitExpr classes.
  1. SymTable? Construction Symbol table is constructed.
  1. Conversion to SSA The code is converted to SSA. The SSA form used in the compiler is tailored to needs of the compiler.
  1. Creating Basic Blocks Based on occurrences of optimize pragma, new conditional statements are introduced which results in creation of new basic blocks of code.
  1. Applying Pragmas All optimize pragmas are applied, this means that in proper places of the code, occurrences of optimized variables are replaced by the constant value indicated by optimize pragma. No further simplification is performed.