Tuesday, August 01, 2006

Phi-related virtuals

Today I implemented a pass to find which virtuals are related by the phi-functions. Phi related virtuals represent the same variable in the original program. Many things can be accomplished with this information. For example, it is possible to map all these variables to the same stack slot, in order to minimize the stack size. For example, these are the phi related virtuals for this control flow. The code of the pass is here: .cpp, and .h.

Ah, if you ever have problems such as Pass existing, but not found, remember to include llvm/PassSuport.h in the source code of your pass.

0 Comments:

Post a Comment

<< Home