[llvm] [NewPM][CodeGen] Add NPM support to llc (PR #69879)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 22 06:26:39 PDT 2023


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 4f56d47d050e3d71964777151e439fe923e64025 c4919da7d956d7e4e7aa177c88ebb1fa586b547e -- llvm/tools/llc/NewPMDriver.cpp llvm/tools/llc/NewPMDriver.h llvm/include/llvm/CodeGen/CodeGenPassBuilder.h llvm/include/llvm/CodeGen/TargetPassConfig.h llvm/include/llvm/IR/PassInstrumentation.h llvm/include/llvm/Target/TargetMachine.h llvm/lib/CodeGen/TargetPassConfig.cpp llvm/lib/Passes/StandardInstrumentations.cpp llvm/lib/Target/TargetLoweringObjectFile.cpp llvm/lib/Target/TargetMachine.cpp llvm/lib/Target/TargetMachineC.cpp llvm/lib/Target/X86/X86TargetMachine.cpp llvm/lib/Target/X86/X86TargetMachine.h llvm/tools/llc/llc.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h b/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
index 8c38b3eed..f8e376017 100644
--- a/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
+++ b/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
@@ -122,8 +122,7 @@ public:
   buildPipeline(raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
                 CodeGenFileType FileType) const;
 
-  Expected<MachineFunctionPassManager>
-  parseMIRPipeline(StringRef) const {
+  Expected<MachineFunctionPassManager> parseMIRPipeline(StringRef) const {
     // TODO: parse pipeline text
     return MachineFunctionPassManager();
   }
diff --git a/llvm/include/llvm/CodeGen/TargetPassConfig.h b/llvm/include/llvm/CodeGen/TargetPassConfig.h
index a995c06a8..5be27805e 100644
--- a/llvm/include/llvm/CodeGen/TargetPassConfig.h
+++ b/llvm/include/llvm/CodeGen/TargetPassConfig.h
@@ -13,8 +13,8 @@
 #ifndef LLVM_CODEGEN_TARGETPASSCONFIG_H
 #define LLVM_CODEGEN_TARGETPASSCONFIG_H
 
-#include "llvm/Pass.h"
 #include "llvm/IR/PassManager.h"
+#include "llvm/Pass.h"
 #include "llvm/Support/CodeGen.h"
 #include <cassert>
 #include <string>
diff --git a/llvm/include/llvm/IR/PassInstrumentation.h b/llvm/include/llvm/IR/PassInstrumentation.h
index 59d3b95c7..bba293c0c 100644
--- a/llvm/include/llvm/IR/PassInstrumentation.h
+++ b/llvm/include/llvm/IR/PassInstrumentation.h
@@ -98,12 +98,8 @@ public:
       return StartStopCallback(PassID, IR);
     }
     bool isStopMachineFunctionPass() const { return IsStopMachinePass; }
-    bool willCompleteCodeGenPipeline() const {
-      return Stop.empty();
-    }
-    StringRef getStop() const {
-      return Stop;
-    }
+    bool willCompleteCodeGenPipeline() const { return Stop.empty(); }
+    StringRef getStop() const { return Stop; }
   };
 
 public:
@@ -173,9 +169,7 @@ public:
     StartStopInfo = std::move(C);
   }
 
-  bool isStartStopInfoRegistered() const {
-    return StartStopInfo.has_value();
-  }
+  bool isStartStopInfoRegistered() const { return StartStopInfo.has_value(); }
 
   CodeGenStartStopInfo &getStartStopInfo() {
     assert(StartStopInfo.has_value() && "StartStopInfo is unregistered!");

``````````

</details>


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


More information about the llvm-commits mailing list