[llvm] 989e8f9 - Revert "[NFC][DebugInfo][RemoveDIs] Use iterators to insert in callsite-splitting (#74455)"
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 09:33:48 PST 2023
Author: Jeremy Morse
Date: 2023-12-05T17:32:23Z
New Revision: 989e8f9d51e6945905b0e26148574c8e1fa88c84
URL: https://github.com/llvm/llvm-project/commit/989e8f9d51e6945905b0e26148574c8e1fa88c84
DIFF: https://github.com/llvm/llvm-project/commit/989e8f9d51e6945905b0e26148574c8e1fa88c84.diff
LOG: Revert "[NFC][DebugInfo][RemoveDIs] Use iterators to insert in callsite-splitting (#74455)"
This reverts commit 34cdc913214fd9561b6ec8d535bd3d0313772cb5.
Two buildbots say this is bad:
https://lab.llvm.org/buildbot/#/builders/265/builds/861
https://lab.llvm.org/buildbot/#/builders/168/builds/17272
Added:
Modified:
llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp b/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp
index 015a0ab35987c..47af299dbd473 100644
--- a/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp
+++ b/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp
@@ -372,10 +372,10 @@ static void splitCallSite(CallBase &CB,
return;
}
- BasicBlock::iterator OriginalBegin = TailBB->begin();
+ auto *OriginalBegin = &*TailBB->begin();
// Replace users of the original call with a PHI mering call-sites split.
if (CallPN) {
- CallPN->insertBefore(*TailBB, OriginalBegin);
+ CallPN->insertBefore(OriginalBegin);
CB.replaceAllUsesWith(CallPN);
}
@@ -399,13 +399,13 @@ static void splitCallSite(CallBase &CB,
for (auto &Mapping : ValueToValueMaps)
NewPN->addIncoming(Mapping[CurrentI],
cast<Instruction>(Mapping[CurrentI])->getParent());
- NewPN->insertBefore(*TailBB, TailBB->begin());
+ NewPN->insertBefore(&*TailBB->begin());
CurrentI->replaceAllUsesWith(NewPN);
}
CurrentI->dropDbgValues();
CurrentI->eraseFromParent();
// We are done once we handled the first original instruction in TailBB.
- if (CurrentI == &*OriginalBegin)
+ if (CurrentI == OriginalBegin)
break;
}
}
More information about the llvm-commits
mailing list