Polly 19.0.0git
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
polly::MemAccInst Class Referencefinal

Utility proxy to wrap the common members of LoadInst and StoreInst. More...

#include <ScopHelper.h>

Public Member Functions

 MemAccInst ()
 
 MemAccInst (const MemAccInst &Inst)
 
 MemAccInst (llvm::LoadInst &LI)
 
 MemAccInst (llvm::LoadInst *LI)
 
 MemAccInst (llvm::StoreInst &SI)
 
 MemAccInst (llvm::StoreInst *SI)
 
 MemAccInst (llvm::MemIntrinsic *MI)
 
 MemAccInst (llvm::CallInst *CI)
 
 MemAccInst (llvm::Instruction &I)
 
 MemAccInst (llvm::Instruction *I)
 
MemAccInstoperator= (const MemAccInst &Inst)
 
MemAccInstoperator= (llvm::LoadInst &LI)
 
MemAccInstoperator= (llvm::LoadInst *LI)
 
MemAccInstoperator= (llvm::StoreInst &SI)
 
MemAccInstoperator= (llvm::StoreInst *SI)
 
MemAccInstoperator= (llvm::MemIntrinsic &MI)
 
MemAccInstoperator= (llvm::MemIntrinsic *MI)
 
MemAccInstoperator= (llvm::CallInst &CI)
 
MemAccInstoperator= (llvm::CallInst *CI)
 
llvm::Instruction * get () const
 
 operator llvm::Instruction * () const
 
llvm::Instruction * operator-> () const
 
 operator bool () const
 
bool operator! () const
 
llvm::Value * getValueOperand () const
 
llvm::Value * getPointerOperand () const
 
bool isVolatile () const
 
bool isSimple () const
 
llvm::AtomicOrdering getOrdering () const
 
bool isUnordered () const
 
bool isNull () const
 
bool isInstruction () const
 
llvm::Instruction * asInstruction () const
 
bool isLoad () const
 
bool isStore () const
 
bool isCallInst () const
 
bool isMemIntrinsic () const
 
bool isMemSetInst () const
 
bool isMemTransferInst () const
 
llvm::LoadInst * asLoad () const
 
llvm::StoreInst * asStore () const
 
llvm::CallInst * asCallInst () const
 
llvm::MemIntrinsic * asMemIntrinsic () const
 
llvm::MemSetInst * asMemSetInst () const
 
llvm::MemTransferInst * asMemTransferInst () const
 

Static Public Member Functions

static bool isa (const llvm::Value &V)
 
static bool isa (const llvm::Value *V)
 
static MemAccInst cast (llvm::Value &V)
 
static MemAccInst cast (llvm::Value *V)
 
static MemAccInst cast_or_null (llvm::Value &V)
 
static MemAccInst cast_or_null (llvm::Value *V)
 
static MemAccInst dyn_cast (llvm::Value &V)
 
static MemAccInst dyn_cast (llvm::Value *V)
 

Private Attributes

llvm::Instruction * I
 

Detailed Description

Utility proxy to wrap the common members of LoadInst and StoreInst.

This works like the LLVM utility class CallSite, ie. it forwards all calls to either a LoadInst, StoreInst, MemIntrinsic or MemTransferInst. It is similar to LLVM's utility classes IntrinsicInst, MemIntrinsic, MemTransferInst, etc. in that it offers a common interface, but does not act as a fake base class. It is similar to StringRef and ArrayRef in that it holds a pointer to the referenced object and should be passed by-value as it is small enough.

This proxy can either represent a LoadInst instance, a StoreInst instance, a MemIntrinsic instance (memset, memmove, memcpy), a CallInst instance or a nullptr (only creatable using the default constructor); never an Instruction that is neither of the above mentioned. When representing a nullptr, only the following methods are defined: isNull(), isInstruction(), isLoad(), isStore(), ..., isMemTransferInst(), operator bool(), operator!()

The functions isa, cast, cast_or_null, dyn_cast are modeled te resemble those from llvm/Support/Casting.h. Partial template function specialization is currently not supported in C++ such that those cannot be used directly. (llvm::isa could, but then llvm:cast etc. would not have the expected behavior)

Definition at line 137 of file ScopHelper.h.

Constructor & Destructor Documentation

◆ MemAccInst() [1/10]

polly::MemAccInst::MemAccInst ( )
inline

Definition at line 142 of file ScopHelper.h.

Referenced by cast(), cast_or_null(), and dyn_cast().

◆ MemAccInst() [2/10]

polly::MemAccInst::MemAccInst ( const MemAccInst Inst)
inline

Definition at line 143 of file ScopHelper.h.

◆ MemAccInst() [3/10]

polly::MemAccInst::MemAccInst ( llvm::LoadInst &  LI)
inline

Definition at line 144 of file ScopHelper.h.

◆ MemAccInst() [4/10]

polly::MemAccInst::MemAccInst ( llvm::LoadInst *  LI)
inline

Definition at line 145 of file ScopHelper.h.

◆ MemAccInst() [5/10]

polly::MemAccInst::MemAccInst ( llvm::StoreInst &  SI)
inline

Definition at line 146 of file ScopHelper.h.

◆ MemAccInst() [6/10]

polly::MemAccInst::MemAccInst ( llvm::StoreInst *  SI)
inline

Definition at line 147 of file ScopHelper.h.

◆ MemAccInst() [7/10]

polly::MemAccInst::MemAccInst ( llvm::MemIntrinsic *  MI)
inline

Definition at line 148 of file ScopHelper.h.

◆ MemAccInst() [8/10]

polly::MemAccInst::MemAccInst ( llvm::CallInst *  CI)
inline

Definition at line 149 of file ScopHelper.h.

◆ MemAccInst() [9/10]

polly::MemAccInst::MemAccInst ( llvm::Instruction &  I)
inlineexplicit

Definition at line 150 of file ScopHelper.h.

References assert, I, and isa().

◆ MemAccInst() [10/10]

polly::MemAccInst::MemAccInst ( llvm::Instruction *  I)
inlineexplicit

Definition at line 151 of file ScopHelper.h.

References assert, I, and isa().

Member Function Documentation

◆ asCallInst()

llvm::CallInst * polly::MemAccInst::asCallInst ( ) const
inline

Definition at line 318 of file ScopHelper.h.

References I.

◆ asInstruction()

llvm::Instruction * polly::MemAccInst::asInstruction ( ) const
inline

◆ asLoad()

llvm::LoadInst * polly::MemAccInst::asLoad ( ) const
inline

Definition at line 316 of file ScopHelper.h.

References I.

Referenced by getOrdering(), getPointerOperand(), getValueOperand(), isSimple(), isUnordered(), and isVolatile().

◆ asMemIntrinsic()

llvm::MemIntrinsic * polly::MemAccInst::asMemIntrinsic ( ) const
inline

Definition at line 319 of file ScopHelper.h.

References I.

Referenced by getPointerOperand(), isSimple(), isUnordered(), and isVolatile().

◆ asMemSetInst()

llvm::MemSetInst * polly::MemAccInst::asMemSetInst ( ) const
inline

Definition at line 322 of file ScopHelper.h.

References I.

◆ asMemTransferInst()

llvm::MemTransferInst * polly::MemAccInst::asMemTransferInst ( ) const
inline

Definition at line 325 of file ScopHelper.h.

References I.

◆ asStore()

llvm::StoreInst * polly::MemAccInst::asStore ( ) const
inline

Definition at line 317 of file ScopHelper.h.

References I.

Referenced by getOrdering(), getPointerOperand(), getValueOperand(), isSimple(), isUnordered(), and isVolatile().

◆ cast() [1/2]

static MemAccInst polly::MemAccInst::cast ( llvm::Value &  V)
inlinestatic

Definition at line 161 of file ScopHelper.h.

References MemAccInst().

◆ cast() [2/2]

static MemAccInst polly::MemAccInst::cast ( llvm::Value *  V)
inlinestatic

Definition at line 164 of file ScopHelper.h.

References MemAccInst().

◆ cast_or_null() [1/2]

static MemAccInst polly::MemAccInst::cast_or_null ( llvm::Value &  V)
inlinestatic

Definition at line 167 of file ScopHelper.h.

References MemAccInst().

◆ cast_or_null() [2/2]

static MemAccInst polly::MemAccInst::cast_or_null ( llvm::Value *  V)
inlinestatic

Definition at line 170 of file ScopHelper.h.

References MemAccInst().

◆ dyn_cast() [1/2]

static MemAccInst polly::MemAccInst::dyn_cast ( llvm::Value &  V)
inlinestatic

◆ dyn_cast() [2/2]

static MemAccInst polly::MemAccInst::dyn_cast ( llvm::Value *  V)
inlinestatic

Definition at line 180 of file ScopHelper.h.

References assert, isa(), and MemAccInst().

◆ get()

llvm::Instruction * polly::MemAccInst::get ( ) const
inline

Definition at line 224 of file ScopHelper.h.

References assert, and I.

Referenced by operator->().

◆ getOrdering()

llvm::AtomicOrdering polly::MemAccInst::getOrdering ( ) const
inline

Definition at line 278 of file ScopHelper.h.

References asLoad(), asStore(), isCallInst(), isLoad(), isMemIntrinsic(), and isStore().

◆ getPointerOperand()

llvm::Value * polly::MemAccInst::getPointerOperand ( ) const
inline

◆ getValueOperand()

llvm::Value * polly::MemAccInst::getValueOperand ( ) const
inline

◆ isa() [1/2]

static bool polly::MemAccInst::isa ( const llvm::Value &  V)
inlinestatic

Definition at line 153 of file ScopHelper.h.

Referenced by dyn_cast(), and MemAccInst().

◆ isa() [2/2]

static bool polly::MemAccInst::isa ( const llvm::Value *  V)
inlinestatic

Definition at line 157 of file ScopHelper.h.

◆ isCallInst()

bool polly::MemAccInst::isCallInst ( ) const
inline

Definition at line 309 of file ScopHelper.h.

References I.

Referenced by getOrdering(), getPointerOperand(), getValueOperand(), isSimple(), isUnordered(), and isVolatile().

◆ isInstruction()

bool polly::MemAccInst::isInstruction ( ) const
inline

Definition at line 303 of file ScopHelper.h.

References I.

Referenced by operator bool().

◆ isLoad()

bool polly::MemAccInst::isLoad ( ) const
inline

◆ isMemIntrinsic()

bool polly::MemAccInst::isMemIntrinsic ( ) const
inline

Definition at line 310 of file ScopHelper.h.

References I.

Referenced by getOrdering(), getPointerOperand(), getValueOperand(), isSimple(), isUnordered(), and isVolatile().

◆ isMemSetInst()

bool polly::MemAccInst::isMemSetInst ( ) const
inline

Definition at line 311 of file ScopHelper.h.

References I.

◆ isMemTransferInst()

bool polly::MemAccInst::isMemTransferInst ( ) const
inline

Definition at line 312 of file ScopHelper.h.

References I.

◆ isNull()

bool polly::MemAccInst::isNull ( ) const
inline

Definition at line 302 of file ScopHelper.h.

References I.

Referenced by polly::BlockGenerator::generateLocationAccessed(), and operator!().

◆ isSimple()

bool polly::MemAccInst::isSimple ( ) const
inline

◆ isStore()

bool polly::MemAccInst::isStore ( ) const
inline

◆ isUnordered()

bool polly::MemAccInst::isUnordered ( ) const
inline

◆ isVolatile()

bool polly::MemAccInst::isVolatile ( ) const
inline

◆ operator bool()

polly::MemAccInst::operator bool ( ) const
inlineexplicit

Definition at line 231 of file ScopHelper.h.

References isInstruction().

◆ operator llvm::Instruction *()

polly::MemAccInst::operator llvm::Instruction * ( ) const
inline

Definition at line 228 of file ScopHelper.h.

References asInstruction().

◆ operator!()

bool polly::MemAccInst::operator! ( ) const
inline

Definition at line 232 of file ScopHelper.h.

References isNull().

◆ operator->()

llvm::Instruction * polly::MemAccInst::operator-> ( ) const
inline

Definition at line 229 of file ScopHelper.h.

References get().

◆ operator=() [1/9]

MemAccInst & polly::MemAccInst::operator= ( const MemAccInst Inst)
inline

Definition at line 187 of file ScopHelper.h.

References I.

◆ operator=() [2/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::CallInst &  CI)
inline

Definition at line 215 of file ScopHelper.h.

References I.

◆ operator=() [3/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::CallInst *  CI)
inline

Definition at line 219 of file ScopHelper.h.

References I.

◆ operator=() [4/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::LoadInst &  LI)
inline

Definition at line 191 of file ScopHelper.h.

References I.

◆ operator=() [5/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::LoadInst *  LI)
inline

Definition at line 195 of file ScopHelper.h.

References I.

◆ operator=() [6/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::MemIntrinsic &  MI)
inline

Definition at line 207 of file ScopHelper.h.

References I.

◆ operator=() [7/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::MemIntrinsic *  MI)
inline

Definition at line 211 of file ScopHelper.h.

References I.

◆ operator=() [8/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::StoreInst &  SI)
inline

Definition at line 199 of file ScopHelper.h.

References I.

◆ operator=() [9/9]

MemAccInst & polly::MemAccInst::operator= ( llvm::StoreInst *  SI)
inline

Definition at line 203 of file ScopHelper.h.

References I.

Member Data Documentation

◆ I

llvm::Instruction* polly::MemAccInst::I
private

The documentation for this class was generated from the following file: