LLVM
15.0.0git
|
#include "AArch64TargetTransformInfo.h"
#include "AArch64ExpandImm.h"
#include "AArch64PerfectShuffle.h"
#include "MCTargetDesc/AArch64AddressingModes.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 <algorithm>
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) |
#define DEBUG_TYPE "aarch64tti" |
Definition at line 29 of file AArch64TargetTransformInfo.cpp.
|
static |
Definition at line 2252 of file AArch64TargetTransformInfo.cpp.
References BB, llvm::LoopBase< BlockT, LoopT >::blocks(), llvm::dbgs(), llvm::LoadInst::getPointerOperand(), llvm::ScalarEvolution::getSCEV(), I, llvm::SCEVAddRecExpr::isAffine(), llvm::Loop::isLoopInvariant(), LLVM_DEBUG, llvm::Log2_32(), and llvm::TargetTransformInfo::UnrollingPreferences::MaxCount.
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Definition at line 2109 of file AArch64TargetTransformInfo.cpp.
References llvm::SPII::Load, SVEGatherOverhead, and SVEScatterOverhead.
Referenced by llvm::AArch64TTIImpl::getGatherScatterOpCost().
|
static |
Definition at line 530 of file AArch64TargetTransformInfo.cpp.
References llvm::CallBase::getArgOperand(), llvm::User::getOperand(), llvm::Value::getType(), llvm::SmallVectorImpl< T >::insert(), llvm::None, processPhiNode(), llvm::InstCombiner::replaceInstUsesWith(), and tryCombineFromSVBoolBinOp().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1128 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::ConstantAggregateZero::get(), llvm::Value::getContext(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Value::getType(), llvm::PointerType::getUnqual(), llvm::PatternMatch::m_SpecificInt(), llvm::PatternMatch::m_Value(), llvm::BitmaskEnumDetail::Mask(), llvm::PatternMatch::match(), llvm::None, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1228 of file AArch64TargetTransformInfo.cpp.
References B, llvm::CallBase::getArgOperand(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 800 of file AArch64TargetTransformInfo.cpp.
References llvm::LegalityPredicates::all(), Builder, llvm::ConstantInt::get(), llvm::Value::getContext(), llvm::Type::getInt32Ty(), llvm::Value::getType(), and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1161 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::InstCombiner::eraseInstFromFunction(), llvm::Value::getContext(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Value::getType(), llvm::PointerType::getUnqual(), llvm::PatternMatch::m_SpecificInt(), llvm::PatternMatch::m_Value(), llvm::BitmaskEnumDetail::Mask(), llvm::PatternMatch::match(), and llvm::None.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 622 of file AArch64TargetTransformInfo.cpp.
References llvm::LegalityPredicates::all(), Arg, Builder, llvm::ConstantInt::get(), llvm::ScalableVectorType::get(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::getSplatValue(), llvm::Value::getType(), I, llvm::BitmaskEnumDetail::Mask(), llvm::None, llvm::InstCombiner::replaceInstUsesWith(), and llvm::AArch64::SVEBitsPerBlock.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 818 of file AArch64TargetTransformInfo.cpp.
References llvm::LegalityPredicates::all(), Builder, llvm::ConstantInt::get(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::getNumElementsFromSVEPredPattern(), llvm::Value::getType(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 586 of file AArch64TargetTransformInfo.cpp.
References llvm::InsertElementInst::Create(), llvm::ConstantInt::get(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Type::getInt64Ty(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), Insert, llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 610 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Value::getType(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 724 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::ExtractElementInst::Create(), llvm::BinaryOperator::CreateWithCopiedFlags(), llvm::ConstantInt::get(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Type::getInt64Ty(), llvm::IntrinsicInst::getIntrinsicID(), llvm::getNumElementsFromSVEPredPattern(), llvm::getSplatValue(), llvm::Value::getType(), llvm::isSplatValue(), LHS, llvm::PatternMatch::m_BinOp(), llvm::PatternMatch::m_OneUse(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::None, llvm::InstCombiner::replaceInstUsesWith(), and RHS.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 912 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::Instruction::copyMetadata(), DL, llvm::ConstantAggregateZero::get(), llvm::Value::getContext(), llvm::User::getOperand(), llvm::Value::getPointerAlignment(), llvm::Type::getPointerTo(), llvm::Value::getType(), isAllActivePredicate(), llvm::SPII::Load, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 840 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::IntrinsicInst::getIntrinsicID(), llvm::Value::getType(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1194 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::ConstantInt::get(), llvm::Value::getContext(), llvm::User::getOperand(), llvm::getSplatValue(), llvm::Value::getType(), llvm::ConstantInt::getValue(), Int32Ty, llvm::APInt::isNegatedPowerOf2(), llvm::APInt::isPowerOf2(), llvm::APInt::logBase2(), llvm::SISrcMods::NEG, llvm::APInt::negate(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 578 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::User::getOperand(), llvm::InstCombiner::replaceInstUsesWith(), and llvm::MCID::Select.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1238 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::User::getOperand(), llvm::Value::getType(), isAllActivePredicate(), llvm::AArch64_AM::LSL, llvm::PatternMatch::m_NonNegative(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::None, llvm::InstCombiner::replaceInstUsesWith(), and Shift.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 935 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::Instruction::copyMetadata(), DL, llvm::InstCombiner::eraseInstFromFunction(), llvm::Value::getContext(), llvm::User::getOperand(), llvm::Value::getPointerAlignment(), llvm::Type::getPointerTo(), llvm::Value::getType(), isAllActivePredicate(), and llvm::SPII::Store.
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1062 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::Value::getContext(), llvm::VectorType::getElementCount(), llvm::LinearPolySize< LeafTy >::getKnownMinValue(), llvm::User::getOperand(), llvm::getSplatValue(), llvm::Value::getType(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1087 of file AArch64TargetTransformInfo.cpp.
References llvm::CallBase::getArgOperand(), llvm::Value::getType(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::None, llvm::InstCombiner::replaceInstUsesWith(), llvm::InstCombiner::replaceOperand(), and SetValue().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 1040 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::IntrinsicInst::getIntrinsicID(), llvm::getSplatValue(), llvm::Value::getType(), llvm::None, llvm::InstCombiner::replaceInstUsesWith(), and llvm::Value::takeName().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 970 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::Value::getContext(), llvm::Instruction::getFastMathFlags(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), intrinsicIDToBinOpCode(), llvm::PatternMatch::match(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic(), instCombineSVEVectorFAdd(), and instCombineSVEVectorMul().
|
static |
Definition at line 986 of file AArch64TargetTransformInfo.cpp.
References instCombineSVEVectorBinOp(), and instCombineSVEVectorFMLA().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 865 of file AArch64TargetTransformInfo.cpp.
References llvm::FastMathFlags::allowContract(), B, Builder, llvm::FMul, llvm::Value::getContext(), llvm::Instruction::getFastMathFlags(), llvm::User::getOperand(), llvm::Value::getType(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::None, P, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by instCombineSVEVectorFAdd().
|
static |
Definition at line 993 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::Value::getContext(), llvm::User::getOperand(), llvm::getSplatValue(), I, 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 1113 of file AArch64TargetTransformInfo.cpp.
References B, llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by llvm::AArch64TTIImpl::instCombineIntrinsic().
|
static |
Definition at line 957 of file AArch64TargetTransformInfo.cpp.
Referenced by instCombineSVEVectorBinOp().
|
static |
Definition at line 895 of file AArch64TargetTransformInfo.cpp.
References llvm::Value::getType(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by instCombineSVELD1(), instCombineSVESrshl(), and instCombineSVEST1().
|
static |
The function will remove redundant reinterprets casting in the presence of the control flow.
Definition at line 431 of file AArch64TargetTransformInfo.cpp.
References llvm::PHINode::addIncoming(), assert(), Builder, llvm::CallBase::getArgOperand(), llvm::Value::getType(), I, llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by instCombineConvertFromSVBool().
|
static |
Definition at line 478 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::Value::getContext(), llvm::User::getOperand(), llvm::Value::getType(), llvm::None, and llvm::InstCombiner::replaceInstUsesWith().
Referenced by instCombineConvertFromSVBool().
|
static |
Referenced by llvm::AArch64TTIImpl::getUnrollingPreferences().
|
static |
Referenced by getSVEGatherScatterOverhead().
|
static |
Referenced by getSVEGatherScatterOverhead().