#include <MemoryDependenceAnalysis.h>
Public Types | |
|
typedef std::vector < NonLocalDepEntry > | NonLocalDepInfo |
Public Member Functions | |
| bool | runOnFunction (Function &) |
| Pass Implementation stuff. This doesn't do any analysis eagerly. | |
| void | releaseMemory () |
| Clean up memory in between runs. | |
| virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
| MemDepResult | getDependency (Instruction *QueryInst) |
| const NonLocalDepInfo & | getNonLocalCallDependency (CallSite QueryCS) |
| void | getNonLocalPointerDependency (Value *Pointer, bool isLoad, BasicBlock *BB, SmallVectorImpl< NonLocalDepResult > &Result) |
| void | removeInstruction (Instruction *InstToRemove) |
| void | invalidateCachedPointerInfo (Value *Ptr) |
| void | invalidateCachedPredecessors () |
Static Public Attributes | |
| static char | ID |
The dependency information returned is somewhat unusual, but is pragmatic. If queried about a store or call that might modify memory, the analysis will return the instruction[s] that may either load from that memory or store to it. If queried with a load or call that can never modify memory, the analysis will return calls and stores that might modify the pointer, but generally does not return loads unless a) they are volatile, or b) they load from *must-aliased* pointers. Returning a dependence on must-alias'd pointers instead of all pointers interacts well with the internal caching mechanism.
| virtual void llvm::MemoryDependenceAnalysis::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | const [virtual] |
getAnalysisUsage - Does not modify anything. It uses Value Numbering and Alias Analysis.
| MemDepResult llvm::MemoryDependenceAnalysis::getDependency | ( | Instruction * | QueryInst | ) |
getDependency - Return the instruction on which a memory operation depends. See the class comment for more details. It is illegal to call this on non-memory instructions.
| const NonLocalDepInfo& llvm::MemoryDependenceAnalysis::getNonLocalCallDependency | ( | CallSite | QueryCS | ) |
getNonLocalCallDependency - Perform a full dependency query for the specified call, returning the set of blocks that the value is potentially live across. The returned set of results will include a "NonLocal" result for all blocks where the value is live across.
This method assumes the instruction returns a "NonLocal" dependency within its own block.
This returns a reference to an internal data structure that may be invalidated on the next non-local query or when an instruction is removed. Clients must copy this data if they want it around longer than that.
| void llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency | ( | Value * | Pointer, | |
| bool | isLoad, | |||
| BasicBlock * | BB, | |||
| SmallVectorImpl< NonLocalDepResult > & | Result | |||
| ) |
getNonLocalPointerDependency - Perform a full dependency query for an access to the specified (non-volatile) memory location, returning the set of instructions that either define or clobber the value.
This method assumes the pointer has a "NonLocal" dependency within BB.
| void llvm::MemoryDependenceAnalysis::invalidateCachedPointerInfo | ( | Value * | Ptr | ) |
invalidateCachedPointerInfo - This method is used to invalidate cached information about the specified pointer, because it may be too conservative in memdep. This is an optional call that can be used when the client detects an equivalence between the pointer and some other value and replaces the other value with ptr. This can make Ptr available in more places that cached info does not necessarily keep.
| void llvm::MemoryDependenceAnalysis::invalidateCachedPredecessors | ( | ) |
invalidateCachedPredecessors - Clear the PredIteratorCache info. This needs to be done when the CFG changes, e.g., due to splitting critical edges.
| void llvm::MemoryDependenceAnalysis::removeInstruction | ( | Instruction * | InstToRemove | ) |
removeInstruction - Remove an instruction from the dependence analysis, updating the dependence of instructions that previously depended on it.
1.5.8