r177819 - Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.

Eric Christopher echristo at gmail.com
Mon Mar 25 14:01:24 PDT 2013


On Mon, Mar 25, 2013 at 12:42 PM, Nadav Rotem <nrotem at apple.com> wrote:

>
> On Mar 25, 2013, at 12:23 PM, Alexey Samsonov <samsonov at google.com> wrote:
>
> Cool you guys are working on it! I have a raw local patch that does the
> same (emits llvm.lifetime start/end intrinsics), and
> I hope to provide some feedback tomorrow, when I look at this commit in
> more details. Some of my concerns:
> 1) Rafael mentioned a thread where I asked about llvm.lifetime intrinsics
> semantics and behavior - you may be
> interested in it. I think we may resurrect it and clarify their semantics.
>
> 2) I'm afraid that immediate enabling of stack coloring may break things -
> I've seen that similar gcc option
> had to be disabled on some codebases because of the bugs in the code where
> a local variable was used after
> it went out of scope.
>
>
> The Stack-Coloring pass detects undefined behavior such as the one that
> you mentioned and aborts the optimization. It has a command line flag that
> allows it to assert and crash on debug builds in order to debug the
> compiler itself.
>
>
Are you talking about the bits in removeInvalidSlotRanges
(ProtectFromEscapedAllocas)? That code appears to be disabled by default?

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130325/f1c89385/attachment.html>


More information about the cfe-commits mailing list