LLVM API Documentation
#include "llvm/Transforms/Utils/UnrollLoop.h"#include "llvm/BasicBlock.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/ConstantFolding.h"#include "llvm/Analysis/LoopPass.h"#include "llvm/Support/Debug.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Cloning.h"#include "llvm/Transforms/Utils/Local.h"#include <cstdio>

Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "loop-unroll" |
Functions | |
| STATISTIC (NumCompletelyUnrolled,"Number of loops completely unrolled") | |
| STATISTIC (NumUnrolled,"Number of loops unrolled (completely or otherwise)") | |
| static void | RemapInstruction (Instruction *I, DenseMap< const Value *, Value * > &ValueMap) |
| static BasicBlock * | FoldBlockIntoPredecessor (BasicBlock *BB, LoopInfo *LI) |
| bool | llvm::UnrollLoop (Loop *L, unsigned Count, LoopInfo *LI, LPPassManager *LPM) |
| #define DEBUG_TYPE "loop-unroll" |
Definition at line 21 of file UnrollLoop.cpp.
| static BasicBlock* FoldBlockIntoPredecessor | ( | BasicBlock * | BB, | |
| LoopInfo * | LI | |||
| ) | [static] |
FoldBlockIntoPredecessor - Folds a basic block into its predecessor if it only has one predecessor, and that predecessor only has one successor. The LoopInfo Analysis that is passed will be kept consistent. Returns the new combined block.
Definition at line 55 of file UnrollLoop.cpp.
References DOUT, llvm::BasicBlock::eraseFromParent(), llvm::FoldSingleEntryPHINodes(), llvm::BasicBlock::getInstList(), llvm::Value::getName(), llvm::TerminatorInst::getNumSuccessors(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getTerminator(), llvm::LoopInfo::removeBlock(), and llvm::Value::replaceAllUsesWith().
Referenced by llvm::UnrollLoop().
| static void RemapInstruction | ( | Instruction * | I, | |
| DenseMap< const Value *, Value * > & | ValueMap | |||
| ) | [inline, static] |
RemapInstruction - Convert the instruction operands from referencing the current values into those specified by ValueMap.
Definition at line 41 of file UnrollLoop.cpp.
References E, llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::find(), llvm::User::getNumOperands(), llvm::User::getOperand(), Op, and llvm::User::setOperand().
| STATISTIC | ( | NumUnrolled | , | |
| "Number of loops unrolled (completely or otherwise)" | ||||
| ) |
| STATISTIC | ( | NumCompletelyUnrolled | , | |
| "Number of loops completely unrolled" | ||||
| ) |
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.