[PATCH] Fixing line numbers of inlined allocas

Eric Christopher echristo at gmail.com
Wed Oct 15 11:37:30 PDT 2014


> To sum up:
> 
> If we special case non-debug functions when inlining, attributing their instructions to the call site, but non-debug instructions in debug functions were just persisted with no debug location then we'd still need to special case allocas from non-debug functions to avoid this bug in that case.
> 

Yep.

> So it sounds like we need to special case the static allocas, but the special case should probably be to not add a debugloc for them (unlike other instructions).
> 

Agreed.

> Then there remains an open question as to whether, for debugloc-less instructions in non-nodebug functions, should they be treated the same as instructions in nodebug functions (attributed to the call site) or unattributed? (for now I'm happy to leave them handled the same way as nodebug instructions, attributing them to the call site)

Probably just leave them as is for now. It's not a great solution, but unless we want to construct a "nodebug" line node I think this is going to be the best.

http://reviews.llvm.org/D5401






More information about the llvm-commits mailing list