[llvm-commits] [llvm] r89125 - in /llvm/trunk: lib/CodeGen/PHIElimination.cpp test/CodeGen/X86/2008-04-15-LiveVariableBug.ll test/CodeGen/X86/stack-color-with-reg.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Nov 17 11:39:52 PST 2009


On Nov 17, 2009, at 11:28 AM, Evan Cheng wrote:

> Hi Jakob,
> 
> I don't think this is the right way to do it. Checking RegisterRegAlloc::getDefault() seems pretty horrible.

Yes, it is pretty horrible.

> If I understand correctly, PHI elim should not require LiveVariables. It does this:
> LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>();

Will that work if LiveVariables is scheduled to run after PHIElimination? Can we control their order?

> So if LV is not available, i.e. not required by the register allocator, it should not perform splitting. That should work, right?

It is certainly possible to do it that way. I suppose that calling AU.setPreservesCFG() is less important?

/jakob





More information about the llvm-commits mailing list