[llvm] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 02:48:55 PDT 2023


================
@@ -935,7 +935,7 @@ bool AArch64ConditionalCompares::runOnMachineFunction(MachineFunction &MF) {
   SchedModel = MF.getSubtarget().getSchedModel();
   MRI = &MF.getRegInfo();
   DomTree = &getAnalysis<MachineDominatorTree>();
-  Loops = getAnalysisIfAvailable<MachineLoopInfo>();
+  Loops = &getAnalysis<MachineLoopInfo>();
----------------
jayfoad wrote:

Everything seems to work if I change `AArch64ConditionalCompares` to not require `MachineLoopInfo`. But I think I'll leave it to the AArch64 maintainers like you suggest.

https://github.com/llvm/llvm-project/pull/65729


More information about the llvm-commits mailing list