LLVM  7.0.0
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)
 
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
 

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,
const Instruction *  Acc,
Value *  MulOp0,
Value *  MulOp1,
int  MulOpNum 
)
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,
MemInstList &  VecMem,
const DataLayout &  DL,
ScalarEvolution &  SE 
)
static

◆ AreSymmetrical()

static bool AreSymmetrical ( const ValueList &  VL0,
const ValueList &  VL1 
)
static

◆ CheckMACMemory()

static bool CheckMACMemory ( OpChainList &  Candidates)
static

◆ CreateLoadIns()

static void CreateLoadIns ( IRBuilder< NoFolder > &  IRB,
Instruction *  Acc,
LoadInst **  VecLd 
)
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

◆ dsp

arm parallel dsp

Definition at line 671 of file ARMParallelDSP.cpp.

◆ false

arm parallel Transform loops to use DSP false

Definition at line 671 of file ARMParallelDSP.cpp.

◆ intrinsics

arm parallel Transform loops to use DSP intrinsics

Definition at line 671 of file ARMParallelDSP.cpp.