|
LLVM
5.0.0
|
#include "llvm/Analysis/MemorySSAUpdater.h"
Definition at line 58 of file MemorySSAUpdater.h.
|
inline |
Definition at line 65 of file MemorySSAUpdater.h.
| MemoryUseOrDef * MemorySSAUpdater::createMemoryAccessAfter | ( | Instruction * | I, |
| MemoryAccess * | Definition, | ||
| MemoryAccess * | InsertPt | ||
| ) |
Definition at line 480 of file MemorySSAUpdater.cpp.
References assert(), llvm::MemorySSA::createDefinedAccess(), llvm::MemoryAccess::getBlock(), llvm::MemoryAccess::getIterator(), llvm::Instruction::getParent(), and llvm::MemorySSA::insertIntoListsBefore().
| MemoryUseOrDef * MemorySSAUpdater::createMemoryAccessBefore | ( | Instruction * | I, |
| MemoryAccess * | Definition, | ||
| MemoryUseOrDef * | InsertPt | ||
| ) |
Create a MemoryAccess in MemorySSA before or after an existing MemoryAccess.
Returns the new MemoryAccess. This should be called when a memory instruction is created that is being used to replace an existing memory instruction. It will not create PHI nodes, or verify the clobbering definition.
Note: If a MemoryAccess already exists for I, this function will make it inaccessible and it must have removeMemoryAccess called on it.
Definition at line 470 of file MemorySSAUpdater.cpp.
References assert(), llvm::MemorySSA::createDefinedAccess(), llvm::MemoryAccess::getBlock(), llvm::MemoryAccess::getIterator(), llvm::Instruction::getParent(), and llvm::MemorySSA::insertIntoListsBefore().
| MemoryAccess * MemorySSAUpdater::createMemoryAccessInBB | ( | Instruction * | I, |
| MemoryAccess * | Definition, | ||
| const BasicBlock * | BB, | ||
| MemorySSA::InsertionPlace | Point | ||
| ) |
Create a MemoryAccess in MemorySSA at a specified point in a block, with a specified clobbering definition.
Returns the new MemoryAccess. This should be called when a memory instruction is created that is being used to replace an existing memory instruction. It will not create PHI nodes, or verify the clobbering definition. The insertion place is used solely to determine where in the memoryssa access lists the instruction will be placed. The caller is expected to keep ordering the same as instructions. It will return the new MemoryAccess. Note: If a MemoryAccess already exists for I, this function will make it inaccessible and it must have removeMemoryAccess called on it.
Definition at line 462 of file MemorySSAUpdater.cpp.
References llvm::MemorySSA::createDefinedAccess(), and llvm::MemorySSA::insertIntoListsForBlock().
Insert a definition into the MemorySSA IR.
RenameUses will rename any use below the new def block (and any inserted phis). RenameUses should be set to true if the definition may cause new aliases for loads below it. This is not the case for hoisting or sinking or other forms of code movement. It is the case for straight code insertion. For example: store a if (foo) { } load a
Moving the store into the if block, and calling insertDef, does not require RenameUses. However, changing it to: store a if (foo) { store b } load a Where a mayalias b, does require RenameUses be set to true.
Definition at line 232 of file MemorySSAUpdater.cpp.
References llvm::simple_ilist< T, Options >::begin(), llvm::MemoryAccess::getBlock(), llvm::MemoryUseOrDef::getDefiningAccess(), llvm::Use::getUser(), llvm::MemorySSA::getWritableBlockDefs(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::MemorySSA::renamePass(), llvm::Use::set(), llvm::MemoryUseOrDef::setDefiningAccess(), llvm::Value::use_begin(), and llvm::Value::use_end().
| void MemorySSAUpdater::insertUse | ( | MemoryUse * | Use | ) |
Definition at line 195 of file MemorySSAUpdater.cpp.
References llvm::MemoryUseOrDef::setDefiningAccess().
| void MemorySSAUpdater::moveAfter | ( | MemoryUseOrDef * | What, |
| MemoryUseOrDef * | Where | ||
| ) |
Definition at line 391 of file MemorySSAUpdater.cpp.
References llvm::MemoryAccess::getBlock(), and llvm::MemoryAccess::getIterator().
| void MemorySSAUpdater::moveBefore | ( | MemoryUseOrDef * | What, |
| MemoryUseOrDef * | Where | ||
| ) |
Definition at line 386 of file MemorySSAUpdater.cpp.
References llvm::MemoryAccess::getBlock(), and llvm::MemoryAccess::getIterator().
| void MemorySSAUpdater::moveToPlace | ( | MemoryUseOrDef * | What, |
| BasicBlock * | BB, | ||
| MemorySSA::InsertionPlace | Where | ||
| ) |
Definition at line 395 of file MemorySSAUpdater.cpp.
| void MemorySSAUpdater::removeMemoryAccess | ( | MemoryAccess * | MA | ) |
Remove a MemoryAccess from MemorySSA, including updating all definitions and uses.
This should be called when a memory instruction that has a MemoryAccess associated with it is erased from the program. For example, if a store or load is simply erased (not replaced), removeMemoryAccess should be called on the MemoryAccess for that store/load.
Definition at line 414 of file MemorySSAUpdater.cpp.
References assert(), llvm::Use::getUser(), llvm::Value::hasValueHandle(), llvm::MemorySSA::isLiveOnEntryDef(), onlySingleValue(), llvm::MemorySSA::removeFromLists(), llvm::MemorySSA::removeFromLookups(), llvm::Use::set(), llvm::Value::use_begin(), llvm::Value::use_empty(), and llvm::ValueHandleBase::ValueIsRAUWd().
1.8.6