Add initial support for non-local memory dependence analysis.

NOTE: This has only been cursorily tested.  Expected improvements soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40476 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2007-07-24 21:52:37 +00:00
parent bf31b85ea2
commit 4beedbd006
2 changed files with 58 additions and 7 deletions

View File

@@ -20,6 +20,7 @@
#include "llvm/Pass.h"
#include "llvm/Support/CallSite.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/Compiler.h"
#include <map>
@@ -37,6 +38,7 @@ class MemoryDependenceAnalysis : public FunctionPass {
Instruction* getCallSiteDependency(CallSite C, Instruction* start,
bool local = true);
SmallPtrSet<Instruction*, 4> nonLocalHelper(Instruction* query, BasicBlock* block);
public:
static Instruction* NonLocal;
@@ -63,7 +65,9 @@ class MemoryDependenceAnalysis : public FunctionPass {
/// getDependency - Return the instruction on which a memory operation
/// depends, starting with start.
Instruction* getDependency(Instruction* query, Instruction* start = 0,
bool local = true);
BasicBlock* block = 0);
SmallPtrSet<Instruction*, 4> getNonLocalDependency(Instruction* query);
/// removeInstruction - Remove an instruction from the dependence analysis,
/// updating the dependence of instructions that previously depended on it.