LLVM  4.0.0
Classes | Namespaces | Macros | Functions | Variables
HexagonCommonGEP.cpp File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Pass.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/Local.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <map>
#include <set>
#include <utility>
#include <vector>
Include dependency graph for HexagonCommonGEP.cpp:

Go to the source code of this file.

Classes

struct  false::GepNode
 
struct  false::in_set
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 false
 

Macros

#define DEBUG_TYPE   "commgep"
 

Functions

void llvm::initializeHexagonCommonGEPPass (PassRegistry &)
 
 INITIALIZE_PASS_BEGIN (HexagonCommonGEP,"hcommgep","Hexagon Common GEP", false, false) INITIALIZE_PASS_END(HexagonCommonGEP
 
Typefalse::next_type (Type *Ty, Value *Idx)
 
raw_ostreamfalse::operator<< (raw_ostream &OS, const GepNode &GN)
 
template<typename NodeContainer >
void false::dump_node_container (raw_ostream &OS, const NodeContainer &S)
 
raw_ostreamfalse::operator<< (raw_ostream &OS, const NodeVect &S) LLVM_ATTRIBUTE_UNUSED
 
raw_ostreamfalse::operator<< (raw_ostream &OS, const NodeToUsesMap &M) LLVM_ATTRIBUTE_UNUSED
 
void * operator new (size_t, SpecificBumpPtrAllocator< GepNode > &A)
 
static void invert_find_roots (const NodeVect &Nodes, NodeChildrenMap &NCM, NodeVect &Roots)
 
static void nodes_for_root (GepNode *Root, NodeChildrenMap &NCM, NodeSet &Nodes)
 
static const NodeSet * node_class (GepNode *N, NodeSymRel &Rel)
 
static NodePair node_pair (GepNode *N1, GepNode *N2)
 
static unsigned node_hash (GepNode *N)
 
static bool node_eq (GepNode *N1, GepNode *N2, NodePairSet &Eq, NodePairSet &Ne)
 
template<typename T >
static BasicBlocknearest_common_dominator (DominatorTree *DT, T &Blocks)
 
template<typename T >
static BasicBlocknearest_common_dominatee (DominatorTree *DT, T &Blocks)
 
template<typename T >
static BasicBlock::iterator first_use_of_in_block (T &Values, BasicBlock *B)
 
static bool is_empty (const BasicBlock *B)
 
static BasicBlockpreheader (DominatorTree *DT, Loop *L)
 
FunctionPassllvm::createHexagonCommonGEP ()
 

Variables

static cl::opt< boolOptSpeculate ("commgep-speculate", cl::init(true), cl::Hidden, cl::ZeroOrMore)
 
static cl::opt< boolOptEnableInv ("commgep-inv", cl::init(true), cl::Hidden, cl::ZeroOrMore)
 
static cl::opt< boolOptEnableConst ("commgep-const", cl::init(true), cl::Hidden, cl::ZeroOrMore)
 
 hcommgep
 
Hexagon Common GEP
 
Hexagon Common false
 

Macro Definition Documentation

#define DEBUG_TYPE   "commgep"

Definition at line 10 of file HexagonCommonGEP.cpp.

Function Documentation

template<typename T >
static BasicBlock::iterator first_use_of_in_block ( T Values,
BasicBlock B 
)
static
INITIALIZE_PASS_BEGIN ( HexagonCommonGEP  ,
"hcommgep"  ,
"Hexagon Common GEP ,
false  ,
false   
)
static void invert_find_roots ( const NodeVect &  Nodes,
NodeChildrenMap &  NCM,
NodeVect &  Roots 
)
static

Definition at line 423 of file HexagonCommonGEP.cpp.

References E, and I.

static bool is_empty ( const BasicBlock B)
static
template<typename T >
static BasicBlock* nearest_common_dominatee ( DominatorTree DT,
T Blocks 
)
static
template<typename T >
static BasicBlock* nearest_common_dominator ( DominatorTree DT,
T Blocks 
)
static
static const NodeSet* node_class ( GepNode *  N,
NodeSymRel &  Rel 
)
static

Definition at line 463 of file HexagonCommonGEP.cpp.

References E, and I.

static bool node_eq ( GepNode *  N1,
GepNode *  N2,
NodePairSet &  Eq,
NodePairSet &  Ne 
)
static

Definition at line 488 of file HexagonCommonGEP.cpp.

References node_hash(), node_pair(), and P.

static unsigned node_hash ( GepNode *  N)
static
static NodePair node_pair ( GepNode *  N1,
GepNode *  N2 
)
static

Definition at line 473 of file HexagonCommonGEP.cpp.

Referenced by node_eq().

static void nodes_for_root ( GepNode *  Root,
NodeChildrenMap &  NCM,
NodeSet &  Nodes 
)
static

Definition at line 437 of file HexagonCommonGEP.cpp.

void* operator new ( size_t  ,
SpecificBumpPtrAllocator< GepNode > &  A 
)
inline

Definition at line 307 of file HexagonCommonGEP.cpp.

References A.

static BasicBlock* preheader ( DominatorTree DT,
Loop L 
)
static

Variable Documentation

Hexagon Common false

Definition at line 168 of file HexagonCommonGEP.cpp.

Hexagon Common GEP

Definition at line 168 of file HexagonCommonGEP.cpp.

Referenced by buildNew(), calculateVectorIndex(), chainToBasePointerCost(), CleanupConstantGlobalUsers(), cloneInstructionWithNewAddressSpace(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::ObjectSizeOffsetVisitor::compute(), llvm::GetElementPtrInst::CreateInBounds(), DoPromotion(), llvm::EmitGEPOffset(), llvm::Evaluator::EvaluateBlock(), findBaseDefiningValue(), findLoadCallsAtConstantOffset(), findRematerializableChainToBasePointer(), FindSingleUseIdentifiedObject(), llvm::gep_type_begin(), getAdjustedPtr(), llvm::ConstantExpr::getAlignOf(), llvm::getConstantStringInfo(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), llvm::ConstantExpr::getOffsetOf(), llvm::GetPointerBaseWithConstantOffset(), llvm::ConstantExpr::getSizeOf(), llvm::GetUnderlyingObject(), getUniformBase(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), llvm::FastISel::hasTrivialKill(), llvm::IsConstantOffsetFromGlobal(), isDereferenceableAndAlignedPointer(), isInBoundsGep(), isKnownNonZero(), isNoWrapAddRec(), isOnlyCopiedFromConstantGlobal(), IsPtrInBounds(), IsSafeComputationToRemove(), isSafeToPromoteArgument(), LLVMGetNumIndices(), LLVMIsInBounds(), LLVMSetIsInBounds(), passingValueIsAlwaysUndefined(), rewriteGEPAsOffset(), simplifyAllocaArraySize(), SRAGlobal(), llvm::Value::stripAndAccumulateInBoundsConstantOffsets(), stripAndComputeConstantOffsets(), llvm::stripGetElementPtr(), tryPromoteAllocaToVector(), llvm::InstCombiner::visitExtractValueInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitStoreInst(), and WriteOptimizationInfo().

hcommgep

Definition at line 168 of file HexagonCommonGEP.cpp.

cl::opt<bool> OptEnableConst("commgep-const", cl::init(true), cl::Hidden, cl::ZeroOrMore)
static
cl::opt<bool> OptEnableInv("commgep-inv", cl::init(true), cl::Hidden, cl::ZeroOrMore)
static
cl::opt<bool> OptSpeculate("commgep-speculate", cl::init(true), cl::Hidden, cl::ZeroOrMore)
static

Referenced by preheader().