|
LLVM
5.0.0
|
Represents phi nodes for memory accesses. More...
#include "llvm/Analysis/MemorySSA.h"
Public Types | |
| typedef BasicBlock ** | block_iterator |
| typedef BasicBlock *const * | const_block_iterator |
Public Types inherited from llvm::MemoryAccess | |
| using | AllAccessType = ilist_node< MemoryAccess, ilist_tag< MSSAHelpers::AllAccessTag >> |
| using | DefsOnlyType = ilist_node< MemoryAccess, ilist_tag< MSSAHelpers::DefsOnlyTag >> |
| typedef user_iterator | iterator |
| The user iterators for a memory access. More... | |
| typedef const_user_iterator | const_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) | |
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 423 of file MemorySSA.h.
| typedef BasicBlock** llvm::MemoryPhi::block_iterator |
Definition at line 439 of file MemorySSA.h.
Definition at line 440 of file MemorySSA.h.
|
inline |
Definition at line 431 of file MemorySSA.h.
|
inline |
Add an incoming value to the end of the PHI list.
Definition at line 505 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 543 of file MemorySSA.h.
References llvm::User::allocHungoffUses().
|
inline |
Definition at line 442 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 447 of file MemorySSA.h.
|
inline |
Definition at line 453 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 455 of file MemorySSA.h.
|
inline |
Definition at line 459 of file MemorySSA.h.
References llvm::make_range().
|
inline |
Definition at line 463 of file MemorySSA.h.
References llvm::make_range().
Definition at line 529 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 516 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 535 of file MemorySSA.h.
|
inline |
Return incoming basic block number i.
Definition at line 484 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 488 of file MemorySSA.h.
References assert(), and llvm::Use::getUser().
|
inline |
Return incoming basic block corresponding to value use iterator.
Definition at line 495 of file MemorySSA.h.
|
inline |
Return incoming value number x.
Definition at line 475 of file MemorySSA.h.
Referenced by llvm::MemorySSA::verifyDefUses().
|
inline |
Definition at line 523 of file MemorySSA.h.
References assert().
Definition at line 481 of file MemorySSA.h.
References I.
|
inline |
Return the number of incoming edges.
Definition at line 472 of file MemorySSA.h.
Referenced by llvm::MemorySSA::verifyDefUses().
Definition at line 480 of file MemorySSA.h.
References I.
|
inline |
Definition at line 467 of file MemorySSA.h.
|
inline |
Definition at line 469 of file MemorySSA.h.
| void llvm::MemoryPhi::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1821 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 499 of file MemorySSA.h.
|
inline |
Definition at line 476 of file MemorySSA.h.
References assert().
Referenced by setMemoryPhiValueForBlock().
|
friend |
Definition at line 538 of file MemorySSA.h.
1.8.6