|
LLVM
7.0.0
|
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 459 of file MemorySSA.h.
| using llvm::MemoryPhi::block_iterator = BasicBlock ** |
Definition at line 475 of file MemorySSA.h.
| using llvm::MemoryPhi::const_block_iterator = BasicBlock *const * |
Definition at line 476 of file MemorySSA.h.
|
inline |
Definition at line 467 of file MemorySSA.h.
|
inline |
Add an incoming value to the end of the PHI list.
Definition at line 542 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 621 of file MemorySSA.h.
References llvm::User::allocHungoffUses(), E, and llvm::max().
|
inline |
Definition at line 478 of file MemorySSA.h.
References llvm::Ref.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 483 of file MemorySSA.h.
References llvm::Ref.
|
inline |
Definition at line 489 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 491 of file MemorySSA.h.
|
inline |
Definition at line 495 of file MemorySSA.h.
References llvm::make_range().
|
inline |
Definition at line 499 of file MemorySSA.h.
References llvm::make_range().
Definition at line 607 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 553 of file MemorySSA.h.
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 613 of file MemorySSA.h.
|
inline |
Return incoming basic block number i.
Definition at line 521 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 525 of file MemorySSA.h.
References assert(), and llvm::Use::getUser().
|
inline |
Return incoming basic block corresponding to value use iterator.
Definition at line 532 of file MemorySSA.h.
|
inline |
Return incoming value number x.
Definition at line 511 of file MemorySSA.h.
|
inline |
Definition at line 560 of file MemorySSA.h.
References assert().
Definition at line 518 of file MemorySSA.h.
References I.
|
inline |
Return the number of incoming edges.
Definition at line 508 of file MemorySSA.h.
Definition at line 517 of file MemorySSA.h.
References I.
|
inline |
Definition at line 503 of file MemorySSA.h.
|
inline |
Definition at line 505 of file MemorySSA.h.
| void MemoryPhi::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1940 of file MemorySSA.cpp.
References llvm::MemoryAccess::getID(), getID(), llvm::Value::getName(), llvm::Value::hasName(), LiveOnEntryStr, and llvm::Value::printAsOperand().
|
inline |
Definition at line 536 of file MemorySSA.h.
|
inline |
Definition at line 512 of file MemorySSA.h.
References assert().
Referenced by setMemoryPhiValueForBlock().
|
inline |
Definition at line 567 of file MemorySSA.h.
|
inline |
Definition at line 595 of file MemorySSA.h.
References B.
|
inline |
Definition at line 583 of file MemorySSA.h.
|
inline |
Definition at line 602 of file MemorySSA.h.
|
friend |
Definition at line 616 of file MemorySSA.h.
1.8.13