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

Philip Reames listmail at philipreames.com
Fri Feb 14 10:12:56 PST 2014


On 02/07/2014 11:45 AM, Chandler Carruth wrote:
>
> On Fri, Feb 7, 2014 at 11:29 AM, Chris Lattner <clattner at apple.com 
> <mailto:clattner at apple.com>> wrote:
>
>     On Feb 1, 2014, at 4:33 AM, Chandler Carruth <chandlerc at gmail.com
>     <mailto:chandlerc at gmail.com>> wrote:
>
>     > So, there are two primary ideas behind SSA form management in
>     the loop optimizers of LLVM:
>     >
>     > - Require LCSSA form input, leverage its (very powerful)
>     guarantees to simplify maintaining SSA form, and also maintain
>     LCSSA form.
>     >
>     > - Don't bother with LCSSA form input, assume the worst, and use
>     powerful incremental SSA formation utilities built on SSAUpdater
>     to form SSA on demand when needed.
>     >
>     > (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
>
>
> Yes, it can, but it is *significantly* less simple. I think the 
> simplicity of reasoning and handling things with LCSSA is not without 
> value.
I strongly agree with this.  I recently looked at using LCSSA vs 
SSAUpdater for an out-of-tree pass I'm working on and quickly settled on 
LCSSA due to its simplicity.  I may revisit that decision someday if 
performance proves problematic, but for initial prototyping, LCSSA was a 
major win.

Part of that is that I never really found clear documentation on what 
SSAUpdater actually did and how to use it.  There's some documentation 
in the header, but it's not exactly obvious on first read.

Philip


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140214/c2496799/attachment.html>


More information about the llvm-dev mailing list