LLVM  16.0.0git
Classes | Macros | Functions | Variables
AArch64TargetTransformInfo.cpp File Reference
#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 "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
#include <algorithm>
#include <optional>
Include dependency graph for AArch64TargetTransformInfo.cpp:

Go to the source code of this file.

Classes

class  TailFoldingKind
 

Macros

#define DEBUG_TYPE   "aarch64tti"
 

Functions

static std::optional< Instruction * > processPhiNode (InstCombiner &IC, IntrinsicInst &II)
 The function will remove redundant reinterprets casting in the presence of the control flow. More...
 
static std::optional< Instruction * > tryCombineFromSVBoolBinOp (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineConvertFromSVBool (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVESel (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEDup (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEDupX (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVECmpNE (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVELast (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVECondLast (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineRDFFR (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVECntElts (InstCombiner &IC, IntrinsicInst &II, unsigned NumElts)
 
static std::optional< Instruction * > instCombineSVEPTest (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEVectorFMLA (InstCombiner &IC, IntrinsicInst &II)
 
static bool isAllActivePredicate (Value *Pred)
 
static std::optional< Instruction * > instCombineSVELD1 (InstCombiner &IC, IntrinsicInst &II, const DataLayout &DL)
 
static std::optional< Instruction * > instCombineSVEST1 (InstCombiner &IC, IntrinsicInst &II, const DataLayout &DL)
 
static Instruction::BinaryOps intrinsicIDToBinOpCode (unsigned Intrinsic)
 
static std::optional< Instruction * > instCombineSVEVectorBinOp (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEVectorFAdd (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEVectorMul (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEUnpack (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVETBL (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVEZip (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineLD1GatherIndex (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineST1ScatterIndex (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVESDIV (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineMaxMinNM (InstCombiner &IC, IntrinsicInst &II)
 
static std::optional< Instruction * > instCombineSVESrshl (InstCombiner &IC, IntrinsicInst &II)
 
static unsigned getSVEGatherScatterOverhead (unsigned Opcode)
 
static void getFalkorUnrollingPreferences (Loop *L, ScalarEvolution &SE, TargetTransformInfo::UnrollingPreferences &UP)
 

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)
 
TailFoldingKind TailFoldingKindLoc
 
cl::opt< TailFoldingKind, true, cl::parser< std::string > > SVETailFolding ("sve-tail-folding", cl::desc("Control the use of vectorisation using tail-folding for SVE:" "\ndisabled No loop types will vectorize using tail-folding" "\ndefault Uses the default tail-folding settings for the target " "CPU" "\nall All legal loop types will vectorize using tail-folding" "\nsimple Use tail-folding for simple loops (not reductions or " "recurrences)" "\nreductions Use tail-folding for loops containing reductions" "\nrecurrences Use tail-folding for loops containing fixed order " "recurrences"), cl::location(TailFoldingKindLoc))
 
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)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aarch64tti"

Definition at line 31 of file AArch64TargetTransformInfo.cpp.

Function Documentation

◆ getFalkorUnrollingPreferences()

static void getFalkorUnrollingPreferences ( Loop L,
ScalarEvolution SE,
TargetTransformInfo::UnrollingPreferences UP 
)
static

◆ getSVEGatherScatterOverhead()

static unsigned getSVEGatherScatterOverhead ( unsigned  Opcode)
static

◆ instCombineConvertFromSVBool()

static std::optional<Instruction *> instCombineConvertFromSVBool ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineLD1GatherIndex()

static std::optional<Instruction *> instCombineLD1GatherIndex ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineMaxMinNM()

static std::optional<Instruction *> instCombineMaxMinNM ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineRDFFR()

static std::optional<Instruction *> instCombineRDFFR ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineST1ScatterIndex()

static std::optional<Instruction *> instCombineST1ScatterIndex ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVECmpNE()

static std::optional<Instruction *> instCombineSVECmpNE ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVECntElts()

static std::optional<Instruction *> instCombineSVECntElts ( InstCombiner IC,
IntrinsicInst II,
unsigned  NumElts 
)
static

◆ instCombineSVECondLast()

static std::optional<Instruction *> instCombineSVECondLast ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEDup()

static std::optional<Instruction *> instCombineSVEDup ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEDupX()

static std::optional<Instruction *> instCombineSVEDupX ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVELast()

static std::optional<Instruction *> instCombineSVELast ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVELD1()

static std::optional<Instruction *> instCombineSVELD1 ( InstCombiner IC,
IntrinsicInst II,
const DataLayout DL 
)
static

◆ instCombineSVEPTest()

static std::optional<Instruction *> instCombineSVEPTest ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVESDIV()

static std::optional<Instruction *> instCombineSVESDIV ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVESel()

static std::optional<Instruction *> instCombineSVESel ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVESrshl()

static std::optional<Instruction *> instCombineSVESrshl ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEST1()

static std::optional<Instruction *> instCombineSVEST1 ( InstCombiner IC,
IntrinsicInst II,
const DataLayout DL 
)
static

◆ instCombineSVETBL()

static std::optional<Instruction *> instCombineSVETBL ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEUnpack()

static std::optional<Instruction *> instCombineSVEUnpack ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEVectorBinOp()

static std::optional<Instruction *> instCombineSVEVectorBinOp ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEVectorFAdd()

static std::optional<Instruction *> instCombineSVEVectorFAdd ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEVectorFMLA()

static std::optional<Instruction *> instCombineSVEVectorFMLA ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEVectorMul()

static std::optional<Instruction *> instCombineSVEVectorMul ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ instCombineSVEZip()

static std::optional<Instruction *> instCombineSVEZip ( InstCombiner IC,
IntrinsicInst II 
)
static

◆ intrinsicIDToBinOpCode()

static Instruction::BinaryOps intrinsicIDToBinOpCode ( unsigned  Intrinsic)
static

Definition at line 1140 of file AArch64TargetTransformInfo.cpp.

Referenced by instCombineSVEVectorBinOp().

◆ isAllActivePredicate()

static bool isAllActivePredicate ( Value Pred)
static

◆ processPhiNode()

static std::optional<Instruction *> processPhiNode ( InstCombiner IC,
IntrinsicInst II 
)
static

The function will remove redundant reinterprets casting in the presence of the control flow.

Definition at line 525 of file AArch64TargetTransformInfo.cpp.

References llvm::PHINode::addIncoming(), assert(), Builder, llvm::CallBase::getArgOperand(), llvm::Value::getType(), I, and llvm::InstCombiner::replaceInstUsesWith().

Referenced by instCombineConvertFromSVBool().

◆ tryCombineFromSVBoolBinOp()

static std::optional<Instruction *> tryCombineFromSVBoolBinOp ( InstCombiner IC,
IntrinsicInst II 
)
static

Variable Documentation

◆ EnableFalkorHWPFUnrollFix

cl::opt<bool> EnableFalkorHWPFUnrollFix("enable-falkor-hwpf-unroll-fix", cl::init(true), cl::Hidden)
static

◆ EnableFixedwidthAutovecInStreamingMode

cl::opt<bool> EnableFixedwidthAutovecInStreamingMode("enable-fixedwidth-autovec-in-streaming-mode", cl::init(false), cl::Hidden)
static

◆ EnableScalableAutovecInStreamingMode

cl::opt<bool> EnableScalableAutovecInStreamingMode("enable-scalable-autovec-in-streaming-mode", cl::init(false), cl::Hidden)
static

◆ SVEGatherOverhead

cl::opt<unsigned> SVEGatherOverhead("sve-gather-overhead", cl::init(10), cl::Hidden)
static

◆ SVEScatterOverhead

cl::opt<unsigned> SVEScatterOverhead("sve-scatter-overhead", cl::init(10), cl::Hidden)
static

◆ SVETailFolding

cl::opt<TailFoldingKind, true, cl::parser<std::string> > SVETailFolding("sve-tail-folding", cl::desc( "Control the use of vectorisation using tail-folding for SVE:" "\ndisabled No loop types will vectorize using tail-folding" "\ndefault Uses the default tail-folding settings for the target " "CPU" "\nall All legal loop types will vectorize using tail-folding" "\nsimple Use tail-folding for simple loops (not reductions or " "recurrences)" "\nreductions Use tail-folding for loops containing reductions" "\nrecurrences Use tail-folding for loops containing fixed order " "recurrences"), cl::location(TailFoldingKindLoc))

◆ TailFoldingKindLoc

TailFoldingKind TailFoldingKindLoc