LLVM API Documentation
#include "llvm/Transforms/Scalar.h"#include "llvm/Constants.h"#include "llvm/Instructions.h"#include "llvm/Function.h"#include "llvm/LLVMContext.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/Transforms/Utils/Local.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"
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 DEBUG_TYPE "loopsimplify" |
Definition at line 35 of file LoopSimplify.cpp.
| 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 397 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] |
FindPHIToPartitionLoops - The first part of loop-nestification is to find a PHI node that tells us how to partition the loops.
Definition at line 415 of file LoopSimplify.cpp.
References llvm::LoopBase< BlockT, LoopT >::contains(), llvm::AliasAnalysis::deleteValue(), llvm::DominatorTree::dominates(), llvm::Instruction::eraseFromParent(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::PHINode::getNumIncomingValues(), llvm::PHINode::hasConstantValue(), llvm::Value::replaceAllUsesWith(), and V.
| STATISTIC | ( | NumNested | , | |
| "Number of nested loops split out" | ||||
| ) |
| STATISTIC | ( | NumInserted | , | |
| "Number of pre-header or exit blocks inserted" | ||||
| ) |
Definition at line 65 of file LoopSimplify.cpp.
Definition at line 67 of file LoopSimplify.cpp.
char ID [static] |
Definition at line 60 of file LoopSimplify.cpp.
Definition at line 66 of file LoopSimplify.cpp.
RegisterPass<LoopSimplify> X("loopsimplify","Canonicalize natural loops", true) [static] |