20.04.2013 Views

Spring 2011 CSCI 565 - Compiler Design

Spring 2011 CSCI 565 - Compiler Design

Spring 2011 CSCI 565 - Compiler Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Pedro Diniz<br />

pedro@isi.edu<br />

<strong>CSCI</strong> <strong>565</strong> - <strong>Compiler</strong> <strong>Design</strong><br />

Array References<br />

What about Variable-Sized Arrays?<br />

Local arrays dimensioned by actual parameters<br />

• Same set of problems as parameter arrays<br />

• Requires dope vectors (or equivalent)<br />

– dope vector at fixed offset in activation record<br />

⇒ Different access costs for textually similar references<br />

This presents a lot of opportunity for a good optimizer<br />

• Common sub-expressions in the address polynomial<br />

• Contents of dope vector are fixed during each activation<br />

• Should be able to recover much of the lost ground<br />

⇒ Handle them like parameter arrays<br />

<strong>Spring</strong> <strong>2011</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!