|
CGRAOmp
0.1
|
collective of all the instruction mapping More...
#include <CGRAInstMap.hpp>
Public Member Functions | |
| InstMap () | |
| Constructor. More... | |
| InstMapEntry * | find (StringRef opcode) |
| find an entry for the instruction More... | |
| InstMapEntry * | find (Instruction *I) |
| find an entry for the instruction More... | |
| Error | add_generic_inst (StringRef opcode) |
| add a generic instruction without mapping condition More... | |
| void | add_custom_inst (StringRef opcode, ModuleAnalysisManager &MAM) |
| add a custom instruction More... | |
| Error | add_map_entry (StringRef opcode, MapCondition *map_cond) |
| add an entry with a mapping condition More... | |
Private Types | |
| using | entry_ptr = std::shared_ptr< InstMapEntry > |
| using | entry_iterator = SmallVector< entry_ptr >::iterator |
| using | entry_generator = std::function< entry_ptr(MapCondition *)> |
Private Attributes | |
| SmallVector< entry_ptr > | entries |
| StringMap< entry_ptr > | defaultEntries |
Static Private Attributes | |
| static StringMap< entry_generator > | entry_gen |
collective of all the instruction mapping
|
private |
|
private |
|
private |
|
inline |
Constructor.
| void InstMap::add_custom_inst | ( | StringRef | opcode, |
| ModuleAnalysisManager & | MAM | ||
| ) |
add a custom instruction
| opcode | opcode string of the instruction (= the corresponding function name) |
| MAM | ModuleAnalysisManager |
| Error InstMap::add_generic_inst | ( | StringRef | opcode | ) |
add a generic instruction without mapping condition
| opcode | opcode string of the instruction |
| Error InstMap::add_map_entry | ( | StringRef | opcode, |
| MapCondition * | map_cond | ||
| ) |
add an entry with a mapping condition
| opcode | opcode string of the instruction |
| map_cond | mapping condition instance |
When a generic instruction is added to InstMap, a default entry, which matches any instruction with the same opcode, is added. This method is called, then the default entry is erased.
| InstMapEntry * InstMap::find | ( | Instruction * | I | ) |
find an entry for the instruction
| I | an instruction |
| InstMapEntry * InstMap::find | ( | StringRef | opcode | ) |
find an entry for the instruction
| opcode | opcode of the instruction |
|
private |
|
private |
|
staticprivate |
look-up table of functions to instantiate an entry from an inputed opcode key: opcode string
1.8.17