LLVM API Documentation

LICM.cpp File Reference

#include "llvm/Transforms/Scalar.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AliasSetTracker.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/Statistic.h"
#include <algorithm>

Include dependency graph for LICM.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "licm"

Functions

 STATISTIC (NumSunk,"Number of instructions sunk out of loop")
 STATISTIC (NumHoisted,"Number of instructions hoisted out of loop")
 STATISTIC (NumMovedLoads,"Number of load insts hoisted or sunk")
 STATISTIC (NumMovedCalls,"Number of call insts hoisted or sunk")
 STATISTIC (NumPromoted,"Number of memory locations promoted to registers")
Pass * llvm::createLICMPass ()

Variables

static cl::opt< bool > DisablePromotion ("disable-licm-promotion", cl::Hidden, cl::desc("Disable memory promotion in LICM pass"))
static cl::opt< bool > EnableLICMConstantMotion ("enable-licm-constant-variables", cl::Hidden, cl::desc("Enable hoisting/sinking of constant ""global variables"))
static RegisterPass< LICM > X ("licm","Loop Invariant Code Motion")


Define Documentation

#define DEBUG_TYPE   "licm"

Definition at line 34 of file LICM.cpp.


Function Documentation

STATISTIC ( NumPromoted  ,
"Number of memory locations promoted to registers"   
)

STATISTIC ( NumMovedCalls  ,
"Number of call insts hoisted or sunk"   
)

STATISTIC ( NumMovedLoads  ,
"Number of load insts hoisted or sunk"   
)

STATISTIC ( NumHoisted  ,
"Number of instructions hoisted out of loop"   
)

STATISTIC ( NumSunk  ,
"Number of instructions sunk out of loop"   
)


Variable Documentation

Definition at line 107 of file LICM.cpp.

bool Changed

Definition at line 113 of file LICM.cpp.

Definition at line 116 of file LICM.cpp.

Definition at line 115 of file LICM.cpp.

cl::opt<bool> DisablePromotion("disable-licm-promotion", cl::Hidden, cl::desc("Disable memory promotion in LICM pass")) [static]

Definition at line 109 of file LICM.cpp.

cl::opt<bool> EnableLICMConstantMotion("enable-licm-constant-variables", cl::Hidden, cl::desc("Enable hoisting/sinking of constant ""global variables")) [static]

char ID [static]

Definition at line 76 of file LICM.cpp.

Definition at line 108 of file LICM.cpp.

Definition at line 117 of file LICM.cpp.

Definition at line 114 of file LICM.cpp.

Referenced by getSCEVStartAndStride(), and llvm::UnrollLoop().

RegisterPass<LICM> X("licm","Loop Invariant Code Motion") [static]