<div dir="ltr">So currently if you have an instruction with no DebugLoc that's inlined into a function with debug info, that instruction appears to get the DebugLoc of the call site, yes? (if I'm understanding this correctly)<br><br>We could, maybe, ish, fix this by describing the instruction as inlined - but our DebugLoc schema doesn't really have a way to describe "no specific location, but it's inlined within this scope" (line/col 0, but with a scope, maybe? Is line/col 0 the same as no DebugLoc? I guess it probably is, but I'm not sure).<br><br>& what this patch is proposing is to special case static allocas with no DebugLoc and assign them the same DebugLoc as other static allocas? (what if there aren't any?) which should be the null DebugLoc. I suspect the more general solution than this is to just ensure that instructions with no DebugLoc continue to have no DebugLoc when they're inlined (they certainly shouldn't end up with the call sites DebugLoc - without inlining info, etc).<br><br>But, yes, potentially from a source fidelity perspective we could see if a 0 line/col(/file) DebugLoc with scoping information  could be used to produce reasonable output, and then special case the prologue handling code to be a bit smarter about instructions with DebugLocs... but I don't know how smart that would end up being.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 15, 2014 at 9:54 AM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wouldn't it be a better fix to use the proper location for the alloca and rather fix the backend to follow the inlinedAt references in the alloca's debug location when deciding the end of the prologue?<br>
<br>
<a href="http://reviews.llvm.org/D5401" target="_blank">http://reviews.llvm.org/D5401</a><br>
<br>
<br>
</blockquote></div><br></div>