[LLVMdev] InlineSpiller Questions

dag at cray.com dag at cray.com
Wed Sep 19 10:13:08 PDT 2012

The InlineSpiller in 3.1 is quite different from the old spiller so I am
trying to slog through the code and learn a bit.

On a spill, the spiller calls traceSiblingValue.  I gather that this is
supposed to find the "original" def point of a value, checking back
through copies, phis, etc.  At the end we have an interval being spilled
and the original def instruction of the value.

For example:

r1 = load
r2 = r1
r3 = r2
   use r3

If we decide to spill r3, we call traceSiblingValue to find the original
def (the load).  After traceSiblingValue we have the load instruction to
define r1 and the value number information for r3.  We don't have the
value information from r2 as far as I can tell.

Is that correct?  Does that information exist anywhere or is it lost
after traceSiblingValue terminates?

What does propagateSiblingValue have to do with all of this?  The
comment is not very helpful:

/// propagateSiblingValue - Propagate the value in SVI to dependents if it is
/// known.  Otherwise remember the dependency for later.

Thanks for your help!


More information about the llvm-dev mailing list