LLVM  8.0.0svn
Macros | Functions | Variables
ARMParallelDSP.cpp File Reference

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"
Include dependency graph for ARMParallelDSP.cpp:

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 LoadInstCreateLoadIns (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< boolDisableParallelDSP ("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
 

Detailed Description

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.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "arm-parallel-dsp"

Definition at line 41 of file ARMParallelDSP.cpp.

Function Documentation

◆ AddMACCandidate()

static void AddMACCandidate ( OpChainList &  Candidates,
Instruction Mul,
Value MulOp0,
Value MulOp1 
)
static

◆ AliasCandidates()

static void AliasCandidates ( BasicBlock Header,
Instructions &  Reads,
Instructions &  Writes 
)
static

◆ AreAliased()

static bool AreAliased ( AliasAnalysis AA,
Instructions &  Reads,
Instructions &  Writes,
OpChainList &  MACCandidates 
)
static

◆ AreSequentialAccesses()

template<typename MemInst >
static bool AreSequentialAccesses ( MemInst *  MemOp0,
MemInst *  MemOp1,
const DataLayout DL,
ScalarEvolution SE 
)
static

◆ CheckMACMemory()

static bool CheckMACMemory ( OpChainList &  Candidates)
static

◆ CreateLoadIns()

static LoadInst* CreateLoadIns ( IRBuilder< NoFolder > &  IRB,
LoadInst BaseLoad,
const Type LoadTy 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ARMParallelDSP  ,
"arm-parallel-dsp ,
"Transform loops to use DSP intrinsics ,
false  ,
false   
)

◆ IsNarrowSequence()

template<unsigned MaxBitWidth>
static bool IsNarrowSequence ( Value V,
ValueList &  VL 
)
static

◆ MatchParallelMACSequences()

static void MatchParallelMACSequences ( Reduction R,
OpChainList &  Candidates 
)
static

◆ MatchReductions()

static void MatchReductions ( Function F,
Loop TheLoop,
BasicBlock Header,
ReductionList &  Reductions 
)
static

◆ STATISTIC()

STATISTIC ( NumSMLAD  ,
"Number of smlad instructions generated"   
)

Variable Documentation

◆ DisableParallelDSP

cl::opt<bool> DisableParallelDSP("disable-arm-parallel-dsp", cl::Hidden, cl::init(false), cl::desc("Disable the ARM Parallel DSP pass"))
static

◆ dsp

arm parallel dsp

Definition at line 785 of file ARMParallelDSP.cpp.

◆ false

arm parallel Transform loops to use DSP false

Definition at line 785 of file ARMParallelDSP.cpp.

◆ intrinsics

arm parallel Transform loops to use DSP intrinsics

Definition at line 785 of file ARMParallelDSP.cpp.