CGRAOmp  0.1
CGRAInstMap.hpp
Go to the documentation of this file.
1 /*
2 * MIT License
3 *
4 * Copyright (c) 2021 Amano laboratory, Keio University & Processor Research Team, RIKEN Center for Computational Science
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 * this software and associated documentation files (the "Software"), to deal in
8 * the Software without restriction, including without limitation the rights to
9 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 * of the Software, and to permit persons to whom the Software is furnished to do
11 * so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 *
24 * File: /include/CGRAInstMap.hpp
25 * Project: CGRAOmp
26 * Author: Takuya Kojima in The University of Tokyo (tkojima@hal.ipc.i.u-tokyo.ac.jp)
27 * Created Date: 05-09-2021 18:35:11
28 * Last Modified: 17-02-2022 21:38:52
29 */
30 
31 #ifndef CGRAInstMap_H
32 #define CGRAInstMap_H
33 
34 #include "llvm/ADT/SmallVector.h"
35 #include "llvm/ADT/StringRef.h"
36 #include "llvm/IR/Constant.h"
37 #include "llvm/IR/Function.h"
38 #include "llvm/IR/InstrTypes.h"
39 #include "llvm/IR/Instruction.h"
40 #include "llvm/IR/Operator.h"
41 #include "llvm/Support/JSON.h"
42 #include "llvm/IR/PassManager.h"
43 
44 #include "common.hpp"
46 
47 
48 #include <float.h>
49 #include <math.h>
50 
51 #define CGRAOMP_CUSTOM_INST_ATTR "cgra_custom_inst"
52 
53 
54 #define FLAG_GETTER(FLAG, ISA, GETTER) make_pair(FLAG, [](Instruction *I) { \
55  if (isa<ISA>(I)) { \
56  return I->GETTER(); \
57  } else { \
58  return false;\
59  } \
60 })
61 
62 #define CMP_PRED_PAIR(STR, ENUM) make_pair(STR, CmpInst::Predicate::ENUM)
63 
64 
65 #define BINOP_ENTRY(OPCODE, OPENUM) make_pair(OPCODE, [](MapCondition *c){ \
66  if (c) { \
67  return make_shared<BinaryOpMapEntry>(OPCODE, BinaryOperator::OPENUM, c); \
68  } else { \
69  return make_shared<BinaryOpMapEntry>(OPCODE, BinaryOperator::OPENUM); \
70  }\
71 })
72 #define COMPOP_ENTRY(OPCODE, IS_INTEGER) make_pair(OPCODE, [](MapCondition *c){ \
73  if (c) { \
74  return make_shared<CompOpMapEntry>(OPCODE, IS_INTEGER, c); \
75  } else { \
76  return make_shared<CompOpMapEntry>(OPCODE, IS_INTEGER); \
77  }\
78 })
79 #define MEMOP_ENTRY(OPCODE, OPENUM) make_pair(OPCODE, [](MapCondition *c){ \
80  if (c) { \
81  return make_shared<MemoryOpMapEntry>(OPCODE, Instruction::MemoryOps::OPENUM, c); \
82  } else { \
83  return make_shared<MemoryOpMapEntry>(OPCODE, Instruction::MemoryOps::OPENUM); \
84  }\
85 })
86 
87 #define OTHEROP_ENTRY(OPCODE, OPENUM) make_pair(OPCODE, [](MapCondition *c){ \
88  if (c) { \
89  return make_shared<OtherOpMapEntry>(OPCODE, OPENUM, c); \
90  } else { \
91  return make_shared<OtherOpMapEntry>(OPCODE, OPENUM); \
92  }\
93 })
94 
95 // Key setting to parse the JSON object
96 #define INST_KEY "inst"
97 #define MAP_KEY "map"
98 #define CONST_RHS_KEY "rhs"
99 #define CONST_LHS_KEY "lhs"
100 #define FLAGS_KEY "flags"
101 #define PRED_KEY "pred"
102 #define CONST_INT_KEY "ConstantInt"
103 #define CONST_DBL_KEY "ConstantDouble"
104 
105 #define VEC_MAKE_RANGE(VEC) (make_range(VEC.begin(), VEC.end()))
106 
107 using namespace llvm;
108 
109 
110 namespace CGRAOmp
111 {
116  class MapCondition {
117  public:
123  MapCondition(StringRef map) :
124  map_name(map.str()), anyLHS(true),
125  anyRHS(true), anyPred(true) {};
127  MapCondition(const MapCondition &) = default;
129  MapCondition(MapCondition &&) = default;
130 
133 
140  void setConst(int use, bool isLeft);
141 
149  void setConst(double use, bool isLeft);
150 
157  Error setFlags(ArrayRef<std::string> flags);
158 
165  Error setPred(StringRef pred);
166 
174  bool match(Instruction *I);
175 
181  std::string getMapName() {
182  return map_name;
183  }
184 
185  void print(raw_ostream &OS);
186 
187  void dump() {
188  print(errs());
189  errs() << "\n";
190  }
191  private:
193  std::function<bool(Instruction*I)> match_use;
194 
195  std::string map_name;
196  int use_int;
197  double use_double;
198  SmallVector<StringRef> flag_list;
199  CmpInst::Predicate cmp_pred;
200  bool isUseInt = false;
201  bool anyLHS;
202  bool anyRHS;
203  bool anyPred;
205 
206  StringRef pred_str;
207 
216  static bool equal_double(double a, double b) {
217  return (fabs(a - b) <= DBL_EPSILON
218  * fmax(1, fmax(fabs(a), fabs(b))));
219  }
220 
223  static StringMap<std::function<bool(Instruction*)>> FlagGetter;
226  static StringMap<CmpInst::Predicate> PredMap;
227 
228  };
229 
238  Expected<std::pair<StringRef,MapCondition*>> createMapCondition(
239  json::Object *json_obj,
240  StringRef filename);
241 
251  Expected<SmallVector<std::string>> getStringArray(json::Object *json_obj,
252  StringRef key, StringRef filename);
253 
258  class InstMapEntry {
259  public:
260  enum class InstMapKind {
261  BinaryOp,
262  CompOp,
263  MemOp,
264  CustomOp,
265  OtherOp
266  };
267 
274  InstMapEntry(StringRef opcode, InstMapKind Kind) :
275  opcode_str(opcode.str()), Kind(Kind) {
276  map_cond = new MapCondition(opcode);
277  };
278 
286  InstMapEntry(StringRef opcode, InstMapKind Kind, MapCondition* cond) :
287  opcode_str(opcode.str()), Kind(Kind), map_cond(cond) {};
288 
290  delete map_cond;
291  }
292 
298  void addMapping(MapCondition* cond) {
299  map_cond = cond;
300  }
301 
309  virtual bool match(Instruction *I) = 0;
317  virtual bool match(StringRef opcode) {
318  return opcode_str == opcode;
319  };
320 
324  virtual std::string getMapName() {
325  return map_cond->getMapName();
326  }
327 
328  void print(raw_ostream &OS);
329  void dump() {
330  print(errs());
331  errs() << "\n";
332  }
333 
335  return Kind;
336  }
337  private:
339  protected:
341  std::string opcode_str;
342 
343 
344  };
345 
351  public:
352  static constexpr InstMapEntry::InstMapKind BinaryOp =
353  InstMapEntry::InstMapKind::BinaryOp;
360  BinaryOpMapEntry(StringRef opcode, Instruction::BinaryOps ops) :
361  InstMapEntry(opcode, BinaryOp), ops(ops) {};
362 
370  BinaryOpMapEntry(StringRef opcode, Instruction::BinaryOps ops,
371  MapCondition* cond) :
372  InstMapEntry(opcode, BinaryOp, cond), ops(ops) {};
373 
377  bool match(Instruction *I);
378 
379  static bool classof(const InstMapEntry* imap) {
380  return imap->getKind() == BinaryOp;
381  }
382  private:
383  Instruction::BinaryOps ops;
384  };
385 
390  class CompOpMapEntry : public InstMapEntry {
391  public:
392  static constexpr InstMapEntry::InstMapKind CompOp =
393  InstMapEntry::InstMapKind::CompOp;
402  CompOpMapEntry(StringRef opcode, bool isInteger) :
403  InstMapEntry(opcode, CompOp),
404  isInteger(isInteger) {};
405 
415  CompOpMapEntry(StringRef opcode, bool isInteger,
416  MapCondition *cond) :
417  InstMapEntry(opcode, CompOp, cond),
418  isInteger(isInteger) {};
419 
420  static bool classof(const InstMapEntry* imap) {
421  return imap->getKind() == CompOp;
422  }
423 
427  bool match(Instruction *I);
428  private:
429  bool isInteger;
430  };
431 
437  public:
438  static constexpr InstMapEntry::InstMapKind MemOp =
439  InstMapEntry::InstMapKind::MemOp;
446  MemoryOpMapEntry(StringRef opcode, Instruction::MemoryOps kind) :
447  InstMapEntry(opcode, MemOp),
448  mem_kind(kind) {};
456  MemoryOpMapEntry(StringRef opcode, Instruction::MemoryOps kind,
457  MapCondition *cond) :
458  InstMapEntry(opcode, MemOp, cond),
459  mem_kind(kind) {};
460 
461  static bool classof(const InstMapEntry* imap) {
462  return imap->getKind() == MemOp;
463  }
464 
468  bool match(Instruction *I);
469  private:
470  Instruction::MemoryOps mem_kind;
471  };
472 
478  public:
479  static constexpr InstMapEntry::InstMapKind CustomOp =
480  InstMapEntry::InstMapKind::CustomOp;
487  CustomInstMapEntry(StringRef func_name,
488  ModuleAnalysisManager &MAM) :
489  InstMapEntry(func_name, CustomOp), MAM(MAM) {};
497  CustomInstMapEntry(StringRef func_name,
498  ModuleAnalysisManager &MAM,
499  MapCondition* map_cond) :
500  InstMapEntry(func_name, CustomOp, map_cond), MAM(MAM) {};
501 
502  static bool classof(const InstMapEntry* imap) {
503  return imap->getKind() == CustomOp;
504  }
505 
509  bool match(Instruction *I);
510 
511  private:
512  bool isCustomOpFunc(Function *F);
513  ModuleAnalysisManager &MAM;
514  };
515 
520  class OtherOpMapEntry : public InstMapEntry {
521  public:
522  static constexpr InstMapEntry::InstMapKind OtherOp =
523  InstMapEntry::InstMapKind::OtherOp;
530  OtherOpMapEntry(StringRef opcode, Instruction::TermOps ops) :
531  InstMapEntry(opcode, OtherOp), term_ops(ops),
532  cat(OptCategory::Terminator) {};
533 
540  OtherOpMapEntry(StringRef opcode, Instruction::CastOps ops) :
541  InstMapEntry(opcode, OtherOp), cast_ops(ops), cat(OptCategory::Cast) {};
542 
549  OtherOpMapEntry(StringRef opcode, Instruction::OtherOps ops) :
550  InstMapEntry(opcode, OtherOp), other_ops(ops),
551  cat(OptCategory::Other) {};
552 
561  template <typename OpEnumTy>
562  OtherOpMapEntry(StringRef opcode, OpEnumTy ops,
563  MapCondition* cond) :
564  OtherOpMapEntry(opcode, ops) {
565  map_cond = cond;
566  };
567 
571  bool match(Instruction *I);
572 
573  static bool classof(const InstMapEntry* imap) {
574  return imap->getKind() == OtherOp;
575  }
576  private:
577  enum class OptCategory {
578  Terminator,
579  Cast,
580  Other,
581  };
583  Instruction::OtherOps other_ops;
584  Instruction::TermOps term_ops;
585  Instruction::CastOps cast_ops;
586  };
587 
592  class InstMap {
593  public:
595  InstMap() {};
596 
605  InstMapEntry* find(StringRef opcode);
613  InstMapEntry* find(Instruction *I);
614 
621  Error add_generic_inst(StringRef opcode);
622 
629  void add_custom_inst(StringRef opcode, ModuleAnalysisManager &MAM);
630 
638  Error add_map_entry(StringRef opcode, MapCondition* map_cond);
639 
640  private:
641  using entry_ptr = std::shared_ptr<InstMapEntry>;
642  using entry_iterator = SmallVector<entry_ptr>::iterator;
643  using entry_generator = std::function<entry_ptr(MapCondition*)>;
644 
647  static StringMap<entry_generator> entry_gen;
648 
649  SmallVector<entry_ptr> entries;
650  StringMap<entry_ptr> defaultEntries;
651 
652  };
653 
654 } // namespace CGRAOmp
655 
656 #endif //CGRAInstMap_H
CGRAOmp::InstMap::entries
SmallVector< entry_ptr > entries
Definition: CGRAInstMap.hpp:649
CGRAOmp::createMapCondition
Expected< std::pair< StringRef, MapCondition * > > createMapCondition(json::Object *json_obj, StringRef filename)
create a MapCondition instance from json object
Definition: CGRAInstMap.cpp:503
CGRAOmp::MapCondition::~MapCondition
~MapCondition()
Destructor.
Definition: CGRAInstMap.hpp:132
CGRAOmp::InstMapEntry::match
virtual bool match(StringRef opcode)
check this entry is for the specified instruction This will not check the mapping condition.
Definition: CGRAInstMap.hpp:317
llvm
Definition: OptionPlugin.cpp:128
CGRAOmp::CompOpMapEntry::CompOpMapEntry
CompOpMapEntry(StringRef opcode, bool isInteger)
Construct a new CompOpMapEntry object.
Definition: CGRAInstMap.hpp:402
CGRAOmp::OtherOpMapEntry::OtherOpMapEntry
OtherOpMapEntry(StringRef opcode, OpEnumTy ops, MapCondition *cond)
Construct a new OtherOpMapEntry object with an initial MapCondition instance.
Definition: CGRAInstMap.hpp:562
CGRAOmp::MapCondition::MapCondition
MapCondition(StringRef map)
Construct a new MapCondition object.
Definition: CGRAInstMap.hpp:123
CGRAOmp::MemoryOpMapEntry::mem_kind
Instruction::MemoryOps mem_kind
Definition: CGRAInstMap.hpp:470
CGRAOmp::MapCondition::anyLHS
bool anyLHS
Definition: CGRAInstMap.hpp:201
CGRAOmp::OtherOpMapEntry::OtherOpMapEntry
OtherOpMapEntry(StringRef opcode, Instruction::OtherOps ops)
Construct a new OtherOpMapEntry object for other instructions.
Definition: CGRAInstMap.hpp:549
CGRAOmp::MapCondition::FlagGetter
static StringMap< std::function< bool(Instruction *)> > FlagGetter
Definition: CGRAInstMap.hpp:223
common.hpp
CGRAOmp::OtherOpMapEntry::OptCategory
OptCategory
Definition: CGRAInstMap.hpp:577
CGRAOmp::CompOpMapEntry::isInteger
bool isInteger
Definition: CGRAInstMap.hpp:429
CGRAOmp::MemoryOpMapEntry::MemoryOpMapEntry
MemoryOpMapEntry(StringRef opcode, Instruction::MemoryOps kind, MapCondition *cond)
Construct a new MemoryOpMapEntry object.
Definition: CGRAInstMap.hpp:456
CGRAOmp::BinaryOpMapEntry
A derived class from InstMapEntry for BinaryOperation.
Definition: CGRAInstMap.hpp:350
CGRAOmp::MemoryOpMapEntry
A derived class from InstMapEntry for memory operation.
Definition: CGRAInstMap.hpp:436
CGRAOmp::MapCondition::dump
void dump()
Definition: CGRAInstMap.hpp:187
CGRAOmp::OtherOpMapEntry::classof
static bool classof(const InstMapEntry *imap)
Definition: CGRAInstMap.hpp:573
CGRAOmp::MapCondition::anyPred
bool anyPred
Definition: CGRAInstMap.hpp:203
CGRAOmp::InstMap::entry_generator
std::function< entry_ptr(MapCondition *)> entry_generator
Definition: CGRAInstMap.hpp:643
CGRAOmp::BinaryOpMapEntry::BinaryOpMapEntry
BinaryOpMapEntry(StringRef opcode, Instruction::BinaryOps ops)
Construct a new BinaryOpMapEntry object.
Definition: CGRAInstMap.hpp:360
CGRAOmp::MapCondition::equal_double
static bool equal_double(double a, double b)
equality comparetor for double values
Definition: CGRAInstMap.hpp:216
CGRAOmp::InstMap::entry_ptr
std::shared_ptr< InstMapEntry > entry_ptr
Definition: CGRAInstMap.hpp:641
CGRAOmp::InstMapEntry::Kind
InstMapKind Kind
Definition: CGRAInstMap.hpp:338
CGRAOmp::InstMapEntry::InstMapKind
InstMapKind
Definition: CGRAInstMap.hpp:260
CGRAOmp::InstMapEntry::opcode_str
std::string opcode_str
Definition: CGRAInstMap.hpp:341
CGRAOmp::InstMapEntry::dump
void dump()
Definition: CGRAInstMap.hpp:329
CGRAOmp::CompOpMapEntry
A derived class from InstMapEntry for comparison instructions.
Definition: CGRAInstMap.hpp:390
CGRAOmp::OtherOpMapEntry::cast_ops
Instruction::CastOps cast_ops
Definition: CGRAInstMap.hpp:585
CGRAOmp::MemoryOpMapEntry::classof
static bool classof(const InstMapEntry *imap)
Definition: CGRAInstMap.hpp:461
CGRAOmp
Definition: AGVerifyPass.hpp:50
CGRAOmp::CustomInstMapEntry
A derived class from InstMapEntry for custom instruction.
Definition: CGRAInstMap.hpp:477
CGRAOmp::MapCondition::cmp_pred
CmpInst::Predicate cmp_pred
Definition: CGRAInstMap.hpp:199
CGRAOmp::OtherOpMapEntry
A derived class from InstMapEntry for other type of operations.
Definition: CGRAInstMap.hpp:520
CGRAOmp::OtherOpMapEntry::OtherOpMapEntry
OtherOpMapEntry(StringRef opcode, Instruction::CastOps ops)
Construct a new OtherOpMapEntry object for cast instructions.
Definition: CGRAInstMap.hpp:540
CGRAOmp::getStringArray
Expected< SmallVector< std::string > > getStringArray(json::Object *json_obj, StringRef key, StringRef filename)
Get the String Array from json object.
Definition: CGRAInstMap.cpp:456
CGRAOmp::OtherOpMapEntry::OtherOpMapEntry
OtherOpMapEntry(StringRef opcode, Instruction::TermOps ops)
Construct a new OtherOpMapEntry object for terminator instructions.
Definition: CGRAInstMap.hpp:530
CGRAOmp::MapCondition::match_use
std::function< bool(Instruction *I)> match_use
wrapper for const operand comparison
Definition: CGRAInstMap.hpp:193
CGRAOmp::CustomInstMapEntry::classof
static bool classof(const InstMapEntry *imap)
Definition: CGRAInstMap.hpp:502
CGRAOmp::MapCondition
a representation of instruction mapping condition
Definition: CGRAInstMap.hpp:116
CGRAOmp::CustomInstMapEntry::CustomInstMapEntry
CustomInstMapEntry(StringRef func_name, ModuleAnalysisManager &MAM)
Construct a new CustomIns MapEntry object.
Definition: CGRAInstMap.hpp:487
CGRAOmp::BinaryOpMapEntry::classof
static bool classof(const InstMapEntry *imap)
Definition: CGRAInstMap.hpp:379
CGRAOmp::MapCondition::use_int
int use_int
Definition: CGRAInstMap.hpp:196
CGRAOmp::MapCondition::flag_list
SmallVector< StringRef > flag_list
Definition: CGRAInstMap.hpp:198
CGRAOmp::OtherOpMapEntry::cat
OptCategory cat
Definition: CGRAInstMap.hpp:582
CGRAOmp::InstMapEntry::InstMapEntry
InstMapEntry(StringRef opcode, InstMapKind Kind)
Construct a new InstMapEntry object.
Definition: CGRAInstMap.hpp:274
CGRAOmp::InstMapEntry::~InstMapEntry
~InstMapEntry()
Definition: CGRAInstMap.hpp:289
CGRAOmp::BinaryOpMapEntry::ops
Instruction::BinaryOps ops
Definition: CGRAInstMap.hpp:383
CGRAOmp::InstMap::InstMap
InstMap()
Constructor.
Definition: CGRAInstMap.hpp:595
CGRAOmp::InstMapEntry::InstMapEntry
InstMapEntry(StringRef opcode, InstMapKind Kind, MapCondition *cond)
Construct a new InstMapEntry object with an initial MapCondition instance.
Definition: CGRAInstMap.hpp:286
CGRAOmp::OtherOpMapEntry::other_ops
Instruction::OtherOps other_ops
Definition: CGRAInstMap.hpp:583
CGRAOmp::InstMapEntry::getMapName
virtual std::string getMapName()
get the map name of this entry
Definition: CGRAInstMap.hpp:324
CGRAOmp::BinaryOpMapEntry::BinaryOpMapEntry
BinaryOpMapEntry(StringRef opcode, Instruction::BinaryOps ops, MapCondition *cond)
Construct a new BinaryOpMapEntry object with an initial MapCondition instance.
Definition: CGRAInstMap.hpp:370
CGRAOmp::CompOpMapEntry::classof
static bool classof(const InstMapEntry *imap)
Definition: CGRAInstMap.hpp:420
CGRAOmp::MapCondition::pred_str
StringRef pred_str
Definition: CGRAInstMap.hpp:206
CGRAOmp::CompOpMapEntry::CompOpMapEntry
CompOpMapEntry(StringRef opcode, bool isInteger, MapCondition *cond)
Construct a new CompOpMapEntry object with an initial MapCondition instance.
Definition: CGRAInstMap.hpp:415
CGRAOmp::MapCondition::PredMap
static StringMap< CmpInst::Predicate > PredMap
Definition: CGRAInstMap.hpp:226
CGRAOmp::InstMap
collective of all the instruction mapping
Definition: CGRAInstMap.hpp:592
CGRAOmp::CustomInstMapEntry::MAM
ModuleAnalysisManager & MAM
Definition: CGRAInstMap.hpp:513
CGRAOmp::MapCondition::anyRHS
bool anyRHS
Definition: CGRAInstMap.hpp:202
CGRAOmp::MapCondition::const_operand
int const_operand
Definition: CGRAInstMap.hpp:204
CGRAOmp::InstMap::entry_gen
static StringMap< entry_generator > entry_gen
Definition: CGRAInstMap.hpp:647
CGRAOmp::MapCondition::map_name
std::string map_name
Definition: CGRAInstMap.hpp:195
CGRAOmp::MapCondition::getMapName
std::string getMapName()
get map name associated with this condition
Definition: CGRAInstMap.hpp:181
CGRAOmp::OtherOpMapEntry::term_ops
Instruction::TermOps term_ops
Definition: CGRAInstMap.hpp:584
CGRAOmp::InstMap::entry_iterator
SmallVector< entry_ptr >::iterator entry_iterator
Definition: CGRAInstMap.hpp:642
CGRAOmpAnnotationPass.hpp
CGRAOmp::CustomInstMapEntry::CustomInstMapEntry
CustomInstMapEntry(StringRef func_name, ModuleAnalysisManager &MAM, MapCondition *map_cond)
Construct a new CustomInstMapEntry object with an initial MapCondition instance.
Definition: CGRAInstMap.hpp:497
CGRAOmp::MemoryOpMapEntry::MemoryOpMapEntry
MemoryOpMapEntry(StringRef opcode, Instruction::MemoryOps kind)
Construct a new MemoryOpMapEntry object.
Definition: CGRAInstMap.hpp:446
CGRAOmp::InstMap::defaultEntries
StringMap< entry_ptr > defaultEntries
Definition: CGRAInstMap.hpp:650
CGRAOmp::InstMapEntry::getKind
InstMapKind getKind() const
Definition: CGRAInstMap.hpp:334
CGRAOmp::MapCondition::use_double
double use_double
Definition: CGRAInstMap.hpp:197
CGRAOmp::InstMapEntry::map_cond
MapCondition * map_cond
Definition: CGRAInstMap.hpp:340
CGRAOmp::InstMapEntry::addMapping
void addMapping(MapCondition *cond)
set a mapping condition
Definition: CGRAInstMap.hpp:298
CGRAOmp::InstMapEntry
An abstract class for an entry to replace IR instruction to targeting CGRA instruction.
Definition: CGRAInstMap.hpp:258