|
LLVM
7.0.0
|
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) |
| static bool | AreSymmetrical (const ValueList &VL0, const ValueList &VL1) |
| template<typename MemInst > | |
| static bool | AreSequentialAccesses (MemInst *MemOp0, MemInst *MemOp1, MemInstList &VecMem, const DataLayout &DL, ScalarEvolution &SE) |
| static void | MatchReductions (Function &F, Loop *TheLoop, BasicBlock *Header, ReductionList &Reductions) |
| static void | AddMACCandidate (OpChainList &Candidates, const Instruction *Acc, Value *MulOp0, Value *MulOp1, int MulOpNum) |
| 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 void | CreateLoadIns (IRBuilder< NoFolder > &IRB, Instruction *Acc, LoadInst **VecLd) |
| INITIALIZE_PASS_BEGIN (ARMParallelDSP, "arm-parallel-dsp", "Transform loops to use DSP intrinsics", false, false) INITIALIZE_PASS_END(ARMParallelDSP | |
Variables | |
| 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 449 of file ARMParallelDSP.cpp.
References llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), llvm::User::getOperand(), and LLVM_DEBUG.
Referenced by MatchParallelMACSequences().
|
static |
Definition at line 494 of file ARMParallelDSP.cpp.
References llvm::Instruction::mayReadFromMemory(), and llvm::Instruction::mayWriteToMemory().
Referenced by CheckMACMemory().
|
static |
Definition at line 507 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 289 of file ARMParallelDSP.cpp.
References AreSymmetrical(), llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), llvm::Value::hasOneUse(), llvm::isConsecutiveAccess(), LLVM_DEBUG, and Reduction.
Definition at line 250 of file ARMParallelDSP.cpp.
References llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), LLVM_DEBUG, llvm::PatternMatch::m_APInt(), and llvm::PatternMatch::match().
Referenced by AreSequentialAccesses().
|
static |
Definition at line 538 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 632 of file ARMParallelDSP.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::IRBuilder< T, Inserter >::CreateAlignedLoad(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::dbgs(), llvm::Value::dump(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getParent(), llvm::Type::getPointerAddressSpace(), llvm::Type::getPointerTo(), llvm::Value::getType(), and LLVM_DEBUG.
| INITIALIZE_PASS_BEGIN | ( | ARMParallelDSP | , |
| "arm-parallel-dsp" | , | ||
| "Transform loops to use DSP intrinsics" | , | ||
| false | , | ||
| false | |||
| ) |
Referenced by llvm::createARMParallelDSPPass().
Definition at line 208 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 463 of file ARMParallelDSP.cpp.
References AddMACCandidate(), llvm::dbgs(), llvm::Value::dump(), llvm::dyn_cast(), LLVM_DEBUG, llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_Mul(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::reverse().
Referenced by CheckMACMemory().
|
static |
Definition at line 408 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" | |||
| ) |
| arm parallel dsp |
Definition at line 671 of file ARMParallelDSP.cpp.
Definition at line 671 of file ARMParallelDSP.cpp.
Definition at line 671 of file ARMParallelDSP.cpp.
1.8.13