|
LLVM
4.0.0
|
Represents phi nodes for memory accesses. More...
#include <MemorySSA.h>
Public Types | |
| typedef BasicBlock ** | block_iterator |
| typedef BasicBlock *const * | const_block_iterator |
Public Types inherited from llvm::MemoryAccess | |
| typedef user_iterator | iterator |
| The user iterators for a memory access. More... | |
| typedef const_user_iterator | const_iterator |
Public Types inherited from llvm::User | |
| typedef Use * | op_iterator |
| typedef const Use * | const_op_iterator |
| typedef iterator_range < op_iterator > | op_range |
| typedef iterator_range < const_op_iterator > | const_op_range |
Public Types inherited from llvm::Value | |
| enum | ValueTy |
| Concrete subclass of this. More... | |
| typedef use_iterator_impl< Use > | use_iterator |
| typedef use_iterator_impl < const Use > | const_use_iterator |
| typedef user_iterator_impl< User > | user_iterator |
| typedef user_iterator_impl < const User > | const_user_iterator |
Static Public Member Functions | |
| static unsigned | getOperandNumForIncomingValue (unsigned I) |
| static unsigned | getIncomingValueNumForOperand (unsigned I) |
| static bool | classof (const MemoryPhi *) |
| static bool | classof (const Value *V) |
Static Public Member Functions inherited from llvm::MemoryAccess | |
| static bool | classof (const 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... | |
| unsigned | getID () const final |
| Used for debugging and tracking things about MemoryAccesses. More... | |
Protected Member Functions inherited from llvm::MemoryAccess | |
| MemoryAccess (LLVMContext &C, unsigned Vty, BasicBlock *BB, unsigned NumOperands) | |
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... | |
| template<int Idx> | |
| Use & | Op () |
| template<int Idx> | |
| const Use & | Op () const |
Protected Member Functions inherited from llvm::Value | |
| Value (Type *Ty, unsigned scid) | |
| 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 354 of file MemorySSA.h.
| typedef BasicBlock** llvm::MemoryPhi::block_iterator |
Definition at line 370 of file MemorySSA.h.
Definition at line 371 of file MemorySSA.h.
|
inline |
Definition at line 363 of file MemorySSA.h.
|
inline |
Add an incoming value to the end of the PHI list.
Definition at line 436 of file MemorySSA.h.
|
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 472 of file MemorySSA.h.
References llvm::User::allocHungoffUses().
|
inline |
Definition at line 373 of file MemorySSA.h.
|
inline |
Definition at line 378 of file MemorySSA.h.
|
inline |
Definition at line 384 of file MemorySSA.h.
|
inline |
Definition at line 386 of file MemorySSA.h.
|
inline |
Definition at line 390 of file MemorySSA.h.
References llvm::make_range().
|
inline |
Definition at line 394 of file MemorySSA.h.
References llvm::make_range().
Definition at line 460 of file MemorySSA.h.
Definition at line 461 of file MemorySSA.h.
References llvm::Value::getValueID().
| 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 447 of file MemorySSA.h.
|
inlinefinalprotectedvirtual |
Used for debugging and tracking things about MemoryAccesses.
Guaranteed unique among MemoryAccesses, no guarantees otherwise.
Implements llvm::MemoryAccess.
Definition at line 476 of file MemorySSA.h.
|
inline |
Return incoming basic block number i.
Definition at line 415 of file MemorySSA.h.
References I.
Referenced by llvm::memoryaccess_def_iterator_base< MemoryAccess >::getPhiArgBlock().
|
inline |
Return incoming basic block corresponding to an operand of the PHI.
Definition at line 419 of file MemorySSA.h.
References assert(), and llvm::Use::getUser().
|
inline |
Return incoming basic block corresponding to value use iterator.
Definition at line 426 of file MemorySSA.h.
|
inline |
Return incoming value number x.
Definition at line 406 of file MemorySSA.h.
Referenced by llvm::MemorySSA::verifyDefUses().
|
inline |
Definition at line 454 of file MemorySSA.h.
References assert().
Definition at line 412 of file MemorySSA.h.
References I.
|
inline |
Return the number of incoming edges.
Definition at line 403 of file MemorySSA.h.
Referenced by llvm::MemorySSA::verifyDefUses().
Definition at line 411 of file MemorySSA.h.
References I.
|
inline |
Definition at line 398 of file MemorySSA.h.
|
inline |
Definition at line 400 of file MemorySSA.h.
|
overridevirtual |
Implements llvm::MemoryAccess.
Definition at line 2030 of file MemorySSA.cpp.
References llvm::MemoryAccess::getID(), getID(), llvm::Value::getName(), llvm::Value::hasName(), llvm::LiveOnEntryStr, and llvm::Value::printAsOperand().
|
inline |
Definition at line 430 of file MemorySSA.h.
|
inline |
Definition at line 407 of file MemorySSA.h.
References assert().
|
friend |
Definition at line 468 of file MemorySSA.h.
1.8.6