mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user