| Related articles |
|---|
| About register allocation - rewrite program baikaishiuc@gmail.com (xianwei) (2008-11-27) |
| From: | xianwei <baikaishiuc@gmail.com> |
| Newsgroups: | comp.compilers |
| Date: | Thu, 27 Nov 2008 18:15:07 -0800 (PST) |
| Organization: | Compilers Central |
| Keywords: | registers |
| Posted-Date: | 28 Nov 2008 12:21:59 EST |
In book <Modern compiler implementation in C> written by Anderw
W.Appel,
The chapter of Register Allocation taught me if the program have
actual spill, you must rewrite program,
Allocate memory space for every V included by spilledNode,
every V's def and use must create a new temp Vi. In program (instruct
sequence)
after Def(Vi) insert a STORE instruct, Before Use(Vi) insert a LOAD
instruct.
My problem: how to speeded the find all Def(V) and Use (V)?
In my program every V in spilledNode lead a O(n) (n is the number of
instruct) search.
My english is poor, I try my best express in clearly.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.