|
LLVM
8.0.1
|
Armv6 introduced instructions to perform 32-bit SIMD operations. More...
#include "llvm/ADT/Statistic.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/Analysis/LoopAccessAnalysis.h"#include "llvm/Analysis/LoopPass.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/NoFolder.h"#include "llvm/Transforms/Scalar.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/LoopUtils.h"#include "llvm/Pass.h"#include "llvm/PassRegistry.h"#include "llvm/PassSupport.h"#include "llvm/Support/Debug.h"#include "llvm/IR/PatternMatch.h"#include "llvm/CodeGen/TargetPassConfig.h"#include "ARM.h"#include "ARMSubtarget.h"
Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "arm-parallel-dsp" |
Functions | |
| STATISTIC (NumSMLAD, "Number of smlad instructions generated") | |
| template<unsigned MaxBitWidth> | |
| static bool | IsNarrowSequence (Value *V, ValueList &VL) |
| template<typename MemInst > | |
| static bool | AreSequentialAccesses (MemInst *MemOp0, MemInst *MemOp1, const DataLayout &DL, ScalarEvolution &SE) |
| static void | MatchReductions (Function &F, Loop *TheLoop, BasicBlock *Header, ReductionList &Reductions) |
| static void | AddMACCandidate (OpChainList &Candidates, Instruction *Mul, Value *MulOp0, Value *MulOp1) |
| static void | MatchParallelMACSequences (Reduction &R, OpChainList &Candidates) |
| static void | AliasCandidates (BasicBlock *Header, Instructions &Reads, Instructions &Writes) |
| static bool | AreAliased (AliasAnalysis *AA, Instructions &Reads, Instructions &Writes, OpChainList &MACCandidates) |
| static bool | CheckMACMemory (OpChainList &Candidates) |
| static LoadInst * | CreateLoadIns (IRBuilder< NoFolder > &IRB, LoadInst &BaseLoad, const Type *LoadTy) |
| INITIALIZE_PASS_BEGIN (ARMParallelDSP, "arm-parallel-dsp", "Transform loops to use DSP intrinsics", false, false) INITIALIZE_PASS_END(ARMParallelDSP | |
Variables | |
| static cl::opt< bool > | DisableParallelDSP ("disable-arm-parallel-dsp", cl::Hidden, cl::init(false), cl::desc("Disable the ARM Parallel DSP pass")) |
| arm parallel | dsp |
| arm parallel Transform loops to use DSP | intrinsics |
| arm parallel Transform loops to use DSP | false |
Armv6 introduced instructions to perform 32-bit SIMD operations.
The purpose of this pass is do some IR pattern matching to create ACLE DSP intrinsics, which map on these 32-bit SIMD operations. This pass runs only when unaligned accesses is supported/enabled.
Definition in file ARMParallelDSP.cpp.
| #define DEBUG_TYPE "arm-parallel-dsp" |
Definition at line 41 of file ARMParallelDSP.cpp.
|
static |
Definition at line 500 of file ARMParallelDSP.cpp.
References assert(), llvm::dbgs(), llvm::Value::dump(), llvm::Instruction::getOpcode(), and LLVM_DEBUG.
Referenced by MatchParallelMACSequences().
|
static |
Definition at line 553 of file ARMParallelDSP.cpp.
References llvm::Instruction::mayReadFromMemory(), and llvm::Instruction::mayWriteToMemory().
Referenced by CheckMACMemory().
|
static |
Definition at line 566 of file ARMParallelDSP.cpp.
References assert(), llvm::dbgs(), llvm::Value::dump(), llvm::AAResults::getModRefInfo(), llvm::intersectModRef(), llvm::isModOrRefSet(), LLVM_DEBUG, and llvm::ModRef.
Referenced by CheckMACMemory().
|
static |
Definition at line 269 of file ARMParallelDSP.cpp.
References assert(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), llvm::Value::hasOneUse(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isConsecutiveAccess(), LLVM_DEBUG, llvm::SmallVectorTemplateBase< T >::push_back(), and Reduction.
|
static |
Definition at line 597 of file ARMParallelDSP.cpp.
References AliasCandidates(), AreAliased(), C, llvm::dbgs(), llvm::Value::dump(), llvm::Loop::dump(), llvm::Module::dump(), llvm::LoopBase< BlockT, LoopT >::getHeader(), LLVM_DEBUG, MatchParallelMACSequences(), and MatchReductions().
|
static |
Definition at line 691 of file ARMParallelDSP.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::Intrinsic::arm_smlad, llvm::Intrinsic::arm_smladx, llvm::Intrinsic::arm_smlald, llvm::Intrinsic::arm_smlaldx, llvm::IRBuilder< T, Inserter >::CreateAlignedLoad(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), llvm::IntegerType::get(), llvm::LoadInst::getAlignment(), llvm::Module::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getParent(), llvm::LoadInst::getPointerAddressSpace(), llvm::LoadInst::getPointerOperand(), llvm::Type::getPointerTo(), llvm::GlobalValue::getType(), llvm::Type::isIntegerTy(), LLVM_DEBUG, llvm::PatternMatch::m_APInt(), llvm::PatternMatch::match(), and Other.
| INITIALIZE_PASS_BEGIN | ( | ARMParallelDSP | , |
| "arm-parallel-dsp" | , | ||
| "Transform loops to use DSP intrinsics" | , | ||
| false | , | ||
| false | |||
| ) |
Referenced by llvm::createARMParallelDSPPass().
Definition at line 228 of file ARMParallelDSP.cpp.
References llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), LLVM_DEBUG, llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Load(), llvm::PatternMatch::m_Trunc(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_ZExtOrSExt(), and llvm::PatternMatch::match().
|
static |
Definition at line 515 of file ARMParallelDSP.cpp.
References llvm::MCID::Add, AddMACCandidate(), llvm::dbgs(), llvm::dyn_cast(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), LLVM_DEBUG, and llvm::Match.
Referenced by CheckMACMemory().
|
static |
Definition at line 459 of file ARMParallelDSP.cpp.
References llvm::RecurrenceDescriptor::AddReductionVar(), llvm::dbgs(), llvm::dyn_cast(), llvm::Function::getFnAttribute(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::Attribute::getValueAsString(), LLVM_DEBUG, llvm::BasicBlock::phis(), Reduction, and llvm::RecurrenceDescriptor::RK_IntegerAdd.
Referenced by CheckMACMemory().
| STATISTIC | ( | NumSMLAD | , |
| "Number of smlad instructions generated" | |||
| ) |
|
static |
| arm parallel dsp |
Definition at line 785 of file ARMParallelDSP.cpp.
Definition at line 785 of file ARMParallelDSP.cpp.
Definition at line 785 of file ARMParallelDSP.cpp.
1.8.13