LLVM API Documentation

Defines | Functions | Variables
LoopUnrollPass.cpp File Reference
#include "llvm/Transforms/Scalar.h"
#include "llvm/Analysis/AssumptionTracker.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/FunctionTargetTransformInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Metadata.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.

Defines

#define DEBUG_TYPE   "loop-unroll"

Functions

static unsigned ApproximateLoopSize (const Loop *L, unsigned &NumCalls, bool &NotDuplicatable, const TargetTransformInfo &TTI, AssumptionTracker *AT)
 ApproximateLoopSize - Approximate the size of the loop.
static const MDNodeGetUnrollMetadata (const Loop *L, StringRef Name)
static bool HasUnrollFullPragma (const Loop *L)
static bool HasUnrollDisablePragma (const Loop *L)
static unsigned UnrollCountPragmaValue (const Loop *L)
static void SetLoopAlreadyUnrolled (Loop *L)

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 including those with ""unroll_count pragma values, 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"))
static cl::opt< unsignedPragmaUnrollThreshold ("pragma-unroll-threshold", cl::init(16 *1024), cl::Hidden, cl::desc("Unrolled size limit for loops with an unroll(full) or ""unroll_count pragma."))

Define Documentation

#define DEBUG_TYPE   "loop-unroll"

Definition at line 35 of file LoopUnrollPass.cpp.


Function Documentation

static unsigned ApproximateLoopSize ( const Loop L,
unsigned NumCalls,
bool NotDuplicatable,
const TargetTransformInfo TTI,
AssumptionTracker AT 
) [static]
static const MDNode* GetUnrollMetadata ( const Loop L,
StringRef  Name 
) [static]
static bool HasUnrollDisablePragma ( const Loop L) [static]

Definition at line 264 of file LoopUnrollPass.cpp.

References GetUnrollMetadata().

static bool HasUnrollFullPragma ( const Loop L) [static]

Definition at line 259 of file LoopUnrollPass.cpp.

References GetUnrollMetadata().

static void SetLoopAlreadyUnrolled ( Loop L) [static]
static unsigned UnrollCountPragmaValue ( const Loop L) [static]

Variable Documentation

cl::opt<unsigned> PragmaUnrollThreshold("pragma-unroll-threshold", cl::init(16 *1024), cl::Hidden, cl::desc("Unrolled size limit for loops with an unroll(full) or ""unroll_count pragma.")) [static]
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 including those with ""unroll_count pragma values, 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]