LLVM API Documentation

LoopSimplify.cpp File Reference

#include "llvm/Transforms/Scalar.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/Function.h"
#include "llvm/Type.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/DepthFirstIterator.h"

Include dependency graph for LoopSimplify.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "loopsimplify"

Functions

 STATISTIC (NumInserted,"Number of pre-header or exit blocks inserted")
 STATISTIC (NumNested,"Number of nested loops split out")
FunctionPass * llvm::createLoopSimplifyPass ()
static void AddBlockAndPredsToSet (BasicBlock *InputBB, BasicBlock *StopBlock, std::set< BasicBlock * > &Blocks)
static PHINode * FindPHIToPartitionLoops (Loop *L, DominatorTree *DT, AliasAnalysis *AA)

Variables

static RegisterPass< LoopSimplify > X ("loopsimplify","Canonicalize natural loops", true)


Define Documentation

#define DEBUG_TYPE   "loopsimplify"

Definition at line 35 of file LoopSimplify.cpp.


Function Documentation

static void AddBlockAndPredsToSet ( BasicBlock *  InputBB,
BasicBlock *  StopBlock,
std::set< BasicBlock * > &  Blocks 
) [static]

AddBlockAndPredsToSet - Add the specified block, and all of its predecessors, to the specified set, if it's not already in there. Stop predecessor traversal when we reach StopBlock.

Definition at line 328 of file LoopSimplify.cpp.

References llvm::MachineBasicBlock::back(), BB, E, llvm::pred_begin(), llvm::pred_end(), and WorkList.

static PHINode* FindPHIToPartitionLoops ( Loop *  L,
DominatorTree *  DT,
AliasAnalysis *  AA 
) [static]

STATISTIC ( NumNested  ,
"Number of nested loops split out"   
)

STATISTIC ( NumInserted  ,
"Number of pre-header or exit blocks inserted"   
)


Variable Documentation

Definition at line 63 of file LoopSimplify.cpp.

Definition at line 65 of file LoopSimplify.cpp.

char ID [static]

Definition at line 58 of file LoopSimplify.cpp.

Definition at line 64 of file LoopSimplify.cpp.

RegisterPass<LoopSimplify> X("loopsimplify","Canonicalize natural loops", true) [static]