|
LLVM 24.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::AArch64SVEShuffleOptsPass::run().
Definition at line 269 of file SVEShuffleOpts.cpp.
Referenced by _rpmalloc_set_name(), llvm::object::applyNameType(), llvm::LTOCodeGenerator::compileOptimized(), llvm::pdb::DIARawSymbol::dump(), llvm::OutputCategoryAggregator::EnumerateDetailedResultsFor(), llvm::gsym::OutputAggregator::EnumerateResults(), llvm::OutputCategoryAggregator::EnumerateResults(), llvm::Mips16HardFloatInfo::findFuncSignature(), llvm::object::Archive::findSym(), llvm::cl::generic_parser_base::GenericOptionInfo::GenericOptionInfo(), get_amd_kernel_code_t_FieldIndex(), llvm::sys::Process::GetEnv(), llvm::object::COFFImportFile::getExportName(), llvm::orc::GetGnuHashSection(), is64Bit(), llvm::MCAsmBackend::isDarwinCanonicalPersonality(), llvm::XtensaTargetLowering::LowerCall(), lto_codegen_compile_to_file(), llvm::LTOModule::makeBuffer(), llvm::sys::fs::mapped_file_region::mapped_file_region(), llvm::MCGenDwarfLabelEntry::MCGenDwarfLabelEntry(), llvm::gsym::OutputAggregator::Merge(), llvm::cl::parser< DataType >::OptionInfo::OptionInfo(), llvm::Sparc::parseDataSpecifier(), llvm::orc::parseMachODeps(), llvm::AArch64::parsePercentSpecifierName(), llvm::LoongArch::parseSpecifier(), llvm::Sparc::parseSpecifier(), llvm::Xtensa::parseSpecifier(), llvm::RISCV::parseSpecifierName(), llvm::ELFCompactAttrParser::parseStringAttribute(), llvm::PassInfo::PassInfo(), llvm::LiveDebugValuesPass::printPipeline(), llvm::MachineBlockPlacementPass::printPipeline(), llvm::MachineSinkingPass::printPipeline(), llvm::ReadyQueue::ReadyQueue(), llvm::SectionEntry::SectionEntry(), thinlto_codegen_add_cross_referenced_symbol(), thinlto_codegen_add_must_preserve_symbol(), llvm::dwarf::toDW_LANG(), and llvm::LTOModule::~LTOModule().