LLVM
8.0.1
|
Represents phi nodes for memory accesses. More...
#include "llvm/Analysis/MemorySSA.h"
Public Types | |
using | block_iterator = BasicBlock ** |
using | const_block_iterator = BasicBlock *const * |
Public Types inherited from llvm::MemoryAccess | |
using | AllAccessType = ilist_node< MemoryAccess, ilist_tag< MSSAHelpers::AllAccessTag > > |
using | DefsOnlyType = ilist_node< MemoryAccess, ilist_tag< MSSAHelpers::DefsOnlyTag > > |
using | iterator = user_iterator |
The user iterators for a memory access. More... | |
using | const_iterator = const_user_iterator |
Public Types inherited from llvm::User | |
using | op_iterator = Use * |
using | const_op_iterator = const Use * |
using | op_range = iterator_range< op_iterator > |
using | const_op_range = iterator_range< const_op_iterator > |
Public Types inherited from llvm::Value | |
enum | ValueTy |
Concrete subclass of this. More... | |
using | use_iterator = use_iterator_impl< Use > |
using | const_use_iterator = use_iterator_impl< const Use > |
using | user_iterator = user_iterator_impl< User > |
using | const_user_iterator = user_iterator_impl< const User > |
Static Public Member Functions | |
static unsigned | getOperandNumForIncomingValue (unsigned I) |
static unsigned | getIncomingValueNumForOperand (unsigned I) |
static bool | classof (const Value *V) |
Static Public Member Functions inherited from llvm::MemoryAccess | |
static bool | classof (const Value *V) |
Static Public Member Functions inherited from llvm::User | |
static bool | classof (const Value *V) |
Protected Member Functions | |
void | allocHungoffUses (unsigned N) |
this is more complicated than the generic User::allocHungoffUses, because we have to allocate Uses for the incoming values and pointers to the incoming blocks, all in one allocation. More... | |
Protected Member Functions inherited from llvm::MemoryAccess | |
void | setBlock (BasicBlock *BB) |
Used by MemorySSA to change the block of a MemoryAccess when it is moved. More... | |
unsigned | getID () const |
Used for debugging and tracking things about MemoryAccesses. More... | |
MemoryAccess (LLVMContext &C, unsigned Vty, DeleteValueTy DeleteValue, BasicBlock *BB, unsigned NumOperands) | |
~MemoryAccess ()=default | |
Protected Member Functions inherited from llvm::User | |
void * | operator new (size_t Size) |
Allocate a User with an operand pointer co-allocated. More... | |
void * | operator new (size_t Size, unsigned Us) |
Allocate a User with the operands co-allocated. More... | |
void * | operator new (size_t Size, unsigned Us, unsigned DescBytes) |
Allocate a User with the operands co-allocated. More... | |
User (Type *ty, unsigned vty, Use *, unsigned NumOps) | |
void | allocHungoffUses (unsigned N, bool IsPhi=false) |
Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User. More... | |
void | growHungoffUses (unsigned N, bool IsPhi=false) |
Grow the number of hung off uses. More... | |
~User ()=default | |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
const Use & | Op () const |
Protected Member Functions inherited from llvm::Value | |
Value (Type *Ty, unsigned scid) | |
~Value () | |
Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID. More... | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< MemoryAccess, Options... >::type > | |
ilist_node_impl ()=default | |
Friends | |
class | MemorySSA |
Represents phi nodes for memory accesses.
These have the same semantic as regular phi nodes, with the exception that only one phi will ever exist in a given basic block. Guaranteeing one phi per block means guaranteeing there is only ever one valid reaching MemoryDef/MemoryPHI along each path to the phi node. This is ensured by not allowing disambiguation of the RHS of a MemoryDef or a MemoryPhi's operands. That is, given if (a) { store a store b } it must be transformed into if (a) { 1 = MemoryDef(liveOnEntry) store a 2 = MemoryDef(1) store b } and not if (a) { 1 = MemoryDef(liveOnEntry) store a 2 = MemoryDef(liveOnEntry) store b } even if the two stores do not conflict. Otherwise, both 1 and 2 reach the end of the branch, and if there are not two phi nodes, one will be disconnected completely from the SSA graph below that point. Because MemoryUse's do not generate new definitions, they do not have this issue.
Definition at line 479 of file MemorySSA.h.
using llvm::MemoryPhi::block_iterator = BasicBlock ** |
Definition at line 495 of file MemorySSA.h.
using llvm::MemoryPhi::const_block_iterator = BasicBlock *const * |
Definition at line 496 of file MemorySSA.h.
|
inline |
Definition at line 487 of file MemorySSA.h.
|
inline |
Add an incoming value to the end of the PHI list.
Definition at line 562 of file MemorySSA.h.
Referenced by llvm::MemorySSAUpdater::applyInsertUpdates(), and llvm::MemorySSAUpdater::updateForClonedLoop().
|
inlineprotected |
this is more complicated than the generic User::allocHungoffUses, because we have to allocate Uses for the incoming values and pointers to the incoming blocks, all in one allocation.
Definition at line 641 of file MemorySSA.h.
References llvm::User::allocHungoffUses(), E, and llvm::max().
|
inline |
Definition at line 498 of file MemorySSA.h.
References llvm::Ref.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 503 of file MemorySSA.h.
References llvm::Ref.
|
inline |
Definition at line 509 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 511 of file MemorySSA.h.
|
inline |
Definition at line 515 of file MemorySSA.h.
References llvm::make_range().
|
inline |
Definition at line 519 of file MemorySSA.h.
References llvm::make_range().
Definition at line 627 of file MemorySSA.h.
References llvm::Value::getValueID(), and print().
llvm::MemoryPhi::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | MemoryAccess | ) |
Provide fast operand accessors.
|
inline |
Return the first index of the specified basic block in the value list for this PHI.
Returns -1 if no instance.
Definition at line 573 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 633 of file MemorySSA.h.
|
inline |
Return incoming basic block number i
.
Definition at line 541 of file MemorySSA.h.
References I.
Referenced by llvm::memoryaccess_def_iterator_base< MemoryAccess >::getPhiArgBlock(), and llvm::MemorySSAUpdater::updateForClonedLoop().
|
inline |
Return incoming basic block corresponding to an operand of the PHI.
Definition at line 545 of file MemorySSA.h.
References assert(), and llvm::Use::getUser().
|
inline |
Return incoming basic block corresponding to value use iterator.
Definition at line 552 of file MemorySSA.h.
|
inline |
Return incoming value number x.
Definition at line 531 of file MemorySSA.h.
Referenced by llvm::MemorySSAUpdater::updateForClonedLoop().
|
inline |
Definition at line 580 of file MemorySSA.h.
References assert().
Definition at line 538 of file MemorySSA.h.
References I.
|
inline |
Return the number of incoming edges.
Definition at line 528 of file MemorySSA.h.
Referenced by llvm::MemorySSAUpdater::updateForClonedLoop().
Definition at line 537 of file MemorySSA.h.
References I.
|
inline |
Definition at line 523 of file MemorySSA.h.
|
inline |
Definition at line 525 of file MemorySSA.h.
void MemoryPhi::print | ( | raw_ostream & | OS | ) | const |
Definition at line 2090 of file MemorySSA.cpp.
References llvm::MemoryAccess::getID(), getID(), llvm::Value::getName(), llvm::Value::hasName(), LiveOnEntryStr, and llvm::Value::printAsOperand().
|
inline |
Definition at line 556 of file MemorySSA.h.
|
inline |
Definition at line 532 of file MemorySSA.h.
References assert().
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 587 of file MemorySSA.h.
|
inline |
Definition at line 615 of file MemorySSA.h.
References B.
|
inline |
Definition at line 603 of file MemorySSA.h.
|
inline |
Definition at line 622 of file MemorySSA.h.
|
friend |
Definition at line 636 of file MemorySSA.h.