OpenASIP 2.2
|
#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 () | |
![]() | |
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 | |
![]() | |
enum | AliasingResult { ALIAS_FALSE = 0 , ALIAS_TRUE = 1 , ALIAS_UNKNOWN = 2 , ALIAS_PARTIAL = 3 } |
![]() | |
AliasingResult | compareIndeces (int index1, int index2, const ProgramOperation &pop1, const ProgramOperation &pop2) |
![]() | |
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 MemoryAliasAnalyzer::ALIAS_UNKNOWN, MemoryAliasAnalyzer::compareIndeces(), getStackOffset(), MoveNodeUse::LOOP, offsetData_, ProgramOperation::poId(), and sp_.
|
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 MemoryAliasAnalyzer::addressOperandMove(), MoveNodeSet::at(), MoveNodeSet::count(), MemoryAliasAnalyzer::findIncrement(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), 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(), analyze(), GlobalVsStackAA::isAddressTraceable(), and 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 getStackOffset(), offsetData_, ProgramOperation::poId(), and sp_.
|
private |
Definition at line 62 of file StackAliasAnalyzer.hh.
Referenced by analyze(), and isAddressTraceable().
|
private |
Definition at line 64 of file StackAliasAnalyzer.hh.
Referenced by analyze(), and isAddressTraceable().