[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

Jay Foad via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 02:48:56 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 cfe-commits mailing list