[PATCH] D81685: BypassSlowDivision: Fix dropping debug info

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 13:14:04 PDT 2020


arsenm created this revision.
arsenm added reviewers: echristo, jlebar, aprantl, scott.linder, ramana-nvr.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, wdng, jvesely.
Herald added a project: LLVM.

I don't know anything about debug info, but this seems like more work
should be necessary. This constructs a new IRBuilder and reconstructs
the original divides rather than moving the original.

      

One problem this has is if a div/rem pair are handled, both end up
with the same debugloc. I'm not sure how to fix this, since this uses
a cache when it sees the same input operands again, which will have
the first instance's location attached.


https://reviews.llvm.org/D81685

Files:
  llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
  llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81685.270212.patch
Type: text/x-patch
Size: 6930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200611/8e32d807/attachment.bin>


More information about the llvm-commits mailing list