1 / 9

Fast Copy Coalescing and Live-Range Identification

Fast Copy Coalescing and Live-Range Identification. by Ken Kennedy Zoran Budimlic Keith D. Cooper Timothy J. Harvey Timothy S. Oberg Steven W. Reeves Dept. of Computer Science, Rice University. The paper does the following things:.

chrisreyes
Download Presentation

Fast Copy Coalescing and Live-Range Identification

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fast Copy Coalescing and Live-Range Identification by Ken Kennedy Zoran Budimlic Keith D. Cooper Timothy J. Harvey Timothy S. Oberg Steven W. Reeves Dept. of Computer Science, Rice University

  2. The paper does the following things: • Find the interference relationship in a program efficiently without using an interference graph. • Minimize the copy insertions needed for phi node instantiations. • Perform copy folding efficiently. • Compare the usage of memory needed for compiling. • Compare the optimizing time.

  3. Which choice is it anway ... • Copy folding with SSA can eliminate all copies in a program. However copies are needed to instantiate phi functions. • How about coalescing SSA names using an interference graph?This normally requires a data structure that is quadratic in the number of names and might not be good for JIT compilation. The paper suggests an algorithm that achieves the greens and reduces the effects of the reds as much as possible.

  4. Previous Work (Chaitin/Briggs) It takes a pessimistic approach. This approach assumes that all copies are necessary and then creates an interference graph to fold certain copies. This Paper It takes a more optimistic approach. It assumes that no copies are needed unless proven elsewise by the interference relationship.

  5. Basic idea behind the algorithm: • Find the union of the phi node parameters and the names of the nodes themselves. • Search for interferences between the members and if found split the set and insert appropriate copies. • Give unique names to the various steps formed. • Rewrite the modified code.

  6. Interesting Features of the Algorithm: • Tries to detect interference early instead of letting it propogate. • Uses a fast set of tests (not exhaustive) to detect possible interference. • Uses the concept of a dominance forest to detect interference (really neat !). • Has an interesting re-naming policy where a global view is taken instead of a local view.

  7. Does it work? • On an average executes 1% less copies. • Does a better job in terms of both memory and time in building the interference graph. • Compiling time and memory usage is more for this algorithm when it tries to do the copy-coalesce (due to the additional analysis).

  8. My humble views: • Really neat idea of finding an approximate interference relation in a fast way. • However, though the interference information is gathered fast, the copy coalesceing takes more time and memory and might not be a good thing to use for JIT compilers. I somehow feel that the two ideas are different and should not be combined. • The paper suggests using the same ideas for register allocation. Might be a nice thing for JIT compilers.

  9. Your valuable views on: • 1% less copies vs 20-40% more memory usage – does it make sense? • Does anybody see any problems in using this idea for register allocation? • Shouldn't the authors give performance of programmes after the algorithm?

More Related