LLVM  4.0.0
Namespaces | Macros | Functions
NVPTXInferAddressSpaces.cpp File Reference
#include "NVPTX.h"
#include "MCTargetDesc/NVPTXBaseInfo.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
Include dependency graph for NVPTXInferAddressSpaces.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "nvptx-infer-addrspace"
 

Functions

void llvm::initializeNVPTXInferAddressSpacesPass (PassRegistry &)
 
 INITIALIZE_PASS (NVPTXInferAddressSpaces,"nvptx-infer-addrspace","Infer address spaces", false, false) static bool isAddressExpression(const Value &V)
 
static SmallVector< Value *, 2 > getPointerOperands (const Value &V)
 
static void appendsGenericAddressExpressionToPostorderStack (Value *V, std::vector< std::pair< Value *, bool >> *PostorderStack, DenseSet< Value * > *Visited)
 
static std::vector< Value * > collectGenericAddressExpressions (Function &F)
 
static ValueoperandWithNewAddressSpaceOrCreateUndef (const Use &OperandUse, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace, SmallVectorImpl< const Use * > *UndefUsesToFix)
 
static ValuecloneInstructionWithNewAddressSpace (Instruction *I, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace, SmallVectorImpl< const Use * > *UndefUsesToFix)
 
static ValuecloneConstantExprWithNewAddressSpace (ConstantExpr *CE, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace)
 
static ValuecloneValueWithNewAddressSpace (Value *V, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace, SmallVectorImpl< const Use * > *UndefUsesToFix)
 
static unsigned joinAddressSpaces (unsigned AS1, unsigned AS2)
 

Macro Definition Documentation

#define DEBUG_TYPE   "nvptx-infer-addrspace"

Definition at line 92 of file NVPTXInferAddressSpaces.cpp.

Function Documentation

static void appendsGenericAddressExpressionToPostorderStack ( Value V,
std::vector< std::pair< Value *, bool >> *  PostorderStack,
DenseSet< Value * > *  Visited 
)
static
static Value* cloneConstantExprWithNewAddressSpace ( ConstantExpr CE,
unsigned  NewAddrSpace,
const ValueToValueMapTy ValueWithNewAddrSpace 
)
static
static Value* cloneInstructionWithNewAddressSpace ( Instruction I,
unsigned  NewAddrSpace,
const ValueToValueMapTy ValueWithNewAddrSpace,
SmallVectorImpl< const Use * > *  UndefUsesToFix 
)
static
static Value* cloneValueWithNewAddressSpace ( Value V,
unsigned  NewAddrSpace,
const ValueToValueMapTy ValueWithNewAddrSpace,
SmallVectorImpl< const Use * > *  UndefUsesToFix 
)
static
static std::vector<Value *> collectGenericAddressExpressions ( Function F)
static
static SmallVector<Value *, 2> getPointerOperands ( const Value V)
static
INITIALIZE_PASS ( NVPTXInferAddressSpaces  ,
"nvptx-infer-addrspace"  ,
"Infer address spaces"  ,
false  ,
false   
) const

Definition at line 150 of file NVPTXInferAddressSpaces.cpp.

static unsigned joinAddressSpaces ( unsigned  AS1,
unsigned  AS2 
)
static

Definition at line 404 of file NVPTXInferAddressSpaces.cpp.

References llvm::ADDRESS_SPACE_GENERIC.

static Value* operandWithNewAddressSpaceOrCreateUndef ( const Use OperandUse,
unsigned  NewAddrSpace,
const ValueToValueMapTy ValueWithNewAddrSpace,
SmallVectorImpl< const Use * > *  UndefUsesToFix 
)
static