[LLVMdev] [RFC] LCSSA vs. SSAUpdater ... FIGHT!

Chris Lattner clattner at apple.com
Sat Feb 8 14:36:58 PST 2014


On Feb 7, 2014, at 12:05 PM, Andrew Trick <atrick at apple.com> wrote:
>>> (Note, there are plenty of places where SSAUpdater makes sense, so this isn't really about doing away with it at all.)
>> 
>> It’s worth noting that LCSSA predates SSAUpdater.  If I went back in time and knew what I knew now, I wouldn’t have gone with LCSSA.
>> 
>> My gripes are three fold: 1) SSAUpdater can handle anything that LCSSA simplifies, 2) that LCSSA is annoying to keep up to date, 3) LCSSA burns compile time optimistically rewriting loop values, which are then later collapsed away even if nothing cares about those values.
>> 
>> My personal preference would be to get rid of LCSSA completely, but I don’t know how to stage that.
> 
> Until recently I felt exactly the same way. I didn’t want LCSSA just as another mechanism for updating SSA.
> 
> I’m warming up to having it run during the early loop passes if it
> - significantly simplifies the LICM logic
> - greatly speeds up SSAUpdater within loops (maybe little net compile-time increase on average?)
> - compartmentalizes loop transforms and SSA update so we can debug loop opts one loop at a time
> 
> I still don’t particularly like that we force all LLVM clients to perform LCSSA when all they end up doing is rotating and simplifying loops (no LICM/unroll). So it is a tradeoff.

I don't have a strong opinion here, just throwing out some thoughts.  You've been working on the loop passes much more recently, so if you think it is worth holding on to (or worth using just for the early passes?) then go for it.

-Chris



More information about the llvm-dev mailing list