lecture-7 Program Representations

lecture-7 Program Representations - Representing programs...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Representing programs • Goals Representing programs Primary goals – analysis is easy and effective just a few cases to handle directly link related things – transformations are easy to perform – general, across input languages and target machines Additional goals – compact in memory – easy to translate to and from – tracks info from source through to binary, for source-level debugging, profilling, typed binaries – extensible (new opts, targets, language features) – displayable Option 1: high-level syntax based IR • Represent source-level structures and expressions directly • Example: Abstract Syntax Tree Option 2: low-level IR Translate input programs into low-level primitive chunks, often close to the target machine Examples: assembly code, virtual machine code (e.g. stack machines), three-address code, register-transfer language (RTL) Standard RTL instrs: Option 2: low-level IR Comparison
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Comparison • Advantages of high-level rep
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

lecture-7 Program Representations - Representing programs...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online