[PATCH] D63286: [GlobalISel][IRTranslator] Don't add debug info to constants emitted into the entry block

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 10:33:08 PDT 2019


aemerson created this revision.
aemerson added reviewers: paquette, qcolombet.
Herald added subscribers: llvm-commits, Petar.Avramovic, volkan, hiraditya, javed.absar, aprantl, kristof.beyls, rovka.
Herald added a project: LLVM.

Constants, including G_GLOBAL_VALUE, are all emitted into the entry block which lets us use the vreg def assuming it dominates all other users. However, it can cause jumpy debug behaviour since the DebugLoc attached to these MIs are from
a user instruction that could be in a different block.

This makes GlobalISel consistent with SelectionDAG and fixes PR40887.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63286

Files:
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/constant-dbg-loc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63286.204578.patch
Type: text/x-patch
Size: 5232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190613/3a003cbe/attachment.bin>


More information about the llvm-commits mailing list