[llvm-dev] CloneFunction during LTO leads to seg fault?
Tobias Edler von Koch via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 12 07:51:01 PST 2016
On 02/11/2016 10:05 AM, Mehdi Amini via llvm-dev wrote:
>> Is this a bug? Is there an assumption that a function won't be cloned after inlining? Is there an assumption that the debug info metadata nodes are well formed when they get to DwarfDebug?
> There shouldn't be such assumptions, and if there is such an assumption the compiler should assert instead of segfaulting (assuming you built with assertions).
> My guess i that CloneFunction hasn't been tested with this case and it is a bug.
The problem is that the Clone* functions don't clean up debug info at
all. This also affects split codegen in LTO (as is, it won't work if you
have debug info). A work-around is to run something similar to
StripDeadDebugInfo after cloning - Sergei (cc'ed) has seen some success
using an approach based on that.
Tobias
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
More information about the llvm-dev
mailing list