[PATCH] SimplifyCFG: Avoid miscompilations due to removed lifetime intrinsics

Reid Kleckner rnk at google.com
Wed Jul 30 00:56:13 PDT 2014


On Wed, Jul 30, 2014 at 12:46 AM, Nick Lewycky <nicholas at mxc.ca> wrote:

> Rafael Ávila de Espíndola wrote:
>
>> This is fine by me.
>>
>> I agree with Reid that we need to figure out what to do with  the
>> lifetime intrinsics, but lets not miscompile code while we do that.
>>
>
> My proposal is that we should combine lifetime.start and lifetime.end into
> a single intrinsic that means "store undef to through this pointer" but
> doesn't get optimized away like store to undef does. The additional optz'n
> possible from having distinct start and end isn't worth it.
>
> There's an obvious question of whether storing to undef should just work
> that way on its own. Anyone wanting to implement that should be aware that
> historically we've used store to undef as a way for passes which can't
> modify the CFG to indicate unreachable, so we'll need an answer for that.


Hang on, store to undef or store undef to the pointer?  I think you mean
storing undef to / through the pointer, in which case, I don't think we use
that for unreachable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140730/a20bcd5d/attachment.html>


More information about the llvm-commits mailing list