LLVM  5.0.0
Classes | Namespaces | Macros | Functions | Variables
HexagonLoopIdiomRecognition.cpp File Reference
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Local.h"
#include <algorithm>
#include <array>
Include dependency graph for HexagonLoopIdiomRecognition.cpp:

Go to the source code of this file.

Classes

struct  false::Simplifier
 
struct  false::Simplifier::Context
 
struct  false::PE
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 false
 

Macros

#define DEBUG_TYPE   "hexagon-lir"
 

Functions

void llvm::initializeHexagonLoopIdiomRecognizePass (PassRegistry &)
 
Pass * llvm::createHexagonLoopIdiomPass ()
 
 INITIALIZE_PASS_BEGIN (HexagonLoopIdiomRecognize,"hexagon-loop-idiom","Recognize Hexagon-specific loop idioms", false, false) INITIALIZE_PASS_END(HexagonLoopIdiomRecognize
 
raw_ostream & false::operator<< (raw_ostream &OS, const PE &P) LLVM_ATTRIBUTE_USED
 
static void replaceAllUsesOfWithIn (Value *I, Value *J, BasicBlock *BB)
 
static bool mayLoopAccessLocation (Value *Ptr, ModRefInfo Access, Loop *L, const SCEV *BECount, unsigned StoreSize, AliasAnalysis &AA, SmallPtrSetImpl< Instruction * > &Ignored)
 mayLoopAccessLocation - Return true if the specified loop might access the specified pointer location, which is a loop-strided access. More...
 

Variables

static cl::opt< bool > DisableMemcpyIdiom ("disable-memcpy-idiom", cl::Hidden, cl::init(false), cl::desc("Disable generation of memcpy in loop idiom recognition"))
 
static cl::opt< bool > DisableMemmoveIdiom ("disable-memmove-idiom", cl::Hidden, cl::init(false), cl::desc("Disable generation of memmove in loop idiom recognition"))
 
static cl::opt< unsigned > RuntimeMemSizeThreshold ("runtime-mem-idiom-threshold", cl::Hidden, cl::init(0), cl::desc("Threshold (in bytes) for the runtime ""check guarding the memmove."))
 
static cl::opt< unsigned > CompileTimeMemSizeThreshold ("compile-time-mem-idiom-threshold", cl::Hidden, cl::init(64), cl::desc("Threshold (in bytes) to perform the transformation, if the ""runtime loop count (mem transfer size) is known at compile-time."))
 
static cl::opt< bool > OnlyNonNestedMemmove ("only-nonnested-memmove-idiom", cl::Hidden, cl::init(true), cl::desc("Only enable generating memmove in non-nested loops"))
 
cl::opt< bool > HexagonVolatileMemcpy ("disable-hexagon-volatile-memcpy", cl::Hidden, cl::init(false), cl::desc("Enable Hexagon-specific memcpy for volatile destination."))
 
static cl::opt< unsigned > SimplifyLimit ("hlir-simplify-limit", cl::init(10000), cl::Hidden, cl::desc("Maximum number of simplification steps in HLIR"))
 
static const char * HexagonVolatileMemcpyName = "hexagon_memcpy_forward_vp4cp4n2"
 
hexagon loop idiom
 
hexagon loop Recognize Hexagon
specific loop 
idioms
 
hexagon loop Recognize Hexagon
specific loop 
false
 

Macro Definition Documentation

#define DEBUG_TYPE   "hexagon-lir"

Definition at line 10 of file HexagonLoopIdiomRecognition.cpp.

Function Documentation

INITIALIZE_PASS_BEGIN ( HexagonLoopIdiomRecognize  ,
"hexagon-loop-idiom"  ,
"Recognize Hexagon-specific loop idioms"  ,
false  ,
false   
)
static bool mayLoopAccessLocation ( Value *  Ptr,
ModRefInfo  Access,
Loop *  L,
const SCEV *  BECount,
unsigned  StoreSize,
AliasAnalysis &  AA,
SmallPtrSetImpl< Instruction * > &  Ignored 
)
static

mayLoopAccessLocation - Return true if the specified loop might access the specified pointer location, which is a loop-strided access.

The 'Access' argument specifies what the verboten forms of access are (read or write).

Definition at line 1863 of file HexagonLoopIdiomRecognition.cpp.

References llvm::LoopBase< N, M >::blocks(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::AAResults::getModRefInfo(), and llvm::MemoryLocation::UnknownSize.

static void replaceAllUsesOfWithIn ( Value *  I,
Value *  J,
BasicBlock *  BB 
)
static

Variable Documentation

cl::opt<unsigned> CompileTimeMemSizeThreshold("compile-time-mem-idiom-threshold", cl::Hidden, cl::init(64), cl::desc("Threshold (in bytes) to perform the transformation, if the ""runtime loop count (mem transfer size) is known at compile-time."))
static
cl::opt<bool> DisableMemcpyIdiom("disable-memcpy-idiom", cl::Hidden, cl::init(false), cl::desc("Disable generation of memcpy in loop idiom recognition"))
static
cl::opt<bool> DisableMemmoveIdiom("disable-memmove-idiom", cl::Hidden, cl::init(false), cl::desc("Disable generation of memmove in loop idiom recognition"))
static
hexagon loop Recognize Hexagon specific loop false

Definition at line 132 of file HexagonLoopIdiomRecognition.cpp.

cl::opt<bool> HexagonVolatileMemcpy("disable-hexagon-volatile-memcpy", cl::Hidden, cl::init(false), cl::desc("Enable Hexagon-specific memcpy for volatile destination."))
const char* HexagonVolatileMemcpyName = "hexagon_memcpy_forward_vp4cp4n2"
static

Definition at line 66 of file HexagonLoopIdiomRecognition.cpp.

hexagon loop idiom

Definition at line 132 of file HexagonLoopIdiomRecognition.cpp.

hexagon loop Recognize Hexagon specific loop idioms

Definition at line 132 of file HexagonLoopIdiomRecognition.cpp.

cl::opt<bool> OnlyNonNestedMemmove("only-nonnested-memmove-idiom", cl::Hidden, cl::init(true), cl::desc("Only enable generating memmove in non-nested loops"))
static
cl::opt<unsigned> RuntimeMemSizeThreshold("runtime-mem-idiom-threshold", cl::Hidden, cl::init(0), cl::desc("Threshold (in bytes) for the runtime ""check guarding the memmove."))
static
cl::opt<unsigned> SimplifyLimit("hlir-simplify-limit", cl::init(10000), cl::Hidden, cl::desc("Maximum number of simplification steps in HLIR"))
static