Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transparent Program Specialization AJ Shankar OSQ Retreat, Spring 2003.

Similar presentations


Presentation on theme: "Transparent Program Specialization AJ Shankar OSQ Retreat, Spring 2003."— Presentation transcript:

1 Transparent Program Specialization AJ Shankar OSQ Retreat, Spring 2003

2 Optimizing a Raytracer Take advantage of the fact that we’re looking at the same data many times if (x < this.faces[0].verts[0].x || x >= this.faces[3].verts[0].x) if (x = 9.8) Identify invariant data and specialize code

3 Static vs. Dynamic Approaches Dynamic specialization (Randomized) profiling No pointer analysis Optimizes areas programmer didn’t or couldn’t anticipate Can exploit specific memory invariance But can be wrong… Static specialization Very conservative Or lots of annotations Dynamic Invariant Static

4 But (there had to be a catch) How do we know when we are too aggressive – what if the profiler was wrong? This can be an advantage: we can do better temporal specialization But we still need to detect when “invariant” memory is being overwritten so that we can invalidate dependent specializations

5 Options for invalidation I’d like to investigate invalidation methods Insert explicit checks at all possible invalidation areas Introduces overhead in non-specialized bits of code Hardware/OS level granular memory guards Not available yet, but promising Check invariance before running specialized code Only beneficial if areas to be checked are small More…?


Download ppt "Transparent Program Specialization AJ Shankar OSQ Retreat, Spring 2003."

Similar presentations


Ads by Google