[llvm-commits] [llvm] r85016 - /llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp

Dan Gohman gohman at apple.com
Fri Oct 30 15:43:34 PDT 2009


On Oct 30, 2009, at 7:27 AM, Sylvere Teissier wrote:

> Dan Gohman a écrit :
>> 
>> One problem I'm seeing is redundant PHIs. Sphereflake for example
>> now gets code like this:
>> 
>>   %p.013.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],  
>> [ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
>>   %p.012.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],  
>> [ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
>>   %p.011.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],  
>> [ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
>>   %p.010.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],  
>> [ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
>>   %p.09.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],  
>> [ %78, %bb9.i ] ; <%struct.node_t*> [#uses=7]
>> 
>> Indvars can't eliminate these because they aren't a function of the
>> canonical induction variable.   These PHIs stick around and end up
>> being allocated registers, which is suboptimal.
>> 
> 
> Any news about this problem ?
> Do I need to create a bug report ?

I just submitted r85626, which implements redundant PHI removal, which
takes care of this and some related problems.

Dan





More information about the llvm-commits mailing list