CGRAOmp  0.1
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
CGRAOmp::InstMapEntry Class Referenceabstract

An abstract class for an entry to replace IR instruction to targeting CGRA instruction. More...

#include <CGRAInstMap.hpp>

Inheritance diagram for CGRAOmp::InstMapEntry:
CGRAOmp::BinaryOpMapEntry CGRAOmp::CompOpMapEntry CGRAOmp::CustomInstMapEntry CGRAOmp::MemoryOpMapEntry CGRAOmp::OtherOpMapEntry

Public Types

enum  InstMapKind {
  InstMapKind::BinaryOp, InstMapKind::CompOp, InstMapKind::MemOp, InstMapKind::CustomOp,
  InstMapKind::OtherOp
}
 

Public Member Functions

 InstMapEntry (StringRef opcode, InstMapKind Kind)
 Construct a new InstMapEntry object. More...
 
 InstMapEntry (StringRef opcode, InstMapKind Kind, MapCondition *cond)
 Construct a new InstMapEntry object with an initial MapCondition instance. More...
 
 ~InstMapEntry ()
 
void addMapping (MapCondition *cond)
 set a mapping condition More...
 
virtual bool match (Instruction *I)=0
 an abstract method to check the condition is met More...
 
virtual bool match (StringRef opcode)
 check this entry is for the specified instruction This will not check the mapping condition. More...
 
virtual std::string getMapName ()
 get the map name of this entry More...
 
void print (raw_ostream &OS)
 
void dump ()
 
InstMapKind getKind () const
 

Protected Attributes

MapConditionmap_cond
 
std::string opcode_str
 

Private Attributes

InstMapKind Kind
 

Detailed Description

An abstract class for an entry to replace IR instruction to targeting CGRA instruction.

Member Enumeration Documentation

◆ InstMapKind

Enumerator
BinaryOp 
CompOp 
MemOp 
CustomOp 
OtherOp 

Constructor & Destructor Documentation

◆ InstMapEntry() [1/2]

CGRAOmp::InstMapEntry::InstMapEntry ( StringRef  opcode,
InstMapKind  Kind 
)
inline

Construct a new InstMapEntry object.

Parameters
opcodestring of the instruction opcode
KindKind of the actual map entry

◆ InstMapEntry() [2/2]

CGRAOmp::InstMapEntry::InstMapEntry ( StringRef  opcode,
InstMapKind  Kind,
MapCondition cond 
)
inline

Construct a new InstMapEntry object with an initial MapCondition instance.

Parameters
opcodestring of the instruction opcode
KindKind of the actual map entry
condmapping condition

◆ ~InstMapEntry()

CGRAOmp::InstMapEntry::~InstMapEntry ( )
inline

Member Function Documentation

◆ addMapping()

void CGRAOmp::InstMapEntry::addMapping ( MapCondition cond)
inline

set a mapping condition

Parameters
condmapping condition

◆ dump()

void CGRAOmp::InstMapEntry::dump ( )
inline

◆ getKind()

InstMapKind CGRAOmp::InstMapEntry::getKind ( ) const
inline

◆ getMapName()

virtual std::string CGRAOmp::InstMapEntry::getMapName ( )
inlinevirtual

get the map name of this entry

◆ match() [1/2]

virtual bool CGRAOmp::InstMapEntry::match ( Instruction *  I)
pure virtual

an abstract method to check the condition is met

Parameters
Ian instruction
Returns
true in the case of satisfying the condition
otherwise false

Implemented in CGRAOmp::OtherOpMapEntry, CGRAOmp::CustomInstMapEntry, CGRAOmp::MemoryOpMapEntry, CGRAOmp::CompOpMapEntry, and CGRAOmp::BinaryOpMapEntry.

◆ match() [2/2]

virtual bool CGRAOmp::InstMapEntry::match ( StringRef  opcode)
inlinevirtual

check this entry is for the specified instruction This will not check the mapping condition.

Parameters
Ian instruction
Returns
true when this entry's opcode is the same as the instruction
otherwise false

◆ print()

void InstMapEntry::print ( raw_ostream &  OS)

Member Data Documentation

◆ Kind

InstMapKind CGRAOmp::InstMapEntry::Kind
private

◆ map_cond

MapCondition* CGRAOmp::InstMapEntry::map_cond
protected

◆ opcode_str

std::string CGRAOmp::InstMapEntry::opcode_str
protected

The documentation for this class was generated from the following files: