[PATCH] D152543: [NFC][DebugInfo][RemoveDIs] Prefer iterators over instruction pointers in instcombine

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 08:05:15 PDT 2023


jmorse created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
jmorse requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Continuing todays theme of "Use iterators over instruction pointers", as per my proposal for how to get rid of debug intrinsics [0], instrument a bunch of call-sites in instcombine to pass around iterators instead of pointers. Again, these are all the call-sites that had to be instrumented to make a stage2clang build identically in the context of our "no dbg.values" prototype, plus a couple of other large C++ code bases I have to hand.

Patch is technically NFC and I'm not adding reviewers; this is so that people can take a look at what changes I'm proposing, and have a think about how we can go about testing them.

[0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152543

Files:
  llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152543.529963.patch
Type: text/x-patch
Size: 20330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230609/47212d34/attachment.bin>


More information about the llvm-commits mailing list