Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21387,14 +21387,6 @@ A vector operation ``<opcode>`` on vectors ``A`` and ``B`` calculates:
A <opcode> B = { A[i] <opcode> B[i] M[i] = True, and
{ undef otherwise

Optimization Hint
^^^^^^^^^^^^^^^^^

Some targets, such as AVX512, do not support the %evl parameter in hardware.
The use of an effective %evl is discouraged for those targets. The function
``TargetTransformInfo::hasActiveVectorLength()`` returns true when the target
has native support for %evl.

.. _int_vp_select:

'``llvm.vp.select.*``' Intrinsics
Expand Down
8 changes: 0 additions & 8 deletions llvm/include/llvm/Analysis/TargetTransformInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1860,13 +1860,6 @@ class TargetTransformInfo {
/// \return true when scalable vectorization is preferred.
LLVM_ABI bool enableScalableVectorization() const;

/// \name Vector Predication Information
/// @{
/// Whether the target supports the %evl parameter of VP intrinsic efficiently
/// in hardware. (see LLVM Language Reference - "Vector Predication
/// Intrinsics"). Use of %evl is discouraged when that is not the case.
LLVM_ABI bool hasActiveVectorLength() const;

/// Return true if sinking I's operands to the same basic block as I is
/// profitable, e.g. because the operands can be folded into a target
/// instruction during instruction selection. After calling the function
Expand Down Expand Up @@ -1915,7 +1908,6 @@ class TargetTransformInfo {
/// transformed.
LLVM_ABI VPLegalization
getVPLegalizationStrategy(const VPIntrinsic &PI) const;
/// @}

/// \returns Whether a 32-bit branch instruction is available in Arm or Thumb
/// state.
Expand Down
2 changes: 0 additions & 2 deletions llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,6 @@ class TargetTransformInfoImplBase {

virtual bool enableScalableVectorization() const { return false; }

virtual bool hasActiveVectorLength() const { return false; }

virtual bool isProfitableToSinkOperands(Instruction *I,
SmallVectorImpl<Use *> &Ops) const {
return false;
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/Analysis/TargetTransformInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1461,10 +1461,6 @@ bool TargetTransformInfo::enableScalableVectorization() const {
return TTIImpl->enableScalableVectorization();
}

bool TargetTransformInfo::hasActiveVectorLength() const {
return TTIImpl->hasActiveVectorLength();
}

bool TargetTransformInfo::isProfitableToSinkOperands(
Instruction *I, SmallVectorImpl<Use *> &OpsToSink) const {
return TTIImpl->isProfitableToSinkOperands(I, OpsToSink);
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,6 @@ RISCVTTIImpl::getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx,
return TTI::TCC_Free;
}

bool RISCVTTIImpl::hasActiveVectorLength() const {
return ST->hasVInstructions();
}

TargetTransformInfo::PopcntSupportKind
RISCVTTIImpl::getPopcntSupport(unsigned TyWidth) const {
assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
Expand Down
9 changes: 0 additions & 9 deletions llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@ class RISCVTTIImpl final : public BasicTTIImplBase<RISCVTTIImpl> {
getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
Type *Ty, TTI::TargetCostKind CostKind) const override;

/// \name EVL Support for predicated vectorization.
/// Whether the target supports the %evl parameter of VP intrinsic efficiently
/// in hardware. (see LLVM Language Reference - "Vector Predication
/// Intrinsics",
/// https://llvm.org/docs/LangRef.html#vector-predication-intrinsics and
/// "IR-level VP intrinsics",
/// https://llvm.org/docs/Proposals/VectorPredication.html#ir-level-vp-intrinsics).
bool hasActiveVectorLength() const override;

TargetTransformInfo::PopcntSupportKind
getPopcntSupport(unsigned TyWidth) const override;

Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,7 @@ class LoopVectorizationCostModel {
return;
// Override EVL styles if needed.
// FIXME: Investigate opportunity for fixed vector factor.
bool EVLIsLegal = UserIC <= 1 && IsScalableVF &&
TTI.hasActiveVectorLength() && !EnableVPlanNativePath;
bool EVLIsLegal = UserIC <= 1 && IsScalableVF && !EnableVPlanNativePath;
if (EVLIsLegal)
return;
// If for some reason EVL mode is unsupported, fallback to a scalar epilogue
Expand Down