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

#include <FalseAliasAnalyzer.hh>

Inheritance diagram for FalseAliasAnalyzer:
Inheritance graph
Collaboration diagram for FalseAliasAnalyzer:
Collaboration graph

Public Member Functions

 FalseAliasAnalyzer (FunctionNameList *enabledFuncs=nullptr)
 
virtual bool isAddressTraceable (DataDependenceGraph &ddg, const ProgramOperation &pop) override
 
virtual AliasingResult analyze (DataDependenceGraph &ddg, const ProgramOperation &pop1, const ProgramOperation &pop2, MoveNodeUse::BBRelation bbInfo) override
 
 ~FalseAliasAnalyzer ()
 
- Public Member Functions inherited from MemoryAliasAnalyzer
virtual void initProcedure (TTAProgram::Procedure &)
 
virtual ~MemoryAliasAnalyzer ()
 

Private Member Functions

bool isEnabled (const DataDependenceGraph &ddg) const
 

Private Attributes

FunctionNameListfuncs_
 

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 40 of file FalseAliasAnalyzer.hh.

Constructor & Destructor Documentation

◆ FalseAliasAnalyzer()

FalseAliasAnalyzer::FalseAliasAnalyzer ( FunctionNameList enabledFuncs = nullptr)
inline

Definition at line 42 of file FalseAliasAnalyzer.hh.

42  :
43  funcs_(enabledFuncs) {}

◆ ~FalseAliasAnalyzer()

FalseAliasAnalyzer::~FalseAliasAnalyzer ( )

Desctructor

Definition at line 60 of file FalseAliasAnalyzer.cc.

60 {}

Member Function Documentation

◆ analyze()

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

checks whether mem adderesses alias. As this is fake, always returns false.

Returns
always ALIAS_FALSE

Implements MemoryAliasAnalyzer.

Definition at line 52 of file FalseAliasAnalyzer.cc.

53  {
54  return isEnabled(ddg) ? ALIAS_FALSE : ALIAS_UNKNOWN;
55 }

References MemoryAliasAnalyzer::ALIAS_FALSE, MemoryAliasAnalyzer::ALIAS_UNKNOWN, and isEnabled().

Here is the call graph for this function:

◆ isAddressTraceable()

bool FalseAliasAnalyzer::isAddressTraceable ( DataDependenceGraph ddg,
const ProgramOperation pop 
)
overridevirtual

Checks whether can say something about a memory address.

Returns
always returns true

Implements MemoryAliasAnalyzer.

Definition at line 42 of file FalseAliasAnalyzer.cc.

43  {
44  return isEnabled(ddg) ? true : false;
45 }

References isEnabled().

Here is the call graph for this function:

◆ isEnabled()

bool FalseAliasAnalyzer::isEnabled ( const DataDependenceGraph ddg) const
private

Definition at line 62 of file FalseAliasAnalyzer.cc.

62  {
63  if (funcs_ == NULL) {
64  return true;
65  }
66  return AssocTools::containsKey(*funcs_, ddg.name());
67 }

References AssocTools::containsKey(), funcs_, and BoostGraph< GraphNode, GraphEdge >::name().

Referenced by analyze(), and isAddressTraceable().

Here is the call graph for this function:

Member Data Documentation

◆ funcs_

FunctionNameList* FalseAliasAnalyzer::funcs_
private

Definition at line 55 of file FalseAliasAnalyzer.hh.

Referenced by isEnabled().


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
AssocTools::containsKey
static bool containsKey(const ContainerType &aContainer, const KeyType &aKey)
FalseAliasAnalyzer::isEnabled
bool isEnabled(const DataDependenceGraph &ddg) const
Definition: FalseAliasAnalyzer.cc:62
FalseAliasAnalyzer::funcs_
FunctionNameList * funcs_
Definition: FalseAliasAnalyzer.hh:55
BoostGraph::name
virtual const TCEString & name() const