[llvm] 5c3a0fa - [GlobalISel] IRTranslator: Use RAIIMFObsDelInstaller (#102379)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 06:11:03 PDT 2024
Author: Tobias Stadler
Date: 2024-08-13T15:10:59+02:00
New Revision: 5c3a0fa7e5ad0b3de7c6a76c6637e63890709e97
URL: https://github.com/llvm/llvm-project/commit/5c3a0fa7e5ad0b3de7c6a76c6637e63890709e97
DIFF: https://github.com/llvm/llvm-project/commit/5c3a0fa7e5ad0b3de7c6a76c6637e63890709e97.diff
LOG: [GlobalISel] IRTranslator: Use RAIIMFObsDelInstaller (#102379)
Similar to #102156.
runOnMachineFunction() installs the Observer correctly manually.
finishPendingPhis() doesn't install into the MF, but this currently
can't cause issues because DILocationVerifier doesn't care about changed
instructions.
Switch to RAIIMFObsDelInstaller in both places for consistency.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 0169a0e466d878..219c60eab04f5a 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -3339,7 +3339,7 @@ void IRTranslator::finishPendingPhis() {
#ifndef NDEBUG
DILocationVerifier Verifier;
GISelObserverWrapper WrapperObserver(&Verifier);
- RAIIDelegateInstaller DelInstall(*MF, &WrapperObserver);
+ RAIIMFObsDelInstaller ObsInstall(*MF, WrapperObserver);
#endif // ifndef NDEBUG
for (auto &Phi : PendingPHIs) {
const PHINode *PI = Phi.first;
@@ -3966,8 +3966,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
DILocationVerifier Verifier;
WrapperObserver.addObserver(&Verifier);
#endif // ifndef NDEBUG
- RAIIDelegateInstaller DelInstall(*MF, &WrapperObserver);
- RAIIMFObserverInstaller ObsInstall(*MF, WrapperObserver);
+ RAIIMFObsDelInstaller ObsInstall(*MF, WrapperObserver);
for (const BasicBlock *BB : RPOT) {
MachineBasicBlock &MBB = getMBB(*BB);
// Set the insertion point of all the following translations to
More information about the llvm-commits
mailing list