OpenASIP
2.0
src
applibs
Scheduler
ProgramRepresentations
DDG
GlobalVsStackAA.cc
Go to the documentation of this file.
1
#include "
GlobalVsStackAA.hh
"
2
#include "
ConstantAliasAnalyzer.hh
"
3
#include "
StackAliasAnalyzer.hh
"
4
5
6
bool
7
GlobalVsStackAA::isAddressTraceable
(
8
DataDependenceGraph
& ddg,
const
ProgramOperation
& po) {
9
long
tmp;
10
long
tmp2;
11
return
ConstantAliasAnalyzer::getConstantAddress
(ddg, po, tmp, tmp2) ||
12
StackAliasAnalyzer::getStackOffset
(ddg, po, tmp, tmp2,
sp_
);
13
}
14
15
// TODO: does not handle unaligned 64-bit memory operations well.
16
MemoryAliasAnalyzer::AliasingResult
17
GlobalVsStackAA::analyze
(
18
DataDependenceGraph
& ddg,
19
const
ProgramOperation
& pop1,
20
const
ProgramOperation
& pop2,
21
MoveNodeUse::BBRelation
) {
22
23
long
tmp;
24
long
tmp2;
25
long
tmp3;
26
long
tmp4;
27
if
((
StackAliasAnalyzer::getStackOffset
(ddg, pop2, tmp2, tmp4,
sp_
) &&
28
ConstantAliasAnalyzer::getConstantAddress
(ddg, pop1, tmp, tmp3)) ||
29
(
StackAliasAnalyzer::getStackOffset
(ddg, pop1, tmp2, tmp4,
sp_
) &&
30
ConstantAliasAnalyzer::getConstantAddress
(ddg, pop2, tmp, tmp3))) {
31
return
ALIAS_FALSE
;
32
}
33
return
ALIAS_UNKNOWN
;
34
35
}
36
37
GlobalVsStackAA::~GlobalVsStackAA
() {}
38
39
GlobalVsStackAA::GlobalVsStackAA
(
const
TCEString
& sp) : sp_(sp) {
40
}
MemoryAliasAnalyzer::ALIAS_UNKNOWN
@ ALIAS_UNKNOWN
Definition:
MemoryAliasAnalyzer.hh:54
MoveNodeUse::BBRelation
BBRelation
Definition:
MoveNodeUse.hh:23
GlobalVsStackAA::analyze
virtual AliasingResult analyze(DataDependenceGraph &ddg, const ProgramOperation &pop1, const ProgramOperation &pop2, MoveNodeUse::BBRelation bbInfo)
Definition:
GlobalVsStackAA.cc:17
StackAliasAnalyzer.hh
MemoryAliasAnalyzer::ALIAS_FALSE
@ ALIAS_FALSE
Definition:
MemoryAliasAnalyzer.hh:50
ProgramOperation
Definition:
ProgramOperation.hh:70
ConstantAliasAnalyzer.hh
MemoryAliasAnalyzer::AliasingResult
AliasingResult
Definition:
MemoryAliasAnalyzer.hh:50
GlobalVsStackAA::isAddressTraceable
virtual bool isAddressTraceable(DataDependenceGraph &ddg, const ProgramOperation &pop)
Definition:
GlobalVsStackAA.cc:7
GlobalVsStackAA.hh
TCEString
Definition:
TCEString.hh:53
DataDependenceGraph
Definition:
DataDependenceGraph.hh:67
StackAliasAnalyzer::getStackOffset
static bool getStackOffset(DataDependenceGraph &ddg, const ProgramOperation &pop, long &offset, long &loopIncrement, const TCEString &sp_)
Definition:
StackAliasAnalyzer.cc:90
GlobalVsStackAA::sp_
TCEString sp_
Definition:
GlobalVsStackAA.hh:50
ConstantAliasAnalyzer::getConstantAddress
static bool getConstantAddress(DataDependenceGraph &ddg, const ProgramOperation &po, long &addr, long &loopIncrement)
Definition:
ConstantAliasAnalyzer.cc:50
GlobalVsStackAA::~GlobalVsStackAA
virtual ~GlobalVsStackAA()
Definition:
GlobalVsStackAA.cc:37
GlobalVsStackAA::GlobalVsStackAA
GlobalVsStackAA(const TCEString &sp)
Definition:
GlobalVsStackAA.cc:39
Generated by
1.8.17