Skip to content

Commit

Permalink
[GlobalISel] Combiner: Install Observer into MachineFunction
Browse files Browse the repository at this point in the history
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: #102156
  • Loading branch information
tobias-stadler committed Aug 11, 2024
1 parent d1957dd commit bf3aa88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/GlobalISel/Combiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit bf3aa88

Please sign in to comment.