LLVM  9.0.0svn
Macros | Typedefs | Functions
LoopUnrollAndJam.cpp File Reference
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/DependenceAnalysis.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/Analysis/LoopIterator.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
#include "llvm/Analysis/Utils/Local.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/LoopSimplify.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/SimplifyIndVar.h"
#include "llvm/Transforms/Utils/UnrollLoop.h"
Include dependency graph for LoopUnrollAndJam.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loop-unroll-and-jam"
 

Typedefs

typedef SmallPtrSet< BasicBlock *, 4 > BasicBlockSet
 

Functions

 STATISTIC (NumUnrolledAndJammed, "Number of loops unroll and jammed")
 
 STATISTIC (NumCompletelyUnrolledAndJammed, "Number of loops unroll and jammed")
 
static bool partitionOuterLoopBlocks (Loop *L, Loop *SubLoop, BasicBlockSet &ForeBlocks, BasicBlockSet &SubLoopBlocks, BasicBlockSet &AftBlocks, DominatorTree *DT)
 
template<typename T >
static bool processHeaderPhiOperands (BasicBlock *Header, BasicBlock *Latch, BasicBlockSet &AftBlocks, T Visit)
 
static void moveHeaderPhiOperandsToForeBlocks (BasicBlock *Header, BasicBlock *Latch, Instruction *InsertLoc, BasicBlockSet &AftBlocks)
 
static bool getLoadsAndStores (BasicBlockSet &Blocks, SmallVector< Value *, 4 > &MemInstr)
 
static bool checkDependencies (SmallVector< Value *, 4 > &Earlier, SmallVector< Value *, 4 > &Later, unsigned LoopDepth, bool InnerLoop, DependenceInfo &DI)
 
static bool checkDependencies (Loop *L, BasicBlockSet &ForeBlocks, BasicBlockSet &SubLoopBlocks, BasicBlockSet &AftBlocks, DependenceInfo &DI)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "loop-unroll-and-jam"

Definition at line 42 of file LoopUnrollAndJam.cpp.

Referenced by llvm::UnrollAndJamLoop().

Typedef Documentation

◆ BasicBlockSet

Definition at line 47 of file LoopUnrollAndJam.cpp.

Function Documentation

◆ checkDependencies() [1/2]

static bool checkDependencies ( SmallVector< Value *, 4 > &  Earlier,
SmallVector< Value *, 4 > &  Later,
unsigned  LoopDepth,
bool  InnerLoop,
DependenceInfo DI 
)
static

◆ checkDependencies() [2/2]

static bool checkDependencies ( Loop L,
BasicBlockSet ForeBlocks,
BasicBlockSet SubLoopBlocks,
BasicBlockSet AftBlocks,
DependenceInfo DI 
)
static

◆ getLoadsAndStores()

static bool getLoadsAndStores ( BasicBlockSet Blocks,
SmallVector< Value *, 4 > &  MemInstr 
)
static

Definition at line 585 of file LoopUnrollAndJam.cpp.

References I, and llvm::SmallVectorTemplateBase< T >::push_back().

Referenced by checkDependencies().

◆ moveHeaderPhiOperandsToForeBlocks()

static void moveHeaderPhiOperandsToForeBlocks ( BasicBlock Header,
BasicBlock Latch,
Instruction InsertLoc,
BasicBlockSet AftBlocks 
)
static

◆ partitionOuterLoopBlocks()

static bool partitionOuterLoopBlocks ( Loop L,
Loop SubLoop,
BasicBlockSet ForeBlocks,
BasicBlockSet SubLoopBlocks,
BasicBlockSet AftBlocks,
DominatorTree DT 
)
static

◆ processHeaderPhiOperands()

template<typename T >
static bool processHeaderPhiOperands ( BasicBlock Header,
BasicBlock Latch,
BasicBlockSet AftBlocks,
T  Visit 
)
static

◆ STATISTIC() [1/2]

STATISTIC ( NumUnrolledAndJammed  ,
"Number of loops unroll and jammed"   
)

◆ STATISTIC() [2/2]

STATISTIC ( NumCompletelyUnrolledAndJammed  ,
"Number of loops unroll and jammed"   
)