LLVM API Documentation
#include "llvm/Transforms/Scalar.h"#include "llvm/BasicBlock.h"#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/Function.h"#include "llvm/IntrinsicInst.h"#include "llvm/LLVMContext.h"#include "llvm/Value.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/PostOrderIterator.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/Dominators.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/Analysis/MemoryDependenceAnalysis.h"#include "llvm/Support/CFG.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Local.h"#include <cstdio>
Go to the source code of this file.
Namespaces | |
| namespace | llvm |
Classes | |
| struct | llvm::DenseMapInfo< Expression > |
Defines | |
| #define | DEBUG_TYPE "gvn" |
Functions | |
| STATISTIC (NumGVNInstr,"Number of instructions deleted") | |
| STATISTIC (NumGVNLoad,"Number of loads deleted") | |
| STATISTIC (NumGVNPRE,"Number of instructions PRE'd") | |
| STATISTIC (NumGVNBlocks,"Number of blocks merged") | |
| STATISTIC (NumPRELoad,"Number of loads PRE'd") | |
| FunctionPass * | llvm::createGVNPass () |
| static bool | IsValueFullyAvailableInBlock (BasicBlock *BB, DenseMap< BasicBlock *, char > &FullyAvailableBlocks) |
Variables | |
| static cl::opt< bool > | EnablePRE ("enable-pre", cl::init(true), cl::Hidden) |
| static cl::opt< bool > | EnableLoadPRE ("enable-load-pre", cl::init(true)) |
| static RegisterPass< GVN > | X ("gvn","Global Value Numbering") |
| static bool IsValueFullyAvailableInBlock | ( | BasicBlock * | BB, | |
| DenseMap< BasicBlock *, char > & | FullyAvailableBlocks | |||
| ) | [static] |
IsValueFullyAvailableInBlock - Return true if we can prove that the value we're analyzing is fully available in the specified block. As we go, keep track of which blocks we know are fully alive in FullyAvailableBlocks. This map is actually a tri-state map with the following values: 0) we know the block *is not* fully available. 1) we know the block *is* fully available. 2) we do not know whether the block is fully available or not, but we are currently speculating that it will be. 3) we are speculating for this block and have used that to speculate for other blocks.
Definition at line 874 of file GVN.cpp.
References llvm::SmallVectorImpl< T >::empty(), Entry, llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::insert(), PI, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::pred_begin(), llvm::pred_end(), llvm::SmallVectorImpl< T >::push_back(), llvm::succ_begin(), and llvm::succ_end().
| STATISTIC | ( | NumPRELoad | , | |
| "Number of loads PRE'd" | ||||
| ) |
| STATISTIC | ( | NumGVNBlocks | , | |
| "Number of blocks merged" | ||||
| ) |
| STATISTIC | ( | NumGVNPRE | , | |
| "Number of instructions PRE'd" | ||||
| ) |
| STATISTIC | ( | NumGVNLoad | , | |
| "Number of loads deleted" | ||||
| ) |
| STATISTIC | ( | NumGVNInstr | , | |
| "Number of instructions deleted" | ||||
| ) |
cl::opt<bool> EnableLoadPRE("enable-load-pre", cl::init(true)) [static] |
| DenseMap<Expression, uint32_t> expressionNumbering |
| DenseMap<BasicBlock*, ValueNumberScope*> localAvail |
| uint32_t nextValueNumber |
| ExpressionOpcode opcode |
Definition at line 79 of file GVN.cpp.
Referenced by llvm::CastInst::CreateFPCast(), llvm::CastInst::CreateIntegerCast(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getIntegerCast(), llvm::InsertProfilingInitCall(), llvm::PIC16InstrInfo::loadRegFromStackSlot(), and llvm::PIC16InstrInfo::storeRegToStackSlot().
| ValueNumberScope* parent |
Definition at line 682 of file GVN.cpp.
Referenced by llvm::PriorityQueue< llvm::SUnit *, std::vector< llvm::SUnit * >, llvm::latency_sort >::erase_one().
Definition at line 80 of file GVN.cpp.
Referenced by llvm::AsmPrinter::EmitGlobalConstant(), llvm::APFloat::getNaN(), and llvm::sys::IdentifyFileType().
| DenseMap<Value*, uint32_t> valueNumbering |
| SmallVector<uint32_t, 4> varargs |
| ValueTable VN |
Definition at line 701 of file GVN.cpp.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addLiveRangeToEndOfBlock(), and ComputeUltimateVN().
RegisterPass<GVN> X("gvn","Global Value Numbering") [static] |