LLVM API Documentation
#include "llvm/Transforms/Utils/UnrollLoop.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/LoopIterator.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/IR/BasicBlock.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/Local.h"
#include "llvm/Transforms/Utils/SimplifyIndVar.h"
Go to the source code of this file.
Macros | |
#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, ValueToValueMapTy &VMap) |
static BasicBlock * | FoldBlockIntoPredecessor (BasicBlock *BB, LoopInfo *LI, LPPassManager *LPM) |
#define DEBUG_TYPE "loop-unroll" |
Definition at line 19 of file LoopUnroll.cpp.
|
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 63 of file LoopUnroll.cpp.
References llvm::dbgs(), DEBUG, llvm::StringRef::empty(), llvm::BasicBlock::end(), llvm::BasicBlock::eraseFromParent(), llvm::FoldSingleEntryPHINodes(), llvm::Pass::getAnalysisIfAvailable(), llvm::BasicBlock::getInstList(), llvm::LoopInfo::getLoopFor(), llvm::Value::getName(), llvm::TerminatorInst::getNumSuccessors(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getTerminator(), llvm::Value::hasName(), llvm::iplist< NodeTy, Traits >::pop_back(), llvm::LoopInfo::removeBlock(), llvm::Value::replaceAllUsesWith(), llvm::Value::setName(), and llvm::iplist< NodeTy, Traits >::splice().
Referenced by llvm::UnrollLoop().
|
inlinestatic |
RemapInstruction - Convert the instruction operands from referencing the current values into those specified by VMap.
Definition at line 41 of file LoopUnroll.cpp.
References llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::ValueMap< KeyT, ValueT, Config >::find(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::ValueMapIterator< DenseMapT, KeyT >::ValueTypeProxy::second, and llvm::User::setOperand().
STATISTIC | ( | NumCompletelyUnrolled | , |
"Number of loops completely unrolled" | |||
) |
STATISTIC | ( | NumUnrolled | , |
"Number of loops unrolled (completely or otherwise)" | |||
) |