[PATCH] Update optimization passes to handle inalloca arguments

Reid Kleckner rnk at google.com
Tue Jan 14 23:48:17 PST 2014


On Tue, Jan 14, 2014 at 11:08 PM, Chris Lattner <clattner at apple.com> wrote:

>
> On Dec 19, 2013, at 2:43 PM, Reid Kleckner <rnk at google.com> wrote:
>
> > I searched Transforms/ and Analysis/ for 'ByVal' and updated those call
> > sites to check for inalloca if appropriate.
> >
> > I added tests for any change that would allow an optimization to fire on
> > inalloca.
>
> I don't see how this is sufficient.  How do you ensure that optimization
> passes avoid breaking the invariant you require?


In practice, it isn't.  With this change and the x86 codegen change, I can
self-host a MSVC C++ ABI clang at -O0.  Victory!  =D  With optimizations,
various TUs fail the verifier after optimization.  =/

So, this is a start, but I think don't have any clever solutions other than
looking for byval and handling inalloca and then reducing all the assertion
/ verifier failures during a self-host into test cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140114/7fab5886/attachment.html>


More information about the llvm-commits mailing list