diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2023-09-11 19:56:15 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2023-09-11 20:01:19 +0100 |
commit | e54277fa109081e0f98a8cd3e0110fb89a5b7d60 (patch) | |
tree | 354eedafb831b7f4fcd617ac9591e9310cc0fa79 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | d7acc6e23f69a22969a9139d6a91e022280c2c37 (diff) | |
download | llvm-e54277fa109081e0f98a8cd3e0110fb89a5b7d60.zip llvm-e54277fa109081e0f98a8cd3e0110fb89a5b7d60.tar.gz llvm-e54277fa109081e0f98a8cd3e0110fb89a5b7d60.tar.bz2 |
[NFC][RemoveDIs] Use iterators over inst-pointers when using IRBuilder
This patch adds a two-argument SetInsertPoint method to IRBuilder that
takes a block/iterator instead of an instruction, and updates many call
sites to use it. The motivating reason for doing this is given here [0],
we'd like to pass around more information about the position of debug-info
in the iterator object. That necessitates passing iterators around most of
the time.
[0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939
Differential Revision: https://reviews.llvm.org/D152468
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 744766b..56bc90a 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -2439,7 +2439,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI, // `Caller->isPresplitCoroutine()` would affect AlwaysInliner at O0 only. if ((InsertLifetime || Caller->isPresplitCoroutine()) && !IFI.StaticAllocas.empty()) { - IRBuilder<> builder(&FirstNewBlock->front()); + IRBuilder<> builder(&*FirstNewBlock, FirstNewBlock->begin()); for (unsigned ai = 0, ae = IFI.StaticAllocas.size(); ai != ae; ++ai) { AllocaInst *AI = IFI.StaticAllocas[ai]; // Don't mark swifterror allocas. They can't have bitcast uses. |