[llvm] [RISCV][VLOPT] Compute demanded VLs up front (PR #124530)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 04:06:59 PST 2025


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 db6fa74dfea30c025e5d4c30ca4e31e20b69b04d 7fe39a249122f6796cf75bf25bd9de3f2bb75529 --extensions cpp -- llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index b049c87c27..bbbada1d76 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -1343,7 +1343,6 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
 
   TII = ST.getInstrInfo();
 
-
   // For each instruction that defines a vector, compute what VL its
   // downstream users demand.
   for (MachineBasicBlock *MBB : post_order(&MF)) {
@@ -1353,7 +1352,7 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
       if (!isCandidate(MI))
         continue;
       if (auto DemandedVL = checkUsers(MI))
-	DemandedVLs.insert({&MI, *DemandedVL});
+        DemandedVLs.insert({&MI, *DemandedVL});
     }
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list