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/Instructions.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/Transforms/Utils/BasicBlockUtils.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) |
| cl::opt< bool > | EnableLoadPRE ("enable-load-pre") |
| 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 866 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") |
| DenseMap<Expression, uint32_t> expressionNumbering |
| DenseMap<BasicBlock*, ValueNumberScope*> localAvail |
| uint32_t nextValueNumber |
| ExpressionOpcode opcode |
Definition at line 74 of file GVN.cpp.
Referenced by llvm::CastInst::CreateFPCast(), llvm::CastInst::CreateIntegerCast(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getIntegerCast(), and llvm::InsertProfilingInitCall().
| ValueNumberScope* parent |
Definition at line 674 of file GVN.cpp.
Referenced by llvm::PriorityQueue< llvm::SUnit *, std::vector< llvm::SUnit * >, llvm::latency_sort >::erase_one().
Definition at line 75 of file GVN.cpp.
Referenced by llvm::AsmPrinter::EmitGlobalConstant(), and llvm::sys::IdentifyFileType().
| DenseMap<Value*, uint32_t> valueNumbering |
| SmallVector<uint32_t, 4> varargs |
| ValueTable VN |
Definition at line 693 of file GVN.cpp.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addLiveRangeToEndOfBlock(), and ComputeUltimateVN().
RegisterPass<GVN> X("gvn","Global Value Numbering") [static] |