LLVM: llvm::MemorySSA Class Reference (original) (raw)
Encapsulates MemorySSA, including all data associated with memory accesses. More...
#include "[llvm/Analysis/MemorySSA.h](MemorySSA%5F8h%5Fsource.html)"
| Classes | |
|---|---|
| class | CachingWalker |
| A MemorySSAWalker that does AA walks to disambiguate accesses. More... | |
| class | ClobberWalkerBase |
| class | OptimizeUses |
| This class is a batch walker of all MemoryUse's in the program, and points their defining access at the thing that actually clobbers them. More... | |
| class | SkipSelfWalker |
| Public Types | |
|---|---|
| enum class | VerificationLevel { Fast, Full } |
| enum | InsertionPlace { Beginning, End, BeforeTerminator } |
| Used in various insertion functions to specify whether we are talking about the beginning or end of a block. More... | |
| using | AccessList = iplist<MemoryAccess, ilist_tag<MSSAHelpers::AllAccessTag>> |
| using | DefsList |
| Friends | |
|---|---|
| class | MemorySSAUpdater |
Encapsulates MemorySSA, including all data associated with memory accesses.
Definition at line 702 of file MemorySSA.h.
◆ AccessList
◆ DefsList
Initial value:
A simple intrusive list implementation.
Definition at line 754 of file MemorySSA.h.
◆ InsertionPlace
Used in various insertion functions to specify whether we are talking about the beginning or end of a block.
| Enumerator |
|---|
| Beginning |
| End |
| BeforeTerminator |
Definition at line 793 of file MemorySSA.h.
◆ VerificationLevel
◆ MemorySSA() [2/3]
◆ MemorySSA() [3/3]
| llvm::MemorySSA::MemorySSA ( MemorySSA && ) | delete |
|---|
◆ ~MemorySSA()
| MemorySSA::~MemorySSA | ( | ) |
|---|
◆ createDefinedAccess()
◆ dominates() [1/2]
◆ dominates() [2/2]
◆ dump()
◆ ensureOptimizedUses()
| void MemorySSA::ensureOptimizedUses | ( | ) |
|---|
◆ getAA()
◆ getBlockAccesses()
◆ getBlockDefs()
◆ getDomTree()
◆ getLiveOnEntryDef()
| MemoryAccess * llvm::MemorySSA::getLiveOnEntryDef ( ) const | inline |
|---|
◆ getMemoryAccess() [1/2]
◆ getMemoryAccess() [2/2]
Given a memory Mod/Ref'ing instruction, get the MemorySSA access associated with it.
If passed a basic block gets the memory phi node that exists for that block, if there is one. Otherwise, this will get a MemoryUseOrDef.
Definition at line 720 of file MemorySSA.h.
References llvm::cast_or_null(), and I.
Referenced by buildPartialInvariantUnswitchConditionalBranch(), llvm::canSinkOrHoistInst(), cloneInstructionInExitBlock(), getMatchingValue(), getNewDefiningAccessForClone(), llvm::hasPartialIVCondition(), llvm::Loop::makeLoopInvariant(), llvm::MergeBlockIntoPredecessor(), moveInstructionBefore(), noConflictingReadWrites(), overreadUndefContents(), runMoveAutoInit(), simplifyLoopInst(), sinkInstruction(), turnGuardIntoBranch(), usersDominator(), verifyOrderingDominationAndDefUses(), and verifyPrevDefInPhis().
◆ getSkipSelfWalker()
◆ getWalker()
◆ getWritableBlockAccesses()
| AccessList * llvm::MemorySSA::getWritableBlockAccesses ( const BasicBlock * BB) const | inlineprotected |
|---|
◆ getWritableBlockDefs()
| DefsList * llvm::MemorySSA::getWritableBlockDefs ( const BasicBlock * BB) const | inlineprotected |
|---|
◆ insertIntoListsBefore()
◆ insertIntoListsForBlock()
◆ isLiveOnEntryDef()
◆ locallyDominates()
◆ moveTo() [1/2]
◆ moveTo() [2/2]
◆ print()
◆ removeFromLists()
Properly remove MA from all of MemorySSA's lists.
Because of the way the intrusive list and use lists work, it is important to do removal in the right order. ShouldDelete defaults to true, and will cause the memory access to also be deleted, not just removed.
Definition at line 1866 of file MemorySSA.cpp.
References Accesses, llvm::MemoryAccess::getBlock(), and llvm::isa().
◆ removeFromLookups()
| void MemorySSA::removeFromLookups ( MemoryAccess * MA) | protected |
|---|
◆ renamePass()
◆ verifyDominationNumbers()
template
| void MemorySSA::verifyDominationNumbers ( IterT Blocks) const | protected |
|---|
◆ verifyMemorySSA()
| void MemorySSA::verifyMemorySSA | ( | VerificationLevel | VL = VerificationLevel::Fast | ) | const |
|---|
Verify that MemorySSA is self consistent (IE definitions dominate all uses, uses appear in the right places).
This is used by unit tests.
Definition at line 1905 of file MemorySSA.cpp.
References assert(), Full, llvm::iterator_range(), llvm::map_range(), verifyDominationNumbers(), verifyOrderingDominationAndDefUses(), and verifyPrevDefInPhis().
Referenced by llvm::deleteDeadLoop(), llvm::hoistRegion(), injectPendingInvariantConditions(), mergeBlocksIntoPredecessors(), llvm::promoteLoopAccessesToScalars(), llvm::FunctionToLoopPassAdaptor::run(), llvm::LoopFlattenPass::run(), llvm::LoopInstSimplifyPass::run(), llvm::LoopRotatePass::run(), llvm::SimpleLoopUnswitchPass::run(), llvm::MemCpyOptPass::runImpl(), runMoveAutoInit(), simplifyLoopInst(), simplifyOneLoop(), llvm::sinkRegion(), llvm::splitBlockBefore(), turnGuardIntoBranch(), turnSelectIntoBranch(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), and unswitchTrivialSwitch().
◆ verifyOrderingDominationAndDefUses()
template
| void MemorySSA::verifyOrderingDominationAndDefUses ( IterT Blocks, VerificationLevel VL = VerificationLevel::Fast ) const | protected |
|---|
Verify ordering: the order and existence of MemoryAccesses matches the order and existence of memory affecting instructions.
Verify domination: each definition dominates all of its uses. Verify def-uses: the immediate use information - walk all the memory accesses and verifying that, for each use, it appears in the appropriate def's use list
Definition at line 2021 of file MemorySSA.cpp.
References assert(), B(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorImpl< T >::clear(), DL, dominates(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::end(), Full, getBlockAccesses(), getBlockDefs(), llvm::MemoryUseOrDef::getDefiningAccess(), getMemoryAccess(), I, llvm::is_contained(), llvm::isa(), llvm::pred_size(), llvm::predecessors(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::Value::uses().
Referenced by MemorySSAUpdater, and verifyMemorySSA().
◆ verifyPrevDefInPhis()
template
| void MemorySSA::verifyPrevDefInPhis ( IterT Blocks) const | protected |
|---|
◆ MemorySSAUpdater
The documentation for this class was generated from the following files:
- include/llvm/Analysis/MemorySSA.h
- lib/Analysis/MemorySSA.cpp