CodeGen: Use MachineInstr& in AntiDepBreaker API, NFC
Take parameters as MachineInstr& instead of MachineInstr* in
AntiDepBreaker API, since these are required to be non-null. No
functionality change intended. Looking toward PR26753.
llvm-svn: 262145
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp
index b95dffd..06a88bf 100644
--- a/llvm/lib/CodeGen/PostRASchedulerList.cpp
+++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp
@@ -169,7 +169,7 @@
/// Observe - Update liveness information to account for the current
/// instruction, which will not be scheduled.
///
- void Observe(MachineInstr *MI, unsigned Count);
+ void Observe(MachineInstr &MI, unsigned Count);
/// finishBlock - Clean up register live-range state.
///
@@ -335,7 +335,7 @@
Scheduler.EmitSchedule();
Current = MI;
CurrentCount = Count;
- Scheduler.Observe(MI, CurrentCount);
+ Scheduler.Observe(*MI, CurrentCount);
}
I = MI;
if (MI->isBundle())
@@ -414,7 +414,7 @@
/// Observe - Update liveness information to account for the current
/// instruction, which will not be scheduled.
///
-void SchedulePostRATDList::Observe(MachineInstr *MI, unsigned Count) {
+void SchedulePostRATDList::Observe(MachineInstr &MI, unsigned Count) {
if (AntiDepBreak)
AntiDepBreak->Observe(MI, Count, EndIndex);
}