LLVM API Documentation

LoopUnroll.cpp File Reference

#include "llvm/IntrinsicInst.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/Utils/UnrollLoop.h"
#include <climits>

Include dependency graph for LoopUnroll.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "loop-unroll"

Functions

Pass * llvm::createLoopUnrollPass ()
static unsigned ApproximateLoopSize (const Loop *L)
 ApproximateLoopSize - Approximate the size of the loop.

Variables

static cl::opt< unsigned > UnrollThreshold ("unroll-threshold", cl::init(100), cl::Hidden, cl::desc("The cut-off point for automatic loop unrolling"))
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 > 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 RegisterPass< LoopUnroll > X ("loop-unroll","Unroll loops")


Define Documentation

#define DEBUG_TYPE   "loop-unroll"

Definition at line 15 of file LoopUnroll.cpp.


Function Documentation

static unsigned ApproximateLoopSize ( const Loop *  L  )  [static]


Variable Documentation

char ID [static]

Definition at line 44 of file LoopUnroll.cpp.

const unsigned NoThreshold = UINT_MAX [static]

A magic value for use with the Threshold parameter to indicate that the loop unroll should be performed regardless of how much code expansion would result.

Definition at line 50 of file LoopUnroll.cpp.

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<unsigned> UnrollThreshold("unroll-threshold", cl::init(100), cl::Hidden, cl::desc("The cut-off point for automatic loop unrolling")) [static]

RegisterPass<LoopUnroll> X("loop-unroll","Unroll loops") [static]