Many compilers use all three at dierent phases winter

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: ; b) {! Dan Grossman Dan Grossman print(“increase”);! Fall 2011 Fall ++;! a 2011 LCD LCD }! print(“done”);! LCD: Loop-Carried Dependence Winter 2013 UW CSE 401 (Michael Ringenburg) 32 Linear IRs •  •  •  CSE341: Programming Languages CSE341: Programming Pseudo- code for some Languages achine abstract m Lecture 1 Lecture 1 Level of abstrac@on varies Mechanics Course Course Mechanics Simple, Mompact data structures c L Variable Bindings Bindings ML Variable –  Commonly used: arrays, linked structures Dan Grossman Dan Grossman •  Examples: 3- address code, stack machine code Fall 2011 Fall 2011 •  Fairly compact •  Compiler can control reuse of names – clever choice can reveal optimizions. •  ILOC code Winter 2013 T1 T2 T3 T4 T5 ß། ß། ß། ß། ß། 2 b T1 * T2 a T4 – T3 •  Each instruction: pop operands, push result. •  Very compact •  Easy to create interpreter. •  Java bytecode UW CSE 401 (Michael Ringenburg) push 2 push b multiply push a subtract 33 Abstrac@on Levels in Linear IR CSE341: Programming CSE341: Programming Languages Languages •  Linear IRs can also be close to the source Lecture 1 Lecture 1 language, very low- level, or somewhere in Course Mechanics C between. ourse Mechanics ML Variable Bindings ML Variable Bindings •  E.g., Linear IRs for C array rGrossman a[i][j+2] eference Dan Dan Grossman Fall 2011 Fall 2011 –  High- level: t1 ← a[i,j+2] Winter 2013 UW CSE 401 (Michael Ringenburg) 34 IRs for a[i,j+2], cont. CSE341: Programming Languages CSE341: Programming Languages •  Medium- level •  Low- level Lecture 1 Lecturefp- 4] t1 ← j...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online