LLVM 20.0.0git
Macros | Functions | Variables
ARMTargetTransformInfo.cpp File Reference
#include "ARMTargetTransformInfo.h"
#include "ARMSubtarget.h"
#include "MCTargetDesc/ARMAddressingModes.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/CodeGen/CostTable.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/SubtargetFeature.h"
#include "llvm/Transforms/InstCombine/InstCombiner.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <optional>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "armtti"
 

Functions

static ValuesimplifyNeonVld1 (const IntrinsicInst &II, unsigned MemAlign, InstCombiner::BuilderTy &Builder)
 Convert a vector load intrinsic into a simple llvm load instruction.
 
static ValueisSSATMinMaxPattern (Instruction *Inst, const APInt &Imm)
 
static bool isFPSatMinMaxPattern (Instruction *Inst, const APInt &Imm)
 
static bool canTailPredicateInstruction (Instruction &I, int &ICmpCount)
 
static bool canTailPredicateLoop (Loop *L, LoopInfo *LI, ScalarEvolution &SE, const DataLayout &DL, const LoopAccessInfo *LAI)
 
static bool areExtractExts (Value *Ext1, Value *Ext2)
 Check if Ext1 and Ext2 are extends of the same type, doubling the bitwidth of the vector elements.
 

Variables

static cl::opt< boolEnableMaskedLoadStores ("enable-arm-maskedldst", cl::Hidden, cl::init(true), cl::desc("Enable the generation of masked loads and stores"))
 
static cl::opt< boolDisableLowOverheadLoops ("disable-arm-loloops", cl::Hidden, cl::init(false), cl::desc("Disable the generation of low-overhead loops"))
 
static cl::opt< boolAllowWLSLoops ("allow-arm-wlsloops", cl::Hidden, cl::init(true), cl::desc("Enable the generation of WLS loops"))
 
static cl::opt< boolUseWidenGlobalArrays ("widen-global-strings", cl::Hidden, cl::init(true), cl::desc("Enable the widening of global strings to alignment boundaries"))
 
cl::opt< TailPredication::ModeEnableTailPredication
 
cl::opt< boolEnableMaskedGatherScatters
 
cl::opt< unsignedMVEMaxSupportedInterleaveFactor
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "armtti"

Definition at line 45 of file ARMTargetTransformInfo.cpp.

Function Documentation

◆ areExtractExts()

static bool areExtractExts ( Value Ext1,
Value Ext2 
)
static

Check if Ext1 and Ext2 are extends of the same type, doubling the bitwidth of the vector elements.

Definition at line 2691 of file ARMTargetTransformInfo.cpp.

References llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_ZExtOrSExt(), and llvm::PatternMatch::match().

◆ canTailPredicateInstruction()

static bool canTailPredicateInstruction ( Instruction I,
int &  ICmpCount 
)
static

Definition at line 2297 of file ARMTargetTransformInfo.cpp.

References I, and II.

Referenced by canTailPredicateLoop().

◆ canTailPredicateLoop()

static bool canTailPredicateLoop ( Loop L,
LoopInfo LI,
ScalarEvolution SE,
const DataLayout DL,
const LoopAccessInfo LAI 
)
static

◆ isFPSatMinMaxPattern()

static bool isFPSatMinMaxPattern ( Instruction Inst,
const APInt Imm 
)
static

◆ isSSATMinMaxPattern()

static Value * isSSATMinMaxPattern ( Instruction Inst,
const APInt Imm 
)
static

◆ simplifyNeonVld1()

static Value * simplifyNeonVld1 ( const IntrinsicInst II,
unsigned  MemAlign,
InstCombiner::BuilderTy Builder 
)
static

Convert a vector load intrinsic into a simple llvm load instruction.

This is beneficial when the underlying object being addressed comes from a constant, since we get constant-folding for free.

Definition at line 72 of file ARMTargetTransformInfo.cpp.

References llvm::IRBuilderBase::CreateAlignedLoad(), llvm::IRBuilderBase::CreateBitCast(), II, and llvm::isPowerOf2_32().

Referenced by llvm::ARMTTIImpl::instCombineIntrinsic().

Variable Documentation

◆ AllowWLSLoops

cl::opt< bool > AllowWLSLoops("allow-arm-wlsloops", cl::Hidden, cl::init(true), cl::desc("Enable the generation of WLS loops")) ( "allow-arm-wlsloops"  ,
cl::Hidden  ,
cl::init(true ,
cl::desc("Enable the generation of WLS loops")   
)
static

◆ DisableLowOverheadLoops

cl::opt< bool > DisableLowOverheadLoops("disable-arm-loloops", cl::Hidden, cl::init(false), cl::desc("Disable the generation of low-overhead loops")) ( "disable-arm-loloops"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("Disable the generation of low-overhead loops")   
)
static

◆ EnableMaskedGatherScatters

cl::opt<bool> EnableMaskedGatherScatters
extern

◆ EnableMaskedLoadStores

cl::opt< bool > EnableMaskedLoadStores("enable-arm-maskedldst", cl::Hidden, cl::init(true), cl::desc("Enable the generation of masked loads and stores")) ( "enable-arm-maskedldst"  ,
cl::Hidden  ,
cl::init(true ,
cl::desc("Enable the generation of masked loads and stores")   
)
static

◆ EnableTailPredication

cl::opt<TailPredication::Mode> EnableTailPredication
extern

◆ MVEMaxSupportedInterleaveFactor

cl::opt<unsigned> MVEMaxSupportedInterleaveFactor
extern

◆ UseWidenGlobalArrays

cl::opt< bool > UseWidenGlobalArrays("widen-global-strings", cl::Hidden, cl::init(true), cl::desc("Enable the widening of global strings to alignment boundaries")) ( "widen-global-strings"  ,
cl::Hidden  ,
cl::init(true ,
cl::desc("Enable the widening of global strings to alignment boundaries")   
)
static