[all-commits] [llvm/llvm-project] 2425e2: [DebugInfo][RemoveDIs] Have getInsertionPtAfterDef...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Thu Nov 30 04:20:12 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2425e2940eb4f24de296ada92e25d6aad9578cd0
https://github.com/llvm/llvm-project/commit/2425e2940eb4f24de296ada92e25d6aad9578cd0
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2023-11-30 (Thu, 30 Nov 2023)
Changed paths:
M llvm/include/llvm/IR/IRBuilder.h
M llvm/include/llvm/IR/Instruction.h
M llvm/lib/IR/Instruction.cpp
M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/lib/Transforms/Scalar/GuardWidening.cpp
M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
M llvm/lib/Transforms/Scalar/Reassociate.cpp
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
Log Message:
-----------
[DebugInfo][RemoveDIs] Have getInsertionPtAfterDef return an iterator (#73149)
Part of the "RemoveDIs" project to remove debug intrinsics requires
passing block-positions around in iterators rather than as instruction
pointers, allowing some debug-info to reside in BasicBlock::iterator.
This means getInsertionPointAfterDef has to return an iterator, and as
it can return no-instruction that means returning an optional iterator.
This patch changes the signature for getInsertionPtAfterDef and then
patches up the various places that use it to handle the different type.
This would overall be an NFC patch, however in
InstCombinerImpl::freezeOtherUses I've started skipping any debug
intrinsics at the returned insert-position. This should not have any
_meaningful_ effect on the compiler output: at worst it means variable
assignments that are skipped will now cover the freeze instruction and
anything inserted before it, which should be inconsequential.
Sadly: this makes the function signature ugly. This is probably the
ugliest piece of fallout for the "RemoveDIs" work, but it serves the
overall purpose of improving compile times and not allowing `-g` to
affect compiler output, so should be worthwhile in the end.
More information about the All-commits
mailing list