[intermediate representation] improvements on constants

This commit is contained in:
Philippe Tillet
2019-01-03 03:42:10 -05:00
parent 8dbb565200
commit 8f4aafb4ac
8 changed files with 170 additions and 17 deletions

View File

@@ -9,6 +9,9 @@ namespace tdl{
namespace ir{
class context;
class constant_int;
class constant_fp;
class undef_value;
/* Context impl */
class context_impl {
@@ -24,6 +27,12 @@ public:
// Pointer types
std::map<std::pair<type*, unsigned>, pointer_type*> ptr_tys;
std::map<std::pair<type*,std::vector<unsigned>>, tile_type*> tile_tys;
// Int constants
std::map<uint64_t, constant_int*> int_constants_;
// Float constants
std::map<double, constant_fp*> fp_constants_;
// undef values
std::map<type*, undef_value*> uv_constants_;
};
}