<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div><br></div><div><div><div>On Jan 23, 2014, at 11:26 AM, Robinson, Paul <<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite">-----Original Message-----<br>From: Adrian Prantl [<a href="mailto:aprantl@apple.com">mailto:aprantl@apple.com</a>]<br>Sent: Thursday, January 23, 2014 11:13 AM<br>To: Robinson, Paul<br>Cc: Juergen Ributzka; LLVM Commits; Owen Anderson; Eric Christopher<br>Subject: Re: [PATCH] Constant Hoisting Pass<br><br><br>On Jan 22, 2014, at 18:05, Robinson, Paul<br><<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<br><br><blockquote type="cite">With this kind of thing, I get concerned that moving stuff around will<br></blockquote>cause unnecessary chaos with debug info.  But it looks like the new<br>instructions you're creating don't have a source location attached?  In<br>this case that's probably the right thing to do.  Let me know if I'm<br>misunderstanding what's going on here.<br><br>Not attaching any location will create a hole in the function, which is<br>also not ideal. I've seen this cause interesting problems with inlining<br>where the debugger then has no chance to know which of the abstract<br>subroutines an instruction belongs to and stepping totally breaks.<br></blockquote><br>Hm.  Machine instructions with no explicit location will implicitly<br>inherit the location of the preceding instruction.[*]  Is that not what<br>happens with IR instructions?<br>--paulr<br><br>[*] This is not great when the preceding instruction is in a different<br>block, and I've poked at that from time to time. But is a digression from<br>this discussion.<br><br><blockquote type="cite"><br>If there really is no useful location for an instruction, IMHO it should<br>get a location pointing to line 0 + a valid scope that belongs to the<br>function. In Clang we have ArtificialLocation for this which is used for<br>the helper functions emitted for Blocks in Objective C.<br><br>-- adrian</blockquote></div></blockquote></div><br></div></body></html>