REmove an old fixme, resolve another fixme by adding liberal

comments about what this class does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-11-30 01:17:08 +00:00
parent 125ce36269
commit 0e0a5b690c
2 changed files with 12 additions and 3 deletions

View File

@ -80,6 +80,17 @@ namespace llvm {
/// given memory operation, what preceding memory operations it depends on.
/// It builds on alias analysis information, and tries to provide a lazy,
/// caching interface to a common kind of alias information query.
///
/// 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.
///
class MemoryDependenceAnalysis : public FunctionPass {
/// DepType - This enum is used to indicate what flavor of dependence this
/// is. If the type is Normal, there is an associated instruction pointer.
@ -153,7 +164,7 @@ namespace llvm {
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
/// getDependency - Return the instruction on which a memory operation
/// depends.
/// depends. See the class comment for more details.
MemDepResult getDependency(Instruction *QueryInst);
/// getDependencyFrom - Return the instruction on which the memory operation

View File

@ -153,7 +153,6 @@ getNonLocalDependency(Instruction *QueryInst,
if (DirtyBBEntry.getInt() != Dirty) continue;
// Find out if this block has a local dependency for QueryInst.
// FIXME: If the dirty entry has an instruction pointer, scan from it!
// FIXME: Don't convert back and forth for MemDepResult <-> DepResultTy.
// If the dirty entry has a pointer, start scanning from it so we don't have
@ -234,7 +233,6 @@ getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt,
// MemDep is broken w.r.t. loads: it says that two loads of the same pointer
// depend on each other. :(
// FIXME: ELIMINATE THIS!
if (LoadInst *L = dyn_cast<LoadInst>(Inst)) {
Value *Pointer = L->getPointerOperand();
uint64_t PointerSize = TD.getTypeStoreSize(L->getType());