[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port MachineCycleInfo to NPM (PR #114745)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 3 23:10:30 PST 2024


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 dbedca0302d5624554ed7ff4b45c019ad5972166 431e6371f161d0f85c598c789902976e3fa74162 --extensions h,cpp -- llvm/include/llvm/CodeGen/MachineCycleAnalysis.h llvm/include/llvm/InitializePasses.h llvm/lib/CodeGen/CodeGen.cpp llvm/lib/CodeGen/MachineCycleAnalysis.cpp llvm/lib/Passes/PassBuilder.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h b/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
index f740a9599e..64cf30e6dd 100644
--- a/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
+++ b/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
@@ -57,11 +57,14 @@ public:
   Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM);
 };
 
-class MachineCycleInfoPrinterPass : public PassInfoMixin<MachineCycleInfoPrinterPass> {
+class MachineCycleInfoPrinterPass
+    : public PassInfoMixin<MachineCycleInfoPrinterPass> {
   raw_ostream &OS;
-  public:
-    explicit MachineCycleInfoPrinterPass(raw_ostream &OS) : OS(OS) {}
-    PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM);
+
+public:
+  explicit MachineCycleInfoPrinterPass(raw_ostream &OS) : OS(OS) {}
+  PreservedAnalyses run(MachineFunction &MF,
+                        MachineFunctionAnalysisManager &MFAM);
 };
 
 } // end namespace llvm
diff --git a/llvm/lib/CodeGen/MachineCycleAnalysis.cpp b/llvm/lib/CodeGen/MachineCycleAnalysis.cpp
index 82d7aadaca..6e58439960 100644
--- a/llvm/lib/CodeGen/MachineCycleAnalysis.cpp
+++ b/llvm/lib/CodeGen/MachineCycleAnalysis.cpp
@@ -56,7 +56,9 @@ void MachineCycleInfoWrapperPass::releaseMemory() {
 
 AnalysisKey MachineCycleAnalysis::Key;
 
-MachineCycleInfo MachineCycleAnalysis::run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM) {
+MachineCycleInfo
+MachineCycleAnalysis::run(MachineFunction &MF,
+                          MachineFunctionAnalysisManager &MFAM) {
   MachineCycleInfo MCI;
   MCI.compute(MF);
   return MCI;
@@ -99,7 +101,9 @@ bool MachineCycleInfoPrinterLegacy::runOnMachineFunction(MachineFunction &F) {
   return false;
 }
 
-PreservedAnalyses MachineCycleInfoPrinterPass::run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM) {
+PreservedAnalyses
+MachineCycleInfoPrinterPass::run(MachineFunction &MF,
+                                 MachineFunctionAnalysisManager &MFAM) {
   OS << "MachineCycleInfo for function: " << MF.getName() << "\n";
 
   auto &MCI = MFAM.getResult<MachineCycleAnalysis>(MF);

``````````

</details>


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


More information about the llvm-branch-commits mailing list