[llvm-commits] [llvm] r90759 - in /llvm/trunk: include/llvm/CodeGen/MachineSSAUpdater.h lib/CodeGen/MachineSSAUpdater.cpp lib/CodeGen/TailDuplication.cpp

Chris Lattner clattner at apple.com
Mon Dec 7 10:44:24 PST 2009


On Dec 7, 2009, at 10:08 AM, Evan Cheng wrote:

>>> +    if (I->second == OldReg)
>>> +      I->second = NewReg;
>>> +}
>>
>> This scan can be *really* expensive: O(size of function).  Would it  
>> be better to insert copies and then zap the copies at the end?
>
> I know it's expensive. But I have not identified a solution.  
> AvailableVals is the internal data structure tracking reaching  
> definition. I am not sure what you mean by inserting copies. This  
> function is called when it recognize the "cookie" phi instruction is  
> not needed.

The idea of the 'cookie' is that it is almost never needed, this means  
that you'll be rescanning all the time.

> Right now the pre-regalloc tail duplication pass is totally useless  
> anyway. It's severely pessmizing code. All the new PHI instructions  
> and copies are not being zapped.

Ok, I'm not worried about it until you get to the point where you want  
to turn it on, we can talk about solutions at that point.

-Chris



More information about the llvm-commits mailing list