While running analyze next statement dan grossman dan

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: chael Ringenburg) A-27 Back End Structure CSE341: Programming CSE341: Programming Languages Languages •  Typically split into two major parts Lecture 1 Lecture 1 –  “Op7miza7on” – code improvements, e.g., Course Mechanics Course Mechanics •  Common subexpression elimina7on: ML Variable Bindings ML (x+y) Variable!Bindings x + y; t * t! * (x+y) t= Dan Grossman Dan Grossman 3 * x! •  Constant folding: (1+2) * all! F x 2011 Fall 2011 •  Op7miza7on phases oven interleaved with analysis phases to beker understand program meaning/know what transforma7ons preserve that meaning –  Target Code Genera7on (machine specific) •  Instruc7on selec7on & scheduling, register alloca7on Winter 2013 UW CSE 401 (Michael Ringenburg) A-28 The Result •  Input •  Output if (x >= y)! y = 42;! •  AST mov cmp jl mov L17:! Parser ifStmt >= ID(x) Winter 2013 eax,[ebp+16]! eax,[ebp-8]! L17! [ebp-8],42! Back End assign ID(y) ID(y) INT(42) UW CSE 401 (Michael Ringen...
View Full Document

Ask a homework question - tutors are online