[llvm-dev] [DebugInfo]Crash during building openmpi4.0.0

Tomar, Sourabh Singh via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 23 20:50:25 PST 2020


Hi Jeremy, 

Thanks for reply, my observation was also same. But it's just for understanding/hackish to remove the call, we need to get to the root-cause or drop the debug-info for such cases(like this).

It seems to me that, some incorrect debug info manipulation is being done by "fixupDebugInfoPostExtraction".

"k.1.if.then" is an outlined function(seems like partial inliner pass is doing this). "CodeExtractor" utility is used for outlining and " fixupDebugInfoPostExtraction" for updating appropriate debug info post outlining.

Thank You,
Sourabh.


-----Original Message-----
From: Jeremy Morse <jeremy.morse.llvm at gmail.com> 
Sent: Friday, November 20, 2020 5:42 PM
To: Tomar, Sourabh Singh <SourabhSingh.Tomar at amd.com>
Cc: Adrian Prantl <aprantl at apple.com>; llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] [DebugInfo]Crash during building openmpi4.0.0

[CAUTION: External Email]

Hi Sourabh,

Thanks for the reproducer; it crashes for me too with a recent clang.
It looks like the cause is duplicate dbg.declare intrinsics in the "k.1.if.then" function (I'm not familiar with partial inlining alas).
There are two instances of:

  call void @llvm.dbg.declare(metadata i32* %h.sroa.2.i, metadata !123, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 32)) #4, !dbg
!124

In different blocks (the first operand differs). When emitting the variable location, this is interpreted as that fragment having multiple locations specified, causing the assertion. Commenting either of the duplicate dbg.declares out avoids the crash.

--
Thanks,
Jeremy


More information about the llvm-dev mailing list