lecture-5 Rhodium

lecture-5 Rhodium - Compilers have many bugs Automatically...

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

View Full Document Right Arrow Icon
1 Automatically Checking the Correctness of Program Analyses and Transformations Compilers have many bugs [Bug middle-end/19650] New: miscompilation of correct code [Bug c++/19731] arguments incorrectly named in static member specialization [Bug rtl-optimization/13300] Variable incorrectly identified as a biv [Bug rtl-optimization/16052] strength reduction produces wrong code [Bug tree-optimization/19633] local address incorrectly thought to escape [Bug target/19683] New: MIPS wrong-code for 64-bit multiply [Bug c++/19605] Wrong member offset in inherited classes Bug java/19295] [4.0 regression] Incorrect bytecode produced for bitwise AND Searched for “incorrect” and “wrong” in the gcc- bugs mailing list. Some of the results: Total of 545 matches… And this is only for Janary 2005! On a mature compiler! Compiler bugs cause problems if (…) { x := …; } else { y := …; } …; Exec Compiler They lead to buggy executables They rule out having strong guarantees about executables The focus: compiler optimizations • A key part of any optimizing compiler Original program Optimization Optimized program The focus: compiler optimizations • A key part of any optimizing compiler • Hard to get optimizations right – Lots of infrastructure-dependent details – There are many corner cases in each optimization – There are many optimizations and they interact in unexpected ways – It is hard to test all these corner cases and all these interactions Goals • Make it easier to write compiler optimizations – student in an undergrad compiler course should be able to write optimizations • Provide strong guarantees about the correctness of optimizations – automatically (no user intervention at all) – statically (before the opts are even run once) • Expressive enough for realistic optimizations
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 The Rhodium work • A domain-specific language for writing optimizations: Rhodium • A correctness checker for Rhodium optimizations • An execution engine for Rhodium optimizations • Implemented and checked the correctness of a variety of realistic optimizations Broader implications • Many other kinds of program manipulators: code refactoring tools, static checkers – My work is about program analyses and transformations, the core of any program manipulator • Enables safe extensible program manipulators – Allow end programmers to easily and safely extend program manipulators – Improve programmer productivity Outline • Introduction • Overview of the Rhodium system • Writing Rhodium optimizations • Checking Rhodium optimizations • Evaluation Rhodium system overview Checker Written by programmer Written by me Rhodium Execution engine Rdm Opt Rdm Opt Rdm Opt Rhodium system overview Checker Written by programmer Written by me Rhodium Execution engine Rdm Opt Rdm Opt Rdm Opt Rhodium system overview Rdm Opt Rdm Opt Rdm Opt Checker Checker Checker
Background image of page 2
3 Checker Checker Checker
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2008 for the course CSE 231 taught by Professor Lerner during the Fall '06 term at UCSD.

Page1 / 12

lecture-5 Rhodium - Compilers have many bugs Automatically...

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

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