LLVM  4.0.0
Macros | Functions | Variables
LoopInterchange.cpp File Reference
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/DependenceAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopIterator.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
Include dependency graph for LoopInterchange.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loop-interchange"
 

Functions

static bool containsSafePHI (BasicBlock *Block, bool isOuterLoopExitBlock)
 
static BasicBlockgetLoopLatchExitBlock (BasicBlock *LatchBlock, BasicBlock *LoopHeader)
 
static bool isProfitableForVectorization (unsigned InnerLoopId, unsigned OuterLoopId, CharMatrix &DepMatrix)
 
static void moveBBContents (BasicBlock *FromBB, Instruction *InsertBefore)
 Move all instructions except the terminator from FromBB right before InsertBefore. More...
 
 INITIALIZE_PASS_BEGIN (LoopInterchange,"loop-interchange","Interchanges loops for cache reuse", false, false) INITIALIZE_PASS_END(LoopInterchange
 

Variables

static cl::opt< int > LoopInterchangeCostThreshold ("loop-interchange-threshold", cl::init(0), cl::Hidden, cl::desc("Interchange if you gain more than this number"))
 
loop interchange
 
loop Interchanges loops for cache reuse
 
loop Interchanges loops for cache false
 

Macro Definition Documentation

#define DEBUG_TYPE   "loop-interchange"

Definition at line 45 of file LoopInterchange.cpp.

Function Documentation

static bool containsSafePHI ( BasicBlock Block,
bool  isOuterLoopExitBlock 
)
static
static BasicBlock* getLoopLatchExitBlock ( BasicBlock LatchBlock,
BasicBlock LoopHeader 
)
static

Definition at line 733 of file LoopInterchange.cpp.

References assert(), llvm::BasicBlock::getTerminator(), and i.

INITIALIZE_PASS_BEGIN ( LoopInterchange  ,
"loop-interchange ,
"Interchanges loops for cache reuse ,
false  ,
false   
)
static bool isProfitableForVectorization ( unsigned  InnerLoopId,
unsigned  OuterLoopId,
CharMatrix &  DepMatrix 
)
static

Definition at line 946 of file LoopInterchange.cpp.

References i.

static void moveBBContents ( BasicBlock FromBB,
Instruction InsertBefore 
)
static

Variable Documentation

loop Interchanges loops for cache false

Definition at line 1271 of file LoopInterchange.cpp.

loop interchange

Definition at line 1271 of file LoopInterchange.cpp.

cl::opt<int> LoopInterchangeCostThreshold("loop-interchange-threshold", cl::init(0), cl::Hidden, cl::desc("Interchange if you gain more than this number"))
static
loop Interchanges loops for cache reuse

Definition at line 1271 of file LoopInterchange.cpp.