|
LLVM 24.0.0git
|
#include "AArch64TargetTransformInfo.h"#include "AArch64ExpandImm.h"#include "AArch64PerfectShuffle.h"#include "AArch64SMEAttributes.h"#include "MCTargetDesc/AArch64AddressingModes.h"#include "llvm/ADT/BitmaskEnum.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/bit.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/DerivedTypes.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/TargetParser/AArch64TargetParser.h"#include "llvm/Transforms/InstCombine/InstCombiner.h"#include "llvm/Transforms/Utils/UnrollLoop.h"#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"#include <algorithm>#include <optional>Go to the source code of this file.
Classes | |
| struct | SVEIntrinsicInfo |
Macros | |
| #define | DEBUG_TYPE "aarch64tti" |
Enumerations | |
| enum class | StreamingIncompatibility : uint8_t { None = 0 , VScaleDependent = 1 << 0 , HasIncompatibleInstruction = 1 << 1 , FullyIncompatible = VScaleDependent | HasIncompatibleInstruction } |
Variables | |
| TailFoldingOption | TailFoldingOptionLoc |
| static 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)) |
| #define DEBUG_TYPE "aarch64tti" |
Definition at line 37 of file AArch64TargetTransformInfo.cpp.
|
strong |
| Enumerator | |
|---|---|
| None | |
| VScaleDependent | |
| HasIncompatibleInstruction | |
| FullyIncompatible | |
Definition at line 177 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 7812 of file AArch64TargetTransformInfo.cpp.
References llvm::cast(), 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 7752 of file AArch64TargetTransformInfo.cpp.
References llvm::cast(), 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 7839 of file AArch64TargetTransformInfo.cpp.
References isOperandOfVmullHighP64().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
|
static |
Definition at line 1720 of file AArch64TargetTransformInfo.cpp.
References llvm::all_of(), SVEIntrinsicInfo::defaultMergingOp(), SVEIntrinsicInfo::defaultMergingUnaryNarrowingTopOp(), SVEIntrinsicInfo::defaultMergingUnaryOp(), SVEIntrinsicInfo::defaultUndefOp(), SVEIntrinsicInfo::defaultVoidOp(), SVEIntrinsicInfo::defaultZeroingOp(), llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, II, llvm::isa(), SVEIntrinsicInfo::setCmpPredicate(), and SVEIntrinsicInfo::setMatchingIROpcode().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 7572 of file AArch64TargetTransformInfo.cpp.
References llvm::LoopBase< BlockT, LoopT >::blocks(), llvm::getLoadStorePointerOperand(), llvm::getLoadStoreType(), llvm::getPtrStride(), I, and llvm::isa().
Referenced by llvm::AArch64TTIImpl::preferTailFoldingOverEpilogue().
|
static |
Definition at line 298 of file AArch64TargetTransformInfo.cpp.
References F, and llvm::StringRef::split().
Referenced by llvm::AArch64TTIImpl::getFeatureMask(), and llvm::AArch64TTIImpl::getPriorityMask().
|
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 6304 of file AArch64TargetTransformInfo.cpp.
References llvm::TargetTransformInfo::UnrollingPreferences::AddAdditionalAccumulators, llvm::any_of(), llvm::cast(), llvm::SmallPtrSetImpl< PtrType >::contains(), llvm::TargetTransformInfo::UnrollingPreferences::DefaultUnrollRuntimeCount, llvm::Depth, llvm::dyn_cast(), llvm::findStringMetadataForLoop(), llvm::ScalarEvolution::getBackedgeTakenCount(), llvm::getLoadStorePointerOperand(), llvm::ScalarEvolution::getSCEV(), llvm::ScalarEvolution::getSmallConstantMaxTripCount(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), llvm::ScalarEvolution::getSymbolicMaxBackedgeTakenCount(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::is_contained(), llvm::isa(), llvm::ScalarEvolution::isLoopInvariant(), isLoopSizeWithinBudget(), llvm::PatternMatch::m_Br(), llvm::PatternMatch::m_ICmp(), llvm::PatternMatch::m_Instruction(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::TargetTransformInfo::UnrollingPreferences::MaxCount, llvm::none_of(), llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::predecessors(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::TargetTransformInfo::UnrollingPreferences::Runtime, llvm::TargetTransformInfo::UnrollingPreferences::SCEVExpansionBudget, Size, and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Returns an enum describing whether I is an instruction that is incompatible in the mode of the caller.
Definition at line 188 of file AArch64TargetTransformInfo.cpp.
References llvm::any_of(), llvm::cast(), llvm::dyn_cast(), FullyIncompatible, I, II, llvm::isa(), llvm::Intrinsic::isTargetIntrinsic(), None, and VScaleDependent.
Referenced by hasPossibleIncompatibleOps().
|
static |
Definition at line 6189 of file AArch64TargetTransformInfo.cpp.
References llvm::dbgs(), llvm::dyn_cast(), 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 659 of file AArch64TargetTransformInfo.cpp.
References llvm::dyn_cast(), llvm::IntrinsicCostAttributes::getArgTypes(), llvm::InstructionCost::getInvalid(), llvm::Type::getScalarSizeInBits(), InstructionCost, llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::isPowerOf2_64(), and llvm::AArch64::SVEBitsPerBlock.
Referenced by llvm::AArch64TTIImpl::getIntrinsicInstrCost().
|
static |
Definition at line 5774 of file AArch64TargetTransformInfo.cpp.
References assert(), and llvm_unreachable.
Referenced by llvm::AArch64TTIImpl::getGatherScatterOpCost().
|
static |
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 234 of file AArch64TargetTransformInfo.cpp.
References llvm::any_of(), C(), CallAttrs, llvm::dyn_cast(), F, getCompatibilityForChangeToStreamingMode(), llvm::TargetLoweringBase::getRuntimeLibcallsInfo(), HasIncompatibleInstruction, I, llvm::isa(), T, and VScaleDependent.
Referenced by llvm::AArch64TTIImpl::areInlineCompatible().
|
static |
Definition at line 2420 of file AArch64TargetTransformInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::cast(), llvm::dyn_cast(), II, llvm::SmallVectorImpl< T >::insert(), llvm::isa(), processPhiNode(), llvm::InstCombiner::replaceInstUsesWith(), and tryCombineFromSVBoolBinOp().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3496 of file AArch64TargetTransformInfo.cpp.
References llvm::dyn_cast_or_null(), llvm::InstCombiner::eraseInstFromFunction(), I, and II.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3560 of file AArch64TargetTransformInfo.cpp.
References llvm::ConstantInt::getBool(), llvm::SMEAttrs::hasStreamingCompatibleInterface(), llvm::SMEAttrs::hasStreamingInterfaceOrBody(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3258 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateGEP(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::ConstantAggregateZero::get(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_One(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3441 of file AArch64TargetTransformInfo.cpp.
References A(), B(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3529 of file AArch64TargetTransformInfo.cpp.
References llvm::cast(), llvm::ConstantInt::getTrue(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2791 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::ConstantInt::getTrue(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2821 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateElementCount(), llvm::ElementCount::getScalable(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3286 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateGEP(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::InstCombiner::eraseInstFromFunction(), llvm::Value::getType(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_One(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3615 of file AArch64TargetTransformInfo.cpp.
References A(), llvm::sampleprof::Base, llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::Constant::getNullValue(), II, LHS, llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), RHS, llvm::Sub, and uint64_t.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2579 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::dyn_cast(), llvm::dyn_cast_or_null(), llvm::ScalableVectorType::get(), llvm::Type::getInt1Ty(), llvm::Constant::getNullValue(), llvm::getSplatValue(), llvm::ConstantInt::getTrue(), I, II, instCombineXorSVECmpCC(), instCombineZExtSVECmpNE(), llvm::isa(), isAllActivePredicate(), llvm::InstCombiner::replaceInstUsesWith(), llvm::AArch64::SVEBitsPerBlock, and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2802 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateElementCount(), llvm::getNumElementsFromSVEPredPattern(), llvm::ElementCount::getScalable(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2749 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateIntrinsic(), Fallback, llvm::VectorType::get(), getBitWidth(), llvm::IRBuilderBase::getDoubleTy(), llvm::IRBuilderBase::getFloatTy(), llvm::IRBuilderBase::getHalfTy(), llvm::Value::getType(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2484 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateInsertElement(), llvm::IRBuilderBase::CreateVectorSplat(), II, isAllActivePredicate(), llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_SpecificInt(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), llvm::Splat, and uint64_t.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3379 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::IRBuilderBase::CreateInsertElement(), llvm::IRBuilderBase::CreateInsertVector(), llvm::IRBuilderBase::CreateShuffleVector(), Default, llvm::dyn_cast(), llvm::ConstantAggregateZero::get(), llvm::PoisonValue::get(), llvm::ScalableVectorType::get(), llvm::IRBuilderBase::getInt32Ty(), llvm::IRBuilderBase::getInt64(), llvm::IRBuilderBase::getIntNTy(), llvm::Value::getType(), I, II, llvm::isa(), llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), SimplifyValuePattern(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and uint64_t.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2506 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateVectorSplat(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Splat.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3485 of file AArch64TargetTransformInfo.cpp.
References llvm::getSplatValue(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2675 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, C(), llvm::cast(), llvm::ExtractElementInst::Create(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::BinaryOperator::CreateWithCopiedFlags(), llvm::dyn_cast(), llvm::Type::getInt64Ty(), llvm::getNumElementsFromSVEPredPattern(), llvm::getSplatValue(), llvm::Value::getType(), II, llvm::isSplatValue(), LHS, llvm::PatternMatch::m_BinOp(), llvm::MIPatternMatch::m_OneUse(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), and RHS.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2947 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, isAllActivePredicate(), llvm::Load, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3595 of file AArch64TargetTransformInfo.cpp.
References A(), B(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_One(), llvm::MIPatternMatch::m_OneUse(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3042 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::dyn_cast_or_null(), llvm::InstCombiner::eraseInstFromFunction(), II, llvm::PatternMatch::m_c_Add(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_Zero(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::IRBuilderBase::SetInsertPoint().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2834 of file AArch64TargetTransformInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::dyn_cast(), 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 3312 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::dyn_cast_or_null(), 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 2472 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 3451 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), II, llvm::isa(), isAllActivePredicate(), llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_NonNegative(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2966 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, isAllActivePredicate(), and llvm::Store.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3189 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::dyn_cast_or_null(), llvm::getSplatValue(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3569 of file AArch64TargetTransformInfo.cpp.
References A(), B(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_One(), llvm::MIPatternMatch::m_OneUse(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3169 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateIntCast(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::getSplatValue(), II, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3539 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::APInt::getLowBitsSet(), II, llvm::isa(), isAllActivePredicate(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3212 of file AArch64TargetTransformInfo.cpp.
References A(), B(), llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateInsertVector(), llvm::PoisonValue::get(), llvm::ScalableVectorType::getDoubleElementsVectorType(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), llvm::Value::takeName(), and uint64_t.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3067 of file AArch64TargetTransformInfo.cpp.
References II, and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2997 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateBinOpFMF(), II, intrinsicIDToBinOpCode(), isAllActivePredicate(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), instCombineSVEVectorFAddU(), and instCombineSVEVectorFSubU().
|
static |
Definition at line 3081 of file AArch64TargetTransformInfo.cpp.
References II, and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3101 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEVectorBinOp(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3121 of file AArch64TargetTransformInfo.cpp.
References II, and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3141 of file AArch64TargetTransformInfo.cpp.
References II, instCombineSVEVectorBinOp(), and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2904 of file AArch64TargetTransformInfo.cpp.
References llvm::FastMathFlags::allowContract(), llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateIntrinsic(), getFastMathFlags(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), Mul, P, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), instCombineSVEVectorAdd(), instCombineSVEVectorFAdd(), instCombineSVEVectorFAddU(), instCombineSVEVectorFSub(), instCombineSVEVectorFSubU(), and instCombineSVEVectorSub().
|
static |
Definition at line 3013 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateAdd(), llvm::IRBuilderBase::CreateSub(), II, llvm::isa(), llvm::MIPatternMatch::m_AllOnes(), llvm::PatternMatch::m_One(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3160 of file AArch64TargetTransformInfo.cpp.
References II, and instCombineSVEVectorFuseMulAddSub().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3242 of file AArch64TargetTransformInfo.cpp.
References A(), B(), II, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 3520 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), II, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2518 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::InstCombiner::eraseInstFromFunction(), II, llvm::PatternMatch::m_c_Xor(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::IRBuilderBase::SetInsertPoint().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), and instCombineSVECmpNE().
|
static |
Definition at line 2555 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::InstCombiner::eraseInstFromFunction(), llvm::Value::getType(), II, isAllActivePredicate(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Zero(), llvm::PatternMatch::m_ZExt(), llvm::PatternMatch::match(), llvm::InstCombiner::replaceInstUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), and llvm::UMin.
Referenced by instCombineSVECmpNE().
|
static |
Definition at line 2983 of file AArch64TargetTransformInfo.cpp.
Referenced by instCombineSVEVectorBinOp().
Definition at line 2106 of file AArch64TargetTransformInfo.cpp.
References C(), llvm::cast(), llvm::dyn_cast(), llvm::Value::getType(), llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Definition at line 7889 of file AArch64TargetTransformInfo.cpp.
References llvm::PatternMatch::m_FNeg(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
|
static |
Definition at line 6240 of file AArch64TargetTransformInfo.cpp.
References llvm::InstructionCost::getValue(), I, Operands, and llvm::TargetTransformInfo::TCK_CodeSize.
Referenced by getAppleRuntimeUnrollPreferences(), and shouldUnrollMultiExitLoop().
Check if Op could be used with vmull_high_p64 intrinsic.
Definition at line 7828 of file AArch64TargetTransformInfo.cpp.
References llvm::cast(), llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::isa(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_ExtractElt(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by areOperandsOfVmullHighP64().
Definition at line 7744 of file AArch64TargetTransformInfo.cpp.
References llvm::all_equal(), and llvm::dyn_cast().
Referenced by areExtractShuffleVectors(), and llvm::AArch64TTIImpl::isProfitableToSinkOperands().
Definition at line 654 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 1449 of file AArch64TargetTransformInfo.cpp.
References llvm::PHINode::addIncoming(), assert(), llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreatePHI(), llvm::dyn_cast(), I, II, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::IRBuilderBase::SetInsertPoint().
Referenced by instCombineConvertFromSVBool().
|
static |
Definition at line 7843 of file AArch64TargetTransformInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::sampleprof::Base, llvm::cast(), llvm::dyn_cast(), GEP, and llvm::isa().
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 7871 of file AArch64TargetTransformInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::cast(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Mul(), llvm::PatternMatch::m_Shl(), llvm::PatternMatch::m_VScale(), llvm::PatternMatch::m_ZExt(), and llvm::PatternMatch::match().
Referenced by llvm::AArch64TTIImpl::isProfitableToSinkOperands().
|
static |
Definition at line 6267 of file AArch64TargetTransformInfo.cpp.
References llvm::any_of(), llvm::ScalarEvolution::getSmallConstantMaxTripCount(), llvm::ScalarEvolution::getSymbolicMaxBackedgeTakenCount(), llvm::BasicBlock::getTerminator(), llvm::isa(), isLoopSizeWithinBudget(), and llvm::ArrayRef< T >::size().
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Definition at line 2291 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::eraseInstFromFunction(), llvm::UndefValue::get(), SVEIntrinsicInfo::getGoverningPredicateOperandIdx(), SVEIntrinsicInfo::getMatchingIROpode(), SVEIntrinsicInfo::getMatchingUndefIntrinsic(), llvm::Constant::getNullValue(), SVEIntrinsicInfo::getOperandIdxInactiveLanesTakenFrom(), SVEIntrinsicInfo::getOperandIdxWithNoActiveLanes(), llvm::Intrinsic::getOrInsertDeclaration(), SVEIntrinsicInfo::hasGoverningPredicate(), SVEIntrinsicInfo::hasMatchingIROpode(), SVEIntrinsicInfo::hasMatchingUndefIntrinsic(), SVEIntrinsicInfo::hasOperandWithNoActiveLanes(), II, SVEIntrinsicInfo::inactiveLanesAreUnused(), SVEIntrinsicInfo::inactiveLanesTakenFromOperand(), llvm::isa(), isAllActivePredicate(), llvm::Instruction::isBinaryOp(), llvm::MIPatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), Opc, llvm::InstCombiner::replaceInstUsesWith(), llvm::InstCombiner::replaceOperand(), SVEIntrinsicInfo::resultIsZeroInitialized(), simplifySVEIntrinsicBinOp(), and simplifySVEIntrinsicCompare().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 2143 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateSelect(), DL, llvm::dyn_cast(), SVEIntrinsicInfo::getMatchingIROpode(), llvm::Constant::getNullValue(), SVEIntrinsicInfo::getOperandIdxInactiveLanesTakenFrom(), llvm::Value::getType(), II, SVEIntrinsicInfo::inactiveLanesAreNotDefined(), llvm::isa(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isCommutative(), llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Value(), llvm::MIPatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), Opc, llvm::InstCombiner::replaceInstUsesWith(), llvm::InstCombiner::replaceOperand(), SVEIntrinsicInfo::resultIsZeroInitialized(), llvm::simplifyBinOp(), and stripInactiveLanes().
Referenced by simplifySVEIntrinsic().
|
static |
Definition at line 2222 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::InstCombiner::Builder, llvm::cast(), llvm::IRBuilderBase::CreateLogicalAnd(), DL, llvm::VectorType::get(), SVEIntrinsicInfo::getCmpPredicate(), SVEIntrinsicInfo::getMatchingIROpode(), llvm::APInt::getSExtValue(), llvm::APInt::getZExtValue(), II, llvm::isa(), llvm::FCmpInst::isCommutative(), llvm::ICmpInst::isCommutative(), llvm::CmpInst::isUnsigned(), LHS, llvm::PatternMatch::m_APInt(), llvm::MIPatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), Opc, llvm::InstCombiner::replaceInstUsesWith(), llvm::InstCombiner::replaceOperand(), SVEIntrinsicInfo::resultIsZeroInitialized(), RHS, llvm::simplifyCmpInst(), and stripInactiveLanes().
Referenced by simplifySVEIntrinsic().
| bool SimplifyValuePattern | ( | SmallVector< Value * > & | Vec, |
| bool | AllowPoison ) |
Definition at line 3350 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::SmallVectorTemplateCommon< T, typename >::size().
Referenced by instCombineSVEDupqLane(), and SimplifyValuePattern().
Definition at line 2131 of file AArch64TargetTransformInfo.cpp.
References llvm::cast(), llvm::dyn_cast(), llvm::ConstantVector::getSplat(), and llvm::isa().
Referenced by simplifySVEIntrinsicBinOp(), and simplifySVEIntrinsicCompare().
|
static |
Definition at line 2356 of file AArch64TargetTransformInfo.cpp.
References llvm::InstCombiner::Builder, llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::dyn_cast(), II, LHS, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_LogicalAnd(), llvm::MIPatternMatch::m_SpecificType(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), P, llvm::InstCombiner::replaceInstUsesWith(), and RHS.
Referenced by instCombineConvertFromSVBool().
|
static |
| TailFoldingOption TailFoldingOptionLoc |
Definition at line 150 of file AArch64TargetTransformInfo.cpp.
Referenced by llvm::AArch64TTIImpl::preferTailFoldingOverEpilogue().