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

#include <CFGStatistics.hh>

Inheritance diagram for CFGStatistics:
Inheritance graph
Collaboration diagram for CFGStatistics:
Collaboration graph

Public Member Functions

 CFGStatistics ()
 
virtual ~CFGStatistics ()
 
virtual int normalBBCount () const
 
virtual int maxMoveCount () const
 
virtual int maxImmediateCount () const
 
virtual int maxInstructionCount () const
 
virtual int maxBypassedCount () const
 
virtual void setNormalBBCount (int)
 
virtual void setMaxMoveCount (int)
 
virtual void setMaxImmediateCount (int)
 
virtual void setMaxInstructionCount (int)
 
virtual void setMaxBypassedCount (int)
 
- Public Member Functions inherited from TTAProgram::BasicBlockStatistics
 BasicBlockStatistics ()
 
virtual ~BasicBlockStatistics ()
 
virtual int moveCount () const
 
virtual int immediateCount () const
 
virtual int instructionCount () const
 
virtual int bypassedCount () const
 
virtual void setMoveCount (int)
 
virtual void setImmediateCount (int)
 
virtual void setInstructionCount (int)
 
virtual void setBypassedCount (int)
 

Private Attributes

int normalBBCount_
 
int maxMoveCount_
 
int maxImmediateCount_
 
int maxInstructionCount_
 
int maxBypassCount_
 

Detailed Description

Represents statistics about single control flow graph. Count of BB, sum of moves, immediates, instructions and bypasses as well as largest basic block and immediates, instructions and bypassed in it.

Definition at line 44 of file CFGStatistics.hh.

Constructor & Destructor Documentation

◆ CFGStatistics()

CFGStatistics::CFGStatistics ( )

Constructor, creates statistics structure with zero content.

Definition at line 38 of file CFGStatistics.cc.

38  :
40  normalBBCount_(0),
41  maxMoveCount_(0),
44  maxBypassCount_(0) {
45 }

◆ ~CFGStatistics()

CFGStatistics::~CFGStatistics ( )
virtual

To remove compile warning.

Definition at line 50 of file CFGStatistics.cc.

50  {
51 }

Member Function Documentation

◆ maxBypassedCount()

int CFGStatistics::maxBypassedCount ( ) const
virtual

Returns bypassed move count from statistics object for largest BB.

Returns
count of bypassed moves stored in object

Definition at line 82 of file CFGStatistics.cc.

82  {
83  return maxBypassCount_;
84 }

References maxBypassCount_.

Referenced by ControlFlowGraph::printStatistics().

◆ maxImmediateCount()

int CFGStatistics::maxImmediateCount ( ) const
virtual

Returns immediate count from statistics object for largest BB.

Returns
count of immediates stored in object

Definition at line 66 of file CFGStatistics.cc.

66  {
67  return maxImmediateCount_;
68 }

References maxImmediateCount_.

Referenced by ControlFlowGraph::printStatistics().

◆ maxInstructionCount()

int CFGStatistics::maxInstructionCount ( ) const
virtual

Returns instruction count from statistics object for largest BB.

Returns
count of instructions stored in object

Definition at line 74 of file CFGStatistics.cc.

74  {
75  return maxInstructionCount_;
76 }

References maxInstructionCount_.

Referenced by ControlFlowGraph::printStatistics().

◆ maxMoveCount()

int CFGStatistics::maxMoveCount ( ) const
virtual

Returns maximum move count from statistics object.

Returns
count of moves of largest BB

Definition at line 58 of file CFGStatistics.cc.

58  {
59  return maxMoveCount_;
60 }

References maxMoveCount_.

Referenced by ControlFlowGraph::printStatistics().

◆ normalBBCount()

int CFGStatistics::normalBBCount ( ) const
virtual

Returns the number of basic blocks in procedure.

Definition at line 90 of file CFGStatistics.cc.

90  {
91  return normalBBCount_;
92 }

References normalBBCount_.

Referenced by ControlFlowGraph::printStatistics().

◆ setMaxBypassedCount()

void CFGStatistics::setMaxBypassedCount ( int  count)
virtual

Sets the bypassed move count in statistic object.

Parameters
countnumber of bypassed moves to store in object

Definition at line 128 of file CFGStatistics.cc.

128  {
129  maxBypassCount_ = count;
130 }

References maxBypassCount_.

Referenced by ControlFlowGraph::statistics().

◆ setMaxImmediateCount()

void CFGStatistics::setMaxImmediateCount ( int  count)
virtual

Sets the immediate count in statistic object.

Parameters
countnumber of immediates to store in object

Definition at line 109 of file CFGStatistics.cc.

109  {
110  maxImmediateCount_ = count;
111 }

References maxImmediateCount_.

Referenced by ControlFlowGraph::statistics().

◆ setMaxInstructionCount()

void CFGStatistics::setMaxInstructionCount ( int  count)
virtual

Sets the instruction count in statistic object.

Parameters
countnumber of instructions to store in object

Definition at line 119 of file CFGStatistics.cc.

119  {
120  maxInstructionCount_ = count;
121 }

References maxInstructionCount_.

Referenced by ControlFlowGraph::statistics().

◆ setMaxMoveCount()

void CFGStatistics::setMaxMoveCount ( int  count)
virtual

Sets the move count in statistic object.

Parameters
countnumber of moves to store in object

Definition at line 99 of file CFGStatistics.cc.

99  {
100  maxMoveCount_ = count;
101 }

References maxMoveCount_.

Referenced by ControlFlowGraph::statistics().

◆ setNormalBBCount()

void CFGStatistics::setNormalBBCount ( int  count)
virtual

Sets count of basic blocks in procedure into statistics object.

Parameters
countnumber of basic blocks in procedure.

Definition at line 138 of file CFGStatistics.cc.

138  {
139  normalBBCount_ = count;
140 }

References normalBBCount_.

Referenced by ControlFlowGraph::statistics().

Member Data Documentation

◆ maxBypassCount_

int CFGStatistics::maxBypassCount_
private

Definition at line 64 of file CFGStatistics.hh.

Referenced by maxBypassedCount(), and setMaxBypassedCount().

◆ maxImmediateCount_

int CFGStatistics::maxImmediateCount_
private

Definition at line 62 of file CFGStatistics.hh.

Referenced by maxImmediateCount(), and setMaxImmediateCount().

◆ maxInstructionCount_

int CFGStatistics::maxInstructionCount_
private

Definition at line 63 of file CFGStatistics.hh.

Referenced by maxInstructionCount(), and setMaxInstructionCount().

◆ maxMoveCount_

int CFGStatistics::maxMoveCount_
private

Definition at line 61 of file CFGStatistics.hh.

Referenced by maxMoveCount(), and setMaxMoveCount().

◆ normalBBCount_

int CFGStatistics::normalBBCount_
private

Definition at line 60 of file CFGStatistics.hh.

Referenced by normalBBCount(), and setNormalBBCount().


The documentation for this class was generated from the following files:
CFGStatistics::maxInstructionCount_
int maxInstructionCount_
Definition: CFGStatistics.hh:63
CFGStatistics::maxMoveCount_
int maxMoveCount_
Definition: CFGStatistics.hh:61
CFGStatistics::maxImmediateCount_
int maxImmediateCount_
Definition: CFGStatistics.hh:62
TTAProgram::BasicBlockStatistics::BasicBlockStatistics
BasicBlockStatistics()
Definition: BasicBlock.cc:159
CFGStatistics::maxBypassCount_
int maxBypassCount_
Definition: CFGStatistics.hh:64
CFGStatistics::normalBBCount_
int normalBBCount_
Definition: CFGStatistics.hh:60