OpenASIP  2.0
Private Member Functions | List of all members
PRegionAliasAnalyzer Class Reference

#include <PRegionAliasAnalyzer.hh>

Inheritance diagram for PRegionAliasAnalyzer:
Inheritance graph
Collaboration diagram for PRegionAliasAnalyzer:
Collaboration graph

Private Member Functions

virtual bool isAddressTraceable (DataDependenceGraph &ddg, const ProgramOperation &pop)
 
virtual AliasingResult analyze (DataDependenceGraph &ddg, const ProgramOperation &pop1, const ProgramOperation &pop2, MoveNodeUse::BBRelation bbInfo)
 
 ~PRegionAliasAnalyzer ()
 

Additional Inherited Members

- Public Types inherited from MemoryAliasAnalyzer
enum  AliasingResult { ALIAS_FALSE = 0, ALIAS_TRUE = 1, ALIAS_UNKNOWN = 2, ALIAS_PARTIAL = 3 }
 
- Public Member Functions inherited from MemoryAliasAnalyzer
virtual void initProcedure (TTAProgram::Procedure &)
 
virtual ~MemoryAliasAnalyzer ()
 
- 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 41 of file PRegionAliasAnalyzer.hh.

Constructor & Destructor Documentation

◆ ~PRegionAliasAnalyzer()

PRegionAliasAnalyzer::~PRegionAliasAnalyzer ( )
private

Definition at line 102 of file PRegionAliasAnalyzer.cc.

102 {}

Member Function Documentation

◆ analyze()

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

Implements MemoryAliasAnalyzer.

Definition at line 57 of file PRegionAliasAnalyzer.cc.

61  {
62 
63  const MoveNode *rawSrc1 = addressOperandMove(pop1);
64  const MoveNode *rawSrc2 = addressOperandMove(pop2);
65  if (rawSrc1 == NULL || rawSrc2 == NULL ||
66  !rawSrc1->isMove() || !rawSrc2->isMove()) return ALIAS_UNKNOWN;
67 
68  const TTAProgram::Move &m1 = rawSrc1->move();
69  const TTAProgram::Move &m2 = rawSrc2->move();
70  if (!m1.hasAnnotations(ProgramAnnotation::ANN_PARALLEL_REGION_ID) ||
71  !m2.hasAnnotations(ProgramAnnotation::ANN_PARALLEL_REGION_ID))
72  return ALIAS_UNKNOWN;
73 
74  int pregion1 = m1.annotation(
75  0, ProgramAnnotation::ANN_PARALLEL_REGION_ID).intValue();
76  int pregion2 = m2.annotation(
77  0, ProgramAnnotation::ANN_PARALLEL_REGION_ID).intValue();
78 
79  if (pregion1 != pregion2) {
80 
81 #if 0
83  << "### based on PREGION info, removed a memory edge between "
84  << m1.toString() << " (" << pregion1 << ") and "
85  << m2.toString() << " (" << pregion2 << ")" << std::endl;
87  << "### src lines: ";
88  if (m1.hasSourceLineNumber())
90  << m1.sourceLineNumber() << " ";
91  if (m2.hasSourceLineNumber())
93  << m2.sourceLineNumber() << " ";
94  Application::logStream() << std::endl;
95 #endif
96  return ALIAS_FALSE;
97  }
98 
99  return ALIAS_UNKNOWN;
100 }

References TTAProgram::ProgramAnnotation::ANN_PARALLEL_REGION_ID, TTAProgram::AnnotatedInstructionElement::annotation(), TTAProgram::AnnotatedInstructionElement::hasAnnotations(), TTAProgram::Move::hasSourceLineNumber(), TTAProgram::ProgramAnnotation::intValue(), MoveNode::isMove(), Application::logStream(), MoveNode::move(), TTAProgram::Move::sourceLineNumber(), and TTAProgram::Move::toString().

Here is the call graph for this function:

◆ isAddressTraceable()

bool PRegionAliasAnalyzer::isAddressTraceable ( DataDependenceGraph ddg,
const ProgramOperation pop 
)
privatevirtual

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 50 of file PRegionAliasAnalyzer.cc.

51  {
52 
53  return true;
54 }

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
TTAProgram::Move::sourceLineNumber
int sourceLineNumber() const
Definition: Move.cc:459
TTAProgram::Move::toString
std::string toString() const
Definition: Move.cc:436
MoveNode
Definition: MoveNode.hh:65
Application::logStream
static std::ostream & logStream()
Definition: Application.cc:155
MoveNode::isMove
bool isMove() const
TTAProgram::ProgramAnnotation::intValue
int intValue() const
Definition: ProgramAnnotation.cc:95
TTAProgram::Move
Definition: Move.hh:55
MemoryAliasAnalyzer::addressOperandMove
static const MoveNode * addressOperandMove(const ProgramOperation &po)
Definition: MemoryAliasAnalyzer.cc:147
TTAProgram::AnnotatedInstructionElement::hasAnnotations
bool hasAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
Definition: AnnotatedInstructionElement.cc:165
TTAProgram::AnnotatedInstructionElement::annotation
ProgramAnnotation annotation(int index, ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
Definition: AnnotatedInstructionElement.cc:100
MoveNode::move
TTAProgram::Move & move()
TTAProgram::Move::hasSourceLineNumber
bool hasSourceLineNumber() const
Definition: Move.cc:445