[llvm] d0f3943 - [RISCV] Remove -riscv-disable-insert-vsetvl-phi-opt flag (#97991)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 21:11:11 PDT 2024


Author: Luke Lau
Date: 2024-07-09T12:11:08+08:00
New Revision: d0f3943a027347685905080f6f5ee423b1c8714a

URL: https://github.com/llvm/llvm-project/commit/d0f3943a027347685905080f6f5ee423b1c8714a
DIFF: https://github.com/llvm/llvm-project/commit/d0f3943a027347685905080f6f5ee423b1c8714a.diff

LOG: [RISCV] Remove -riscv-disable-insert-vsetvl-phi-opt flag (#97991)

This flag was added in https://reviews.llvm.org/D103277 out of
precaution, but it's been enabled by default for 3 years now and I
haven't seen any miscompiles upstream stemming from needVSETVLIPHI. This
would remove it just to simplify the number of configurations.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index a92118b1444b8..67e1b76cd304f 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -41,10 +41,6 @@ using namespace llvm;
 STATISTIC(NumInsertedVSETVL, "Number of VSETVL inst inserted");
 STATISTIC(NumCoalescedVSETVL, "Number of VSETVL inst coalesced");
 
-static cl::opt<bool> DisableInsertVSETVLPHIOpt(
-    "riscv-disable-insert-vsetvl-phi-opt", cl::init(false), cl::Hidden,
-    cl::desc("Disable looking through phis when inserting vsetvlis."));
-
 namespace {
 
 /// Given a virtual register \p Reg, return the corresponding VNInfo for it.
@@ -1364,9 +1360,6 @@ void RISCVInsertVSETVLI::computeIncomingVLVTYPE(const MachineBasicBlock &MBB) {
 // outputs from the last VSETVLI in their respective basic blocks.
 bool RISCVInsertVSETVLI::needVSETVLIPHI(const VSETVLIInfo &Require,
                                         const MachineBasicBlock &MBB) const {
-  if (DisableInsertVSETVLPHIOpt)
-    return true;
-
   if (!Require.hasAVLReg())
     return true;
 


        


More information about the llvm-commits mailing list