[llvm-commits] [llvm] r111224 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Aug 17 11:42:16 PDT 2010


On Aug 17, 2010, at 10:30 AM, Evan Cheng wrote:

> 
> On Aug 17, 2010, at 9:00 AM, Dan Gohman wrote:
> 
>> 
>> On Aug 16, 2010, at 6:34 PM, Evan Cheng wrote:
>> 
>>> Author: evancheng
>>> Date: Mon Aug 16 20:34:49 2010
>>> New Revision: 111224
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=111224&view=rev
>>> Log:
>>> Add an option to disable codegen prepare critical edge splitting. In theory, PHI elimination is already doing all (most?) of the splitting needed. But machine-licm and machine-sink seem to miss some important optimizations when splitting is disabled.
>> 
>> MachineLICM, at least, has code to split critical edges on demand. Is
>> it missing cases?
>> 
>> Also, CGP's SplitEdgeNicely has some logic for "nicely" reusing existing
>> blocks to avoid creating new blocks, which PHI elimination's splitting
>> doesn't have.
> 
> Codegen doesn't normalize loops. Without CGP's splitting lots of loops end up missing preheaders. The right fix is for machine licm to insert preheaders on demand. I'm looking into it.

FWIW, live range splitting does not need preheaders, but it doesn't like critical edges exiting a loop.

It is not implemented yet, but eventually I will split the loop exit edges on demand.

/jakob





More information about the llvm-commits mailing list