OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
GlobalVsStackAA Class Reference

#include <GlobalVsStackAA.hh>

Inheritance diagram for GlobalVsStackAA:
Inheritance graph
Collaboration diagram for GlobalVsStackAA:
Collaboration graph

Public Member Functions

virtual bool isAddressTraceable (DataDependenceGraph &ddg, const ProgramOperation &pop)
 
virtual AliasingResult analyze (DataDependenceGraph &ddg, const ProgramOperation &pop1, const ProgramOperation &pop2, MoveNodeUse::BBRelation bbInfo)
 
 GlobalVsStackAA (const TCEString &sp)
 
virtual ~GlobalVsStackAA ()
 
- Public Member Functions inherited from MemoryAliasAnalyzer
virtual void initProcedure (TTAProgram::Procedure &)
 
virtual ~MemoryAliasAnalyzer ()
 

Private Attributes

TCEString sp_
 

Additional Inherited Members

- Public Types inherited from MemoryAliasAnalyzer
enum  AliasingResult { ALIAS_FALSE = 0, ALIAS_TRUE = 1, ALIAS_UNKNOWN = 2, ALIAS_PARTIAL = 3 }
 
- Protected Member Functions inherited from MemoryAliasAnalyzer
AliasingResult compareIndeces (int index1, int index2, const ProgramOperation &pop1, const ProgramOperation &pop2)
 
- Static Protected Member Functions inherited from MemoryAliasAnalyzer
static const MoveNodeaddressOperandMove (const ProgramOperation &po)
 
static TwoPartAddressOperandDetection findTwoPartAddressOperands (const ProgramOperation &po)
 
static const MoveNodesearchLoopIndexBasedIncrement (DataDependenceGraph &ddg, const MoveNode &mn, long &loopIncrement)
 
static const MoveNodefindIncrement (const MoveNode &mn, long &increment)
 
static const MoveNodedetectConstantScale (const MoveNode &mn, int &shiftAmount)
 

Detailed Description

Definition at line 39 of file GlobalVsStackAA.hh.

Constructor & Destructor Documentation

◆ GlobalVsStackAA()

GlobalVsStackAA::GlobalVsStackAA ( const TCEString sp)

Definition at line 39 of file GlobalVsStackAA.cc.

39  : sp_(sp) {
40 }

◆ ~GlobalVsStackAA()

GlobalVsStackAA::~GlobalVsStackAA ( )
virtual

Definition at line 37 of file GlobalVsStackAA.cc.

37 {}

Member Function Documentation

◆ analyze()

MemoryAliasAnalyzer::AliasingResult GlobalVsStackAA::analyze ( DataDependenceGraph ddg,
const ProgramOperation pop1,
const ProgramOperation pop2,
MoveNodeUse::BBRelation  bbInfo 
)
virtual

Implements MemoryAliasAnalyzer.

Definition at line 17 of file GlobalVsStackAA.cc.

21  {
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 }

References MemoryAliasAnalyzer::ALIAS_FALSE, MemoryAliasAnalyzer::ALIAS_UNKNOWN, ConstantAliasAnalyzer::getConstantAddress(), StackAliasAnalyzer::getStackOffset(), and sp_.

Here is the call graph for this function:

◆ isAddressTraceable()

bool GlobalVsStackAA::isAddressTraceable ( DataDependenceGraph ddg,
const ProgramOperation pop 
)
virtual

Checks whether the analyzer knows anything about the address.

ie. if it can return true or false to some query concerning this address.

Returns
true if analyzer can know something about the address.

Implements MemoryAliasAnalyzer.

Definition at line 7 of file GlobalVsStackAA.cc.

8  {
9  long tmp;
10  long tmp2;
11  return ConstantAliasAnalyzer::getConstantAddress(ddg, po, tmp, tmp2) ||
12  StackAliasAnalyzer::getStackOffset(ddg, po, tmp, tmp2, sp_);
13 }

References ConstantAliasAnalyzer::getConstantAddress(), StackAliasAnalyzer::getStackOffset(), and sp_.

Here is the call graph for this function:

Member Data Documentation

◆ sp_

TCEString GlobalVsStackAA::sp_
private

Definition at line 50 of file GlobalVsStackAA.hh.

Referenced by analyze(), and isAddressTraceable().


The documentation for this class was generated from the following files:
MemoryAliasAnalyzer::ALIAS_UNKNOWN
@ ALIAS_UNKNOWN
Definition: MemoryAliasAnalyzer.hh:54
MemoryAliasAnalyzer::ALIAS_FALSE
@ ALIAS_FALSE
Definition: MemoryAliasAnalyzer.hh:50
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