OpenASIP
2.0
|
#include <StackAliasAnalyzer.hh>
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) |
StackAliasAnalyzer (const TCEString &sp) | |
~StackAliasAnalyzer () | |
Public Member Functions inherited from MemoryAliasAnalyzer | |
virtual void | initProcedure (TTAProgram::Procedure &) |
virtual | ~MemoryAliasAnalyzer () |
Static Public Member Functions | |
static bool | getStackOffset (DataDependenceGraph &ddg, const ProgramOperation &pop, long &offset, long &loopIncrement, const TCEString &sp_) |
Private Attributes | |
std::map< int, std::pair< long, long > > | offsetData_ |
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 MoveNode * | addressOperandMove (const ProgramOperation &po) |
static TwoPartAddressOperandDetection | findTwoPartAddressOperands (const ProgramOperation &po) |
static const MoveNode * | searchLoopIndexBasedIncrement (DataDependenceGraph &ddg, const MoveNode &mn, long &loopIncrement) |
static const MoveNode * | findIncrement (const MoveNode &mn, long &increment) |
static const MoveNode * | detectConstantScale (const MoveNode &mn, int &shiftAmount) |
Definition at line 46 of file StackAliasAnalyzer.hh.
StackAliasAnalyzer::StackAliasAnalyzer | ( | const TCEString & | sp | ) |
Definition at line 236 of file StackAliasAnalyzer.cc.
StackAliasAnalyzer::~StackAliasAnalyzer | ( | ) |
Definition at line 234 of file StackAliasAnalyzer.cc.
|
virtual |
Analyzes aliasing of two memory adderesses.
Checks if they are stack offsets and compares the offsets.
ddg | ddg where they belong. |
node1 | first node to compare |
another | anpther node to compare |
Implements MemoryAliasAnalyzer.
Definition at line 182 of file StackAliasAnalyzer.cc.
References MoveNodeUse::LOOP, and ProgramOperation::poId().
|
static |
Gets stack offset of a move which is transporting an address.
ddg | DDG where to track the address from. |
node | Node which transfers the address. |
stackOffset | place where to return the stack offset. |
Definition at line 90 of file StackAliasAnalyzer.cc.
References MoveNodeSet::at(), MoveNodeSet::count(), ProgramOperation::inputNode(), SimValue::intValue(), MoveNode::isMove(), MoveNode::isSourceConstant(), MoveNode::isSourceOperation(), MoveNode::isSourceReg(), MoveNode::isSourceVariable(), MoveNode::move(), MemoryAliasAnalyzer::TwoPartAddressOperandDetection::offsetOperation, DataDependenceGraph::onlyRegisterRawSource(), MemoryAliasAnalyzer::TwoPartAddressOperandDetection::operand1, MemoryAliasAnalyzer::TwoPartAddressOperandDetection::operand2, TTAProgram::Move::source(), and TTAProgram::Terminal::value().
Referenced by GlobalVsStackAA::analyze(), and GlobalVsStackAA::isAddressTraceable().
|
virtual |
Checks if the node contains an adress that is an stack offset.
ddg | DDG where to analyze from |
mn | the node being checked |
Implements MemoryAliasAnalyzer.
Definition at line 62 of file StackAliasAnalyzer.cc.
References ProgramOperation::poId().
|
private |
Definition at line 62 of file StackAliasAnalyzer.hh.
|
private |
Definition at line 64 of file StackAliasAnalyzer.hh.