[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
commitd529943a27dc22269070f883877531fc4b52cdca
authorJeremy Morse <jeremy.morse@sony.com>
Mon, 11 Sep 2023 14:00:13 +0000 (11 15:00 +0100)
committerJeremy Morse <jeremy.morse@sony.com>
Mon, 11 Sep 2023 14:04:51 +0000 (11 15:04 +0100)
treec59a5bc76bc26c6ce49a1eb6a938850b428bd92f
parentedc2fb0733a6cf384e041b69bbcbac18b7ff17c7
[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine

As per my proposal for how to eliminate debug intrinsics [0], for various
places in InstCombine prefer to insert using an instruction iterator rather
than an instruction pointer. This is so that we can eventually pass more
information in the iterator class. These call-sites where I've changed the
spelling are those that necessary to build a stage2clang to produce an
identical binary in the coming no-debug-intrinsics mode.

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

Differential Revision: https://reviews.llvm.org/D152543
llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
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