[llvm] [NewPM] Adds a port for AArch64ConditionalComparesPass (PR #192755)

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 11:06:47 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Target/AArch64/AArch64.h llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp llvm/lib/Target/AArch64/AArch64TargetMachine.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
index 75a9a47f9..4754f5c1b 100644
--- a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
@@ -980,9 +980,11 @@ bool AArch64ConditionalComparesLegacy::runOnMachineFunction(
 
   const MachineBranchProbabilityInfo *MBPI =
       &getAnalysis<MachineBranchProbabilityInfoWrapperPass>().getMBPI();
-  MachineDominatorTree *DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
+  MachineDominatorTree *DomTree =
+      &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
   MachineLoopInfo *Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI();
-  MachineTraceMetrics *Traces = &getAnalysis<MachineTraceMetricsWrapperPass>().getMTM();
+  MachineTraceMetrics *Traces =
+      &getAnalysis<MachineTraceMetricsWrapperPass>().getMTM();
 
   AArch64ConditionalComparesImpl Impl(MBPI, DomTree, Loops, Traces);
   return Impl.run(MF);
@@ -991,10 +993,13 @@ bool AArch64ConditionalComparesLegacy::runOnMachineFunction(
 PreservedAnalyses
 AArch64ConditionalComparesPass::run(MachineFunction &MF,
                                     MachineFunctionAnalysisManager &MFAM) {
-  const MachineBranchProbabilityInfo *MBPI = &MFAM.getResult<MachineBranchProbabilityAnalysis>(MF);
-  MachineDominatorTree *DomTree = &MFAM.getResult<MachineDominatorTreeAnalysis>(MF);
+  const MachineBranchProbabilityInfo *MBPI =
+      &MFAM.getResult<MachineBranchProbabilityAnalysis>(MF);
+  MachineDominatorTree *DomTree =
+      &MFAM.getResult<MachineDominatorTreeAnalysis>(MF);
   MachineLoopInfo *Loops = &MFAM.getResult<MachineLoopAnalysis>(MF);
-  MachineTraceMetrics *Traces = &MFAM.getResult<MachineTraceMetricsAnalysis>(MF);
+  MachineTraceMetrics *Traces =
+      &MFAM.getResult<MachineTraceMetricsAnalysis>(MF);
 
   AArch64ConditionalComparesImpl Impl(MBPI, DomTree, Loops, Traces);
   bool Changed = Impl.run(MF);

``````````

</details>


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


More information about the llvm-commits mailing list