[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

Evan Cheng evan.cheng at apple.com
Tue Nov 17 11:47:40 PST 2009


On Nov 17, 2009, at 11:39 AM, Jakob Stoklund Olesen wrote:

> 
> 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?

No. LiveVariables is an analysis pass. Later passes may require it. But that's ok, right? If it's run later, LV should do the right thing. But key point is if whatever is requiring phi elimination does not require LV, phi elimination should not bother with anything that needs LV info.

> 
>> 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?

I am not sure. Please take a look at -debug-pass=Executions. Does phi elim splitting causes more passes to be run?

Evan

> 
> /jakob
> 





More information about the llvm-commits mailing list