[PATCH] D70293: Fix PR44001: assert failure in getFunctionLocalOffsetAfterInsn

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 23:36:44 PST 2019


thopre created this revision.
thopre added reviewers: dstenb, vsk, aprantl, djtodoro, dblaikie, NikolaPrica.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Assert in getFunctionLocalOffsetAfterInsn() fails when processing a call
MachineInstr inside a bundle and compiling with debug info. This is
because labels are added by DwarfDebug::beginInstruction() which is
called for each top-level MI by EmitFunctionBody()'s for-loop iteration
but constructCallSiteEntryDIEs() which calls
getFunctionLocalOffsetAfterInsn() iterates over all MIs.

This commit modifies constructCallSiteEntryDIEs() to get the associated
bundle MI for call MIs inside a bundle and use that to when calling
getFunctionLocalOffsetAfterInsn() and getLabelAfterInsn(). It also skips
loop iterations for bundle MIs since the loop statements are concerned
with debug info for each physical instructions and bundles represent a
group of instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70293

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/Hexagon/bundled-call-pr44001.ll
  llvm/test/DebugInfo/Hexagon/lit.local.cfg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70293.229453.patch
Type: text/x-patch
Size: 6174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191115/7fc60f28/attachment.bin>


More information about the llvm-commits mailing list