|
LLVM 23.0.0git
|
#include "AArch64.h"#include "AArch64Subtarget.h"#include "AArch64TargetMachine.h"#include "llvm/Analysis/AssumptionCache.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/LoopPass.h"#include "llvm/Analysis/MemorySSA.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/CodeGen/TargetLowering.h"#include "llvm/CodeGen/TargetPassConfig.h"#include "llvm/CodeGen/TargetSubtargetInfo.h"#include "llvm/IR/Constants.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/IntrinsicsAArch64.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/PatternMatch.h"#include "llvm/InitializePasses.h"#include <array>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "aarch64-sve-shuffle-opts" |
Typedefs | |
| using | DeinterleaveMap = SmallDenseMap<CallInst *, std::array<CastInst *, 4>> |
| A mapping between a vector_deinterleaveN intrinsic and extending cast instructions used on the resulting subvectors. | |
Functions | |
| static void | evaluateDeinterleave (IntrinsicInst *I, DeinterleaveMap &Candidates, Loop &L, const AArch64TargetLowering &TL, const DataLayout DL) |
| Evaluate a deinterleave and see what the uses are. | |
| static void | optimizeSVEDeinterleavedExtends (DeinterleaveMap Deinterleaves) |
| Given a map of deinterleaves to zext or uitofp casts, remove the operations and replace them with tbl shuffles. | |
| static bool | processLoop (Loop &L, const AArch64Subtarget &ST, DataLayout DL) |
Variables | |
| static const char * | name = "SVE Shuffle Optimizations" |
| #define DEBUG_TYPE "aarch64-sve-shuffle-opts" |
Definition at line 92 of file SVEShuffleOpts.cpp.
| using DeinterleaveMap = SmallDenseMap<CallInst *, std::array<CastInst *, 4>> |
A mapping between a vector_deinterleaveN intrinsic and extending cast instructions used on the resulting subvectors.
Definition at line 96 of file SVEShuffleOpts.cpp.
|
static |
Evaluate a deinterleave and see what the uses are.
If we find other operations that we can combine into a tbl shuffle, add the deinterleave and the operations (currently only zext or uitofp) to the candidates map.
Definition at line 101 of file SVEShuffleOpts.cpp.
References llvm::all_of(), assert(), DL, llvm::dyn_cast(), llvm::dyn_cast_if_present(), llvm::CastInst::getDestTy(), llvm::CastInst::getOpcode(), llvm::Type::getPrimitiveSizeInBits(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getSizeInBits(), llvm::TargetLoweringBase::getTypeConversion(), llvm::ConstantRange::getUpper(), llvm::TargetLoweringBase::getValueType(), llvm::getVScaleRange(), I, llvm::isa(), llvm::EVT::isScalableVector(), llvm::ConstantRange::isUpperWrapped(), llvm::TargetLoweringBase::TypeLegal, and llvm::APInt::ult().
Referenced by processLoop().
|
static |
Given a map of deinterleaves to zext or uitofp casts, remove the operations and replace them with tbl shuffles.
Definition at line 160 of file SVEShuffleOpts.cpp.
References llvm::cast(), llvm::dbgs(), llvm::Deinterleave, llvm::enumerate(), llvm::APInt::getAllOnes(), llvm::VectorType::getInteger(), llvm::Invalid, llvm::isa(), LLVM_DEBUG, llvm::make_early_inc_range(), and Widen().
Referenced by processLoop().
|
static |
Definition at line 216 of file SVEShuffleOpts.cpp.
References assert(), llvm::cast(), DL, evaluateDeinterleave(), I, llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and optimizeSVEDeinterleavedExtends().
Referenced by llvm::SVEShuffleOptsPass::run().
Definition at line 269 of file SVEShuffleOpts.cpp.