[llvm-commits] PATCH: Move the global-copy-to-alloca optimization to InstCombine
chandlerc at gmail.com
Tue Aug 21 01:43:57 PDT 2012
On Mon, Aug 20, 2012 at 9:48 AM, Chris Lattner <clattner at apple.com> wrote:
> On Aug 20, 2012, at 2:27 AM, Chandler Carruth <chandlerc at gmail.com> wrote:
> > Hello,
> > I've been hacking on SROA a lot (email coming up on that front..) and
> one of the oddities is that SROA is doing a very instcombine-like
> optimization. I was able to move it over to InstCombine w/o touching any
> other aspect of SROA. It simplifies the model of SROA a bit, and also the
> optimization works much better in the instcombine framework: this is about
> nuking one instruction, and replacing it with another.
> Makes sense to me.
> Can pointsToConstantGlobal be simplified with Value::stripInBoundsOffsets ?
It's not clear to me that this would be an improvement...
pointsToConstantGlobal get's to cheat pretty spectacularly by only ever
handling constant expressions. It's also pretty simple. Any particular
reason to write it using the more general value stripping? We'd still have
almost as much code in order to assert that it was still a constant
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits