|
LLVM
5.0.0
|
#include "llvm/ADT/DenseSet.h"#include "llvm/ADT/Optional.h"#include "llvm/ADT/SetVector.h"#include "llvm/Analysis/TargetTransformInfo.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/Scalar.h"#include "llvm/Transforms/Utils/Local.h"#include "llvm/Transforms/Utils/ValueMapper.h"Go to the source code of this file.
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
Macros | |
| #define | DEBUG_TYPE "infer-address-spaces" |
Functions | |
| void | llvm::initializeInferAddressSpacesPass (PassRegistry &) |
| INITIALIZE_PASS (InferAddressSpaces, DEBUG_TYPE,"Infer address spaces", false, false) static bool isAddressExpression(const Value &V) | |
| static SmallVector< Value *, 2 > | getPointerOperands (const Value &V) |
| static Value * | operandWithNewAddressSpaceOrCreateUndef (const Use &OperandUse, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace, SmallVectorImpl< const Use * > *UndefUsesToFix) |
| static Value * | cloneInstructionWithNewAddressSpace (Instruction *I, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace, SmallVectorImpl< const Use * > *UndefUsesToFix) |
| static Value * | cloneConstantExprWithNewAddressSpace (ConstantExpr *CE, unsigned NewAddrSpace, const ValueToValueMapTy &ValueWithNewAddrSpace) |
| static bool | isSimplePointerUseValidToReplace (Use &U) |
returns true if U is the pointer operand of a memory instruction with a single pointer operand that can have its address space changed by simply mutating the use to a new value. More... | |
| static bool | handleMemIntrinsicPtrUse (MemIntrinsic *MI, Value *OldV, Value *NewV) |
| Update memory intrinsic uses that require more complex processing than simple memory instructions. More... | |
| static Value::use_iterator | skipToNextUser (Value::use_iterator I, Value::use_iterator End) |
| #define DEBUG_TYPE "infer-address-spaces" |
Definition at line 106 of file InferAddressSpaces.cpp.
|
static |
Definition at line 470 of file InferAddressSpaces.cpp.
References assert(), llvm::ConstantExpr::getAddrSpaceCast(), llvm::ConstantExpr::getBitCast(), llvm::User::getNumOperands(), llvm::ConstantExpr::getOpcode(), llvm::User::getOperand(), llvm::Type::getPointerAddressSpace(), llvm::Type::getPointerElementType(), llvm::Type::getPointerTo(), llvm::ConstantExpr::getSelect(), getType(), llvm::Value::getType(), llvm::ConstantExpr::getWithOperands(), llvm::ValueMap< KeyT, ValueT, Config >::lookup(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::MCID::Select.
|
static |
Definition at line 407 of file InferAddressSpaces.cpp.
References assert(), llvm::GetElementPtrInst::Create(), llvm::SelectInst::Create(), llvm::PHINode::Create(), GEP, llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::PHINode::getOperandNumForIncomingValue(), llvm::Type::getPointerAddressSpace(), llvm::Type::getPointerElementType(), llvm::Type::getPointerTo(), llvm::GetElementPtrInst::getSourceElementType(), llvm::Value::getType(), I, llvm::GetElementPtrInst::idx_begin(), llvm::GetElementPtrInst::idx_end(), llvm::GetElementPtrInst::isInBounds(), llvm::Type::isPointerTy(), llvm_unreachable(), llvm::User::operands(), operandWithNewAddressSpaceOrCreateUndef(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::MCID::Select.
|
static |
Definition at line 206 of file InferAddressSpaces.cpp.
References llvm::Operator::getOpcode(), llvm::User::getOperand(), llvm_unreachable(), and llvm::MCID::Select.
|
static |
Update memory intrinsic uses that require more complex processing than simple memory instructions.
Thse require re-mangling and may have multiple pointer operands.
Definition at line 736 of file InferAddressSpaces.cpp.
References assert(), B, llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), llvm::Instruction::eraseFromParent(), llvm::Instruction::getMetadata(), llvm_unreachable(), llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_tbaa, and llvm::LLVMContext::MD_tbaa_struct.
| INITIALIZE_PASS | ( | InferAddressSpaces | , |
| DEBUG_TYPE | , | ||
| "Infer address spaces" | , | ||
| false | , | ||
| false | |||
| ) | const |
Definition at line 181 of file InferAddressSpaces.cpp.
References llvm::MCID::Select.
returns true if U is the pointer operand of a memory instruction with a single pointer operand that can have its address space changed by simply mutating the use to a new value.
Definition at line 712 of file InferAddressSpaces.cpp.
References llvm::Use::getOperandNo(), llvm::LoadInst::getPointerOperandIndex(), llvm::StoreInst::getPointerOperandIndex(), llvm::AtomicCmpXchgInst::getPointerOperandIndex(), llvm::AtomicRMWInst::getPointerOperandIndex(), llvm::Use::getUser(), and SI.
|
static |
Definition at line 379 of file InferAddressSpaces.cpp.
References C, llvm::Use::get(), llvm::UndefValue::get(), llvm::ConstantExpr::getAddrSpaceCast(), llvm::Type::getPointerElementType(), llvm::Type::getPointerTo(), llvm::Value::getType(), llvm::ValueMap< KeyT, ValueT, Config >::lookup(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by cloneInstructionWithNewAddressSpace().
|
static |
Definition at line 809 of file InferAddressSpaces.cpp.
References I.
1.8.6