LLVM 20.0.0git
|
#include "AArch64TargetTransformInfo.h"
#include "AArch64ExpandImm.h"
#include "AArch64PerfectShuffle.h"
#include "MCTargetDesc/AArch64AddressingModes.h"
#include "Utils/AArch64SMEAttributes.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Analysis/IVDescriptors.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/BasicTTIImpl.h"
#include "llvm/CodeGen/CostTable.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAArch64.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/InstCombine/InstCombiner.h"
#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
#include <algorithm>
#include <optional>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "aarch64tti" |
Variables | |
static cl::opt< bool > | EnableFalkorHWPFUnrollFix ("enable-falkor-hwpf-unroll-fix", cl::init(true), cl::Hidden) |
static cl::opt< unsigned > | SVEGatherOverhead ("sve-gather-overhead", cl::init(10), cl::Hidden) |
static cl::opt< unsigned > | SVEScatterOverhead ("sve-scatter-overhead", cl::init(10), cl::Hidden) |
static cl::opt< unsigned > | SVETailFoldInsnThreshold ("sve-tail-folding-insn-threshold", cl::init(15), cl::Hidden) |
static cl::opt< unsigned > | NeonNonConstStrideOverhead ("neon-nonconst-stride-overhead", cl::init(10), cl::Hidden) |
static cl::opt< unsigned > | CallPenaltyChangeSM ("call-penalty-sm-change", cl::init(5), cl::Hidden, cl::desc("Penalty of calling a function that requires a change to PSTATE.SM")) |
static cl::opt< unsigned > | InlineCallPenaltyChangeSM ("inline-call-penalty-sm-change", cl::init(10), cl::Hidden, cl::desc("Penalty of inlining a call that requires a change to PSTATE.SM")) |
static cl::opt< bool > | EnableOrLikeSelectOpt ("enable-aarch64-or-like-select", cl::init(true), cl::Hidden) |
static cl::opt< bool > | EnableLSRCostOpt ("enable-aarch64-lsr-cost-opt", cl::init(true), cl::Hidden) |
static cl::opt< unsigned > | BaseHistCntCost ("aarch64-base-histcnt-cost", cl::init(8), cl::Hidden, cl::desc("The cost of a histcnt instruction")) |
static cl::opt< unsigned > | DMBLookaheadThreshold ("dmb-lookahead-threshold", cl::init(10), cl::Hidden, cl::desc("The number of instructions to search for a redundant dmb")) |
TailFoldingOption | TailFoldingOptionLoc |
cl::opt< TailFoldingOption, true, cl::parser< std::string > > | SVETailFolding ("sve-tail-folding", cl::desc("Control the use of vectorisation using tail-folding for SVE where the" " option is specified in the form (Initial)[+(Flag1|Flag2|...)]:" "\ndisabled (Initial) No loop types will vectorize using " "tail-folding" "\ndefault (Initial) Uses the default tail-folding settings for " "the target CPU" "\nall (Initial) All legal loop types will vectorize using " "tail-folding" "\nsimple (Initial) Use tail-folding for simple loops (not " "reductions or recurrences)" "\nreductions Use tail-folding for loops containing reductions" "\nnoreductions Inverse of above" "\nrecurrences Use tail-folding for loops containing fixed order " "recurrences" "\nnorecurrences Inverse of above" "\nreverse Use tail-folding for loops requiring reversed " "predicates" "\nnoreverse Inverse of above"), cl::location(TailFoldingOptionLoc)) |
static cl::opt< bool > | EnableFixedwidthAutovecInStreamingMode ("enable-fixedwidth-autovec-in-streaming-mode", cl::init(false), cl::Hidden) |
static cl::opt< bool > | EnableScalableAutovecInStreamingMode ("enable-scalable-autovec-in-streaming-mode", cl::init(false), cl::Hidden) |
#define DEBUG_TYPE "aarch64tti" |
Definition at line 33 of file AArch64TargetTransformInfo.cpp.
Check if Ext1 and Ext2 are extends of the same type, doubling the bitwidth of the vector elements.
Definition at line 5056 of file AArch64TargetTransformInfo.cpp.
References llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_ZExtOrSExt(), and llvm::PatternMatch::match().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands(), and llvm::ARMTTIImpl::isProfitableToSinkOperands().
Check if both Op1 and Op2 are shufflevector extracts of either the lower or upper half of the vector elements.
Definition at line 4996 of file AArch64TargetTransformInfo.cpp.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), llvm::Type::getPrimitiveSizeInBits(), llvm::Value::getType(), llvm::ShuffleVectorInst::isExtractSubvectorMask(), llvm::Type::isScalableTy(), isSplatShuffle(), llvm::M1(), llvm::PatternMatch::m_Shuffle(), llvm::PatternMatch::m_Undef(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
Check if Op1 and Op2 could be used with vmull_high_p64 intrinsic.
Definition at line 5083 of file AArch64TargetTransformInfo.cpp.
References isOperandOfVmullHighP64().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
|
static |
Definition at line 4866 of file AArch64TargetTransformInfo.cpp.
References llvm::LoopBase< BlockT, LoopT >::blocks(), llvm::getLoadStorePointerOperand(), llvm::getLoadStoreType(), llvm::getPtrStride(), I, and Ptr.
Referenced by llvm::AArch64TTIImpl::preferPredicateOverEpilogue().
|
static |
For Apple CPUs, we want to runtime-unroll loops to make better use if the OOO engine's wide instruction window and various predictors.
Definition at line 4052 of file AArch64TargetTransformInfo.cpp.
References llvm::SmallPtrSetImpl< PtrType >::contains(), llvm::TargetTransformInfo::UnrollingPreferences::DefaultUnrollRuntimeCount, llvm::findStringMetadataForLoop(), llvm::ScalarEvolution::getBackedgeTakenCount(), llvm::TargetTransformInfo::getInstructionCost(), llvm::getLoadStorePointerOperand(), llvm::ScalarEvolution::getSCEV(), llvm::ScalarEvolution::getSmallConstantMaxTripCount(), llvm::InstructionCost::getValue(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::ScalarEvolution::isLoopInvariant(), llvm::none_of(), Operands, Ptr, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::TargetTransformInfo::UnrollingPreferences::Runtime, llvm::TargetTransformInfo::UnrollingPreferences::SCEVExpansionBudget, Size, and llvm::TargetTransformInfo::TCK_CodeSize.
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Definition at line 4002 of file AArch64TargetTransformInfo.cpp.
References llvm::dbgs(), llvm::LoadInst::getPointerOperand(), llvm::ScalarEvolution::getSCEV(), I, llvm::SCEVAddRecExpr::isAffine(), LLVM_DEBUG, llvm::Log2_32(), and llvm::TargetTransformInfo::UnrollingPreferences::MaxCount.
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Definition at line 514 of file AArch64TargetTransformInfo.cpp.
References BaseHistCntCost, llvm::IntrinsicCostAttributes::getArgTypes(), llvm::InstructionCost::getInvalid(), llvm::Type::getScalarSizeInBits(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::isPowerOf2_64(), and llvm::AArch64::SVEBitsPerBlock.
Referenced by llvm::AArch64TTIImpl::getIntrinsicInstrCost().
|
static |
Definition at line 3789 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm_unreachable, SVEGatherOverhead, and SVEScatterOverhead.
Referenced by llvm::AArch64TTIImpl::getGatherScatterOpCost().
Returns true if the function has explicit operations that can only be lowered using incompatible instructions for the selected mode.
This also returns true if the function F may use or modify ZA state.
Definition at line 232 of file AArch64TargetTransformInfo.cpp.
References F, I, and isSMEABIRoutineCall().
Referenced by llvm::AArch64TTIImpl::areInlineCompatible().
|
static |
Definition at line 1028 of file AArch64TargetTransformInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::Value::getType(), II, llvm::SmallVectorImpl< T >::insert(), processPhiNode(), llvm::InstCombiner::replaceInstUsesWith(), and tryCombineFromSVBoolBinOp().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2167 of file AArch64TargetTransformInfo.cpp.
References DMBLookaheadThreshold, llvm::InstCombiner::eraseInstFromFunction(), I, and II.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1921 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateGEP(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::ConstantAggregateZero::get(), llvm::PointerType::getUnqual(), II, instCombineSVENoActiveZero(), llvm::PatternMatch::m_SpecificInt(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), Ptr, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2113 of file AArch64TargetTransformInfo.cpp.
References A, B, II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1425 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::Type::getInt32Ty(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1955 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateGEP(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::InstCombiner::eraseInstFromFunction(), llvm::Value::getType(), llvm::PointerType::getUnqual(), II, llvm::PatternMatch::m_SpecificInt(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and Ptr.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1646 of file AArch64TargetTransformInfo.cpp.
References llvm::Intrinsic::getOrInsertDeclaration(), II, llvm::PatternMatch::match(), and llvm::Mod.
Referenced by instCombineSVEAllOrNoActive().
|
static |
Definition at line 1663 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEAllActive(), llvm::PatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), instCombineSVEVectorAdd(), instCombineSVEVectorFAdd(), instCombineSVEVectorFSub(), and instCombineSVEVectorSub().
|
static |
Definition at line 1113 of file AArch64TargetTransformInfo.cpp.
References llvm::UndefValue::get(), II, instCombineSVENoActiveReplace(), isAllActivePredicate(), and llvm::InstCombiner::replaceOperand().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1205 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::ScalableVectorType::get(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::getSplatValue(), I, II, instCombineSVENoActiveZero(), llvm::InstCombiner::replaceInstUsesWith(), llvm::AArch64::SVEBitsPerBlock, and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1441 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateVScale(), llvm::getNumElementsFromSVEPredPattern(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1383 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateIntrinsic(), Fallback, llvm::VectorType::get(), getBitWidth(), llvm::IRBuilderBase::getDoubleTy(), llvm::IRBuilderBase::getFloatTy(), llvm::IRBuilderBase::getHalfTy(), llvm::Value::getType(), II, llvm::Type::isIntegerTy(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1171 of file AArch64TargetTransformInfo.cpp.
References llvm::InsertElementInst::Create(), llvm::Type::getInt64Ty(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2051 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::IRBuilderBase::CreateInsertElement(), llvm::IRBuilderBase::CreateInsertVector(), llvm::IRBuilderBase::CreateShuffleVector(), llvm::Default, llvm::ScalableVectorType::get(), llvm::PoisonValue::get(), llvm::ConstantAggregateZero::get(), llvm::IRBuilderBase::getInt32Ty(), llvm::IRBuilderBase::getInt64(), llvm::IRBuilderBase::getInt64Ty(), llvm::IRBuilderBase::getIntNTy(), llvm::Value::getType(), I, Idx, II, llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), SimplifyValuePattern(), and llvm::SmallVectorBase< Size_T >::size().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1195 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateVectorSplat(), II, llvm::InstCombiner::replaceInstUsesWith(), RetTy, and llvm::Splat.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2157 of file AArch64TargetTransformInfo.cpp.
References llvm::getSplatValue(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1309 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::CallingConv::C, llvm::ExtractElementInst::Create(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::BinaryOperator::CreateWithCopiedFlags(), llvm::Type::getInt64Ty(), llvm::getNumElementsFromSVEPredPattern(), llvm::getSplatValue(), llvm::Value::getType(), Idx, II, llvm::isSplatValue(), LHS, llvm::PatternMatch::m_BinOp(), llvm::PatternMatch::m_OneUse(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), and RHS.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1572 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::Instruction::copyMetadata(), llvm::IRBuilderBase::CreateLoad(), llvm::IRBuilderBase::CreateMaskedLoad(), DL, llvm::ConstantAggregateZero::get(), llvm::Value::getPointerAlignment(), II, instCombineSVENoActiveZero(), isAllActivePredicate(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1099 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::eraseInstFromFunction(), II, llvm::PatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), and instCombineSVEAllOrNoActiveUnary().
|
static |
Definition at line 1125 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::eraseInstFromFunction(), II, llvm::PatternMatch::m_ZeroInt(), and llvm::PatternMatch::match().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1136 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::eraseInstFromFunction(), llvm::ConstantStruct::get(), II, llvm::PatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::InstCombiner::replaceInstUsesWith(), and RetTy.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineSVECmpNE(), and instCombineSVELD1().
|
static |
Definition at line 1459 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::Value::getType(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1984 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::getInt32Ty(), llvm::APInt::getSExtValue(), llvm::getSplatValue(), llvm::ConstantInt::getValue(), II, llvm::APInt::isNegatedPowerOf2(), llvm::APInt::isPowerOf2(), llvm::APInt::logBase2(), llvm::APInt::negate(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1159 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateSelect(), II, isAllActivePredicate(), llvm::InstCombiner::replaceInstUsesWith(), and Select.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2123 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), II, isAllActivePredicate(), llvm::PatternMatch::m_NonNegative(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1595 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::Instruction::copyMetadata(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::IRBuilderBase::CreateStore(), DL, llvm::InstCombiner::eraseInstFromFunction(), llvm::Value::getPointerAlignment(), II, and isAllActivePredicate().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1852 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::getSplatValue(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1832 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntCast(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::getSplatValue(), II, llvm::InstCombiner::replaceInstUsesWith(), RetTy, and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1875 of file AArch64TargetTransformInfo.cpp.
References A, B, llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateInsertVector(), llvm::PoisonValue::get(), llvm::ScalableVectorType::getDoubleElementsVectorType(), llvm::IRBuilderBase::getInt64(), II, llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), RetTy, and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1673 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEAllOrNoActive(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1626 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateBinOp(), II, intrinsicIDToBinOpCode(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::IRBuilderBase::setFastMathFlags().
Referenced by instCombineSVEVectorFAddU(), instCombineSVEVectorFSubU(), and instCombineSVEVectorMul().
|
static |
Definition at line 1690 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEAllOrNoActive(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1713 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEVectorBinOp(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1733 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEAllOrNoActive(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1756 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEVectorBinOp(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1529 of file AArch64TargetTransformInfo.cpp.
References llvm::FastMathFlags::allowContract(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), getFastMathFlags(), II, llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::Mul, P, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), instCombineSVEVectorAdd(), instCombineSVEVectorFAdd(), instCombineSVEVectorFAddU(), instCombineSVEVectorFSub(), instCombineSVEVectorFSubU(), and instCombineSVEVectorSub().
|
static |
Definition at line 1787 of file AArch64TargetTransformInfo.cpp.
References llvm::getSplatValue(), I, II, instCombineSVEVectorBinOp(), llvm::PatternMatch::m_FPOne(), llvm::PatternMatch::m_One(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1775 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEAllOrNoActive(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1905 of file AArch64TargetTransformInfo.cpp.
References A, B, II, llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1612 of file AArch64TargetTransformInfo.cpp.
Referenced by instCombineSVEVectorBinOp().
Definition at line 1080 of file AArch64TargetTransformInfo.cpp.
References llvm::Value::getType(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Check if Op could be used with vmull_high_p64 intrinsic.
Definition at line 5072 of file AArch64TargetTransformInfo.cpp.
References llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_ExtractElt(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by areOperandsOfVmullHighP64().
Definition at line 219 of file AArch64TargetTransformInfo.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), F, and llvm::CallBase::getCalledFunction().
Referenced by hasPossibleIncompatibleOps().
Definition at line 4988 of file AArch64TargetTransformInfo.cpp.
References llvm::all_equal().
Referenced by areExtractShuffleVectors(), and llvm::AArch64TTIImpl::isProfitableToSinkOperands().
Definition at line 509 of file AArch64TargetTransformInfo.cpp.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::EVT::getSizeInBits(), llvm::EVT::isScalableVector(), and llvm::AArch64::SVEBitsPerBlock.
Referenced by llvm::AArch64TTIImpl::getIntrinsicInstrCost().
|
static |
The function will remove redundant reinterprets casting in the presence of the control flow.
Definition at line 933 of file AArch64TargetTransformInfo.cpp.
References llvm::PHINode::addIncoming(), assert(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreatePHI(), I, II, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::IRBuilderBase::SetInsertPoint().
Referenced by instCombineConvertFromSVBool().
|
static |
Definition at line 5087 of file AArch64TargetTransformInfo.cpp.
References llvm::sampleprof::Base, GEP, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
|
static |
We want to sink following cases: (add|sub|gep) A, ((mul|shl) vscale, imm); (add|sub|gep) A, vscale; (add|sub|gep) A, ((mul|shl) zext(vscale), imm);.
Definition at line 5115 of file AArch64TargetTransformInfo.cpp.
References llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Mul(), llvm::PatternMatch::m_Shl(), llvm::PatternMatch::m_VScale(), llvm::PatternMatch::m_ZExt(), llvm::PatternMatch::match(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
bool SimplifyValuePattern | ( | SmallVector< Value * > & | Vec, |
bool | AllowPoison | ||
) |
Definition at line 2022 of file AArch64TargetTransformInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::isPowerOf2_64(), LHS, llvm::SmallVectorImpl< T >::resize(), RHS, SimplifyValuePattern(), and llvm::SmallVectorBase< Size_T >::size().
Referenced by instCombineSVEDupqLane(), and SimplifyValuePattern().
|
static |
Definition at line 979 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), II, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by instCombineConvertFromSVBool().
|
static |
Referenced by getHistogramCost().
|
static |
Referenced by llvm::AArch64TTIImpl::getInlineCallPenalty().
|
static |
Referenced by instCombineDMB().
|
static |
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Referenced by llvm::AArch64TTIImpl::getRegisterBitWidth().
|
static |
Referenced by llvm::AArch64TTIImpl::isLSRCostLess().
|
static |
Referenced by llvm::AArch64TTIImpl::shouldTreatInstructionLikeSelect().
|
static |
Referenced by llvm::AArch64TTIImpl::getInlineCallPenalty().
|
static |
Referenced by llvm::AArch64TTIImpl::getAddressComputationCost().
|
static |
Referenced by getSVEGatherScatterOverhead().
|
static |
Referenced by getSVEGatherScatterOverhead().
cl::opt< TailFoldingOption, true, cl::parser< std::string > > SVETailFolding("sve-tail-folding", cl::desc( "Control the use of vectorisation using tail-folding for SVE where the" " option is specified in the form (Initial)[+(Flag1|Flag2|...)]:" "\ndisabled (Initial) No loop types will vectorize using " "tail-folding" "\ndefault (Initial) Uses the default tail-folding settings for " "the target CPU" "\nall (Initial) All legal loop types will vectorize using " "tail-folding" "\nsimple (Initial) Use tail-folding for simple loops (not " "reductions or recurrences)" "\nreductions Use tail-folding for loops containing reductions" "\nnoreductions Inverse of above" "\nrecurrences Use tail-folding for loops containing fixed order " "recurrences" "\nnorecurrences Inverse of above" "\nreverse Use tail-folding for loops requiring reversed " "predicates" "\nnoreverse Inverse of above"), cl::location(TailFoldingOptionLoc)) | ( | "sve-tail-folding" | , |
cl::desc( "Control the use of vectorisation using tail-folding for SVE where the" " option is specified in the form (Initial)[+(Flag1|Flag2|...)]:" "\ndisabled (Initial) No loop types will vectorize using " "tail-folding" "\ndefault (Initial) Uses the default tail-folding settings for " "the target CPU" "\nall (Initial) All legal loop types will vectorize using " "tail-folding" "\nsimple (Initial) Use tail-folding for simple loops (not " "reductions or recurrences)" "\nreductions Use tail-folding for loops containing reductions" "\nnoreductions Inverse of above" "\nrecurrences Use tail-folding for loops containing fixed order " "recurrences" "\nnorecurrences Inverse of above" "\nreverse Use tail-folding for loops requiring reversed " "predicates" "\nnoreverse Inverse of above") | , | ||
cl::location(TailFoldingOptionLoc) | |||
) |
|
static |
Referenced by llvm::AArch64TTIImpl::preferPredicateOverEpilogue().
TailFoldingOption TailFoldingOptionLoc |
Definition at line 182 of file AArch64TargetTransformInfo.cpp.
Referenced by llvm::AArch64TTIImpl::preferPredicateOverEpilogue().