Skip to content

Commit 5c126e3

Browse files
committed
[RISCV] Remove RISCVSubtarget::getArchMinVLen()/getArchMaxVLen().
Fold them into their only callers, getRealMinVLen()/getArchMaxVLen(). It is unclear right now when these are needed so removing to discourage misuse. Between Zvl*b extensions, vector length command line options, and vscale range, we have several ways to influence vector length. We need to try to keep all code on the same page.
1 parent 73712c8 commit 5c126e3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

llvm/lib/Target/RISCV/RISCVSubtarget.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
126126
}
127127
unsigned getRealMinVLen() const {
128128
unsigned VLen = getMinRVVVectorSizeInBits();
129-
return VLen == 0 ? getArchMinVLen() : VLen;
129+
return VLen == 0 ? ZvlLen : VLen;
130130
}
131131
unsigned getRealMaxVLen() const {
132132
unsigned VLen = getMaxRVVVectorSizeInBits();
133-
return VLen == 0 ? getArchMaxVLen() : VLen;
133+
return VLen == 0 ? 65536 : VLen;
134134
}
135135
RISCVABI::ABI getTargetABI() const { return TargetABI; }
136136
bool isRegisterReservedByUser(Register i) const {
@@ -170,11 +170,6 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
170170
unsigned getMaxRVVVectorSizeInBits() const;
171171
unsigned getMinRVVVectorSizeInBits() const;
172172

173-
// Return the known range for the bit length of RVV data registers as indicated
174-
// by -march and -mattr.
175-
unsigned getArchMinVLen() const { return ZvlLen; }
176-
unsigned getArchMaxVLen() const { return 65536; }
177-
178173
public:
179174
const CallLowering *getCallLowering() const override;
180175
InstructionSelector *getInstructionSelector() const override;

0 commit comments

Comments
 (0)