[llvm] [NFC] Add `const` (PR #116611)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 05:31:50 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 1e4646d8191b13ac9c4d8c2cd3bb20a184f1966f 6dfc795d2b3263378d2367dbea9a0b8d5f8b3a1a --extensions h,cpp -- llvm/include/llvm/CodeGen/LiveInterval.h llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index 1339316b66..5c155facfc 100644
--- a/llvm/include/llvm/CodeGen/LiveInterval.h
+++ b/llvm/include/llvm/CodeGen/LiveInterval.h
@@ -67,9 +67,7 @@ namespace llvm {
     VNInfo(unsigned i, const VNInfo &orig) : id(i), def(orig.def) {}
 
     /// Copy from the parameter into this VNInfo.
-    void copyFrom(const VNInfo &src) {
-      def = src.def;
-    }
+    void copyFrom(const VNInfo &src) { def = src.def; }
 
     /// Returns true if this value is defined by a PHI instruction (or was,
     /// PHI instructions may have been eliminated).
diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index 4963343014..e724ff56d1 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -228,9 +228,7 @@ struct DemandedFields {
   }
 
   // Return true if any property of VL was used
-  bool usedVL() const {
-    return VLAny || VLZeroness;
-  }
+  bool usedVL() const { return VLAny || VLZeroness; }
 
   // Mark all VTYPE subfields and properties as demanded
   void demandVTYPE() {

``````````

</details>


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


More information about the llvm-commits mailing list