[llvm] bf3aa88 - [GlobalISel] Combiner: Install Observer into MachineFunction
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 11 09:09:35 PDT 2024
Author: Tobias Stadler
Date: 2024-08-11T18:09:31+02:00
New Revision: bf3aa88b7f5459f94524948f01f30f5c67cfde5f
URL: https://github.com/llvm/llvm-project/commit/bf3aa88b7f5459f94524948f01f30f5c67cfde5f
DIFF: https://github.com/llvm/llvm-project/commit/bf3aa88b7f5459f94524948f01f30f5c67cfde5f.diff
LOG: [GlobalISel] Combiner: Install Observer into MachineFunction
The Combiner doesn't install the Observer into the MachineFunction.
This probably went unnoticed, because MachineFunction::getObserver() is
currently only used in constrainOperandRegClass(), but this might cause
issues down the line.
Pull Request: https://github.com/llvm/llvm-project/pull/102156
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/Combiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/Combiner.cpp b/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
index 3310ce5455c97..5da9e86b20761 100644
--- a/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
@@ -153,7 +153,7 @@ bool Combiner::combineMachineInstrs() {
// down RPOT.
Changed = false;
- RAIIDelegateInstaller DelInstall(MF, ObserverWrapper.get());
+ RAIIMFObsDelInstaller DelInstall(MF, *ObserverWrapper);
for (MachineBasicBlock *MBB : post_order(&MF)) {
for (MachineInstr &CurMI :
llvm::make_early_inc_range(llvm::reverse(*MBB))) {
More information about the llvm-commits
mailing list