<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 25, 2013 at 12:42 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div>On Mar 25, 2013, at 12:23 PM, Alexey Samsonov <<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>> wrote:</div>
<br><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
Cool you guys are working on it! I have a raw local patch that does the same (emits llvm.lifetime start/end intrinsics), and</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
I hope to provide some feedback tomorrow, when I look at this commit in more details. Some of my concerns:</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
1) Rafael mentioned a thread where I asked about llvm.lifetime intrinsics semantics and behavior - you may be</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
interested in it. I think we may resurrect it and clarify their semantics.</div></blockquote><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
2) I'm afraid that immediate enabling of stack coloring may break things - I've seen that similar gcc option</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
had to be disabled on some codebases because of the bugs in the code where a local variable was used after</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
it went out of scope.</div></blockquote><div><br></div></div><div>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. </div>
<div><br></div></div></div></blockquote><div><br></div><div>Are you talking about the bits in removeInvalidSlotRanges (ProtectFromEscapedAllocas)? That code appears to be disabled by default?</div><div><br></div><div style>
-eric</div><div><br></div><div><br>
</div></div></div></div>