LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
LoopUnrollPass.cpp File Reference
#include "llvm/Transforms/Scalar.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/UnrollLoop.h"
#include <climits>
Include dependency graph for LoopUnrollPass.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loop-unroll"
 

Functions

static unsigned ApproximateLoopSize (const Loop *L, unsigned &NumCalls, bool &NotDuplicatable, const TargetTransformInfo &TTI)
 ApproximateLoopSize - Approximate the size of the loop. More...
 

Variables

static cl::opt< unsignedUnrollThreshold ("unroll-threshold", cl::init(150), cl::Hidden, cl::desc("The cut-off point for automatic loop unrolling"))
 
static cl::opt< unsignedUnrollCount ("unroll-count", cl::init(0), cl::Hidden, cl::desc("Use this unroll count for all loops, for testing purposes"))
 
static cl::opt< boolUnrollAllowPartial ("unroll-allow-partial", cl::init(false), cl::Hidden, cl::desc("Allows loops to be partially unrolled until ""-unroll-threshold loop size is reached."))
 
static cl::opt< boolUnrollRuntime ("unroll-runtime", cl::ZeroOrMore, cl::init(false), cl::Hidden, cl::desc("Unroll loops with run-time trip counts"))
 

Macro Definition Documentation

#define DEBUG_TYPE   "loop-unroll"

Definition at line 15 of file LoopUnrollPass.cpp.

Function Documentation

static unsigned ApproximateLoopSize ( const Loop L,
unsigned NumCalls,
bool NotDuplicatable,
const TargetTransformInfo TTI 
)
static

Variable Documentation

cl::opt<bool> UnrollAllowPartial("unroll-allow-partial", cl::init(false), cl::Hidden, cl::desc("Allows loops to be partially unrolled until ""-unroll-threshold loop size is reached."))
static
cl::opt<unsigned> UnrollCount("unroll-count", cl::init(0), cl::Hidden, cl::desc("Use this unroll count for all loops, for testing purposes"))
static
cl::opt<bool> UnrollRuntime("unroll-runtime", cl::ZeroOrMore, cl::init(false), cl::Hidden, cl::desc("Unroll loops with run-time trip counts"))
static
cl::opt<unsigned> UnrollThreshold("unroll-threshold", cl::init(150), cl::Hidden, cl::desc("The cut-off point for automatic loop unrolling"))
static