[PATCH] Fixing line numbers of inlined allocas
Wolfgang Pieb
wolfgang_pieb at playstation.sony.com
Wed Oct 15 11:22:09 PDT 2014
>>! In D5401#11, @aprantl wrote:
>>>! In D5401#10, @echristo wrote:
>>> 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).
>>>
>>
>> This is likely the right solution.
>
> Agreed, especially since we want the alloca in this example to be counted towards the prologue.
>
> -- adrian
Thank you for the input, gentlemen. I'm concerned by the following comment in fixupLineNumbers() in Transforms/Utils/InlineFunction.cpp:
// If the inlined instruction has no line number, make it look as if it
// originates from the call location. This is important for
// ((__always_inline__, __nodebug__)) functions which must use caller
// location for all instructions in their function body.
BI->setDebugLoc(TheCallDL);
http://reviews.llvm.org/D5401
More information about the llvm-commits
mailing list