[LLVMdev] disabling combining load/stores in optimizer.

David Greene dag at cray.com
Mon Aug 3 16:34:32 PDT 2009


On Monday 03 August 2009 18:01, Chris Lattner wrote:
> On Aug 3, 2009, at 3:09 PM, Dan Gohman wrote:
> >> We are currently doing this, however I think disabling such
> >> optimizations is a much better solution.
> >
> > An LLVM design goal is that backends should be able to outsmart
> > instcombine when necessary, rather than having instcombine be able
> > to disable parts of itself in order to avoid foiling the backends.
> > Practicality sometimes steers elsewhere of course. Please explain
> > why you think suppressing this particular optimization is better;
> > it isn't obvious how it would look different in the end.
>
> Yeah, I agree.  LegalizeTypes should be able to trivially lower this.

"Should be" is the key clause here.  I agree with you and Dan in general.
However, we have at least one testcase where the overhead of legalize is
so huge it takes *hours* to finish.  This is with LLVM 2.4 and I'm waiting
on an LLVM 2.5 upgrade to re-test so I can file a bug if necessary.

The point is that while legalize should be able to handle stuff, sometimes
it can't for other reasons.

                                  -Dave



More information about the llvm-dev mailing list