Allow multiple_of and max_contiguous to accept n-d values (#617)
This commit is contained in:
@@ -59,8 +59,8 @@ public:
|
||||
std::string repr() const { return repr_impl(); }
|
||||
// metadata
|
||||
void set_metadata(ir::metadata::kind_t kind,
|
||||
unsigned value) { metadatas_[kind] = value;}
|
||||
unsigned get_metadata(ir::metadata::kind_t kind) { return metadatas_[kind];}
|
||||
std::vector<unsigned> value) { metadatas_[kind] = value;}
|
||||
std::vector<unsigned> get_metadata(ir::metadata::kind_t kind) { return metadatas_[kind];}
|
||||
// cloning
|
||||
ir::instruction* clone() {
|
||||
ir::instruction* res = clone_impl();
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
private:
|
||||
basic_block *parent_;
|
||||
std::map<ir::metadata::kind_t, unsigned> metadatas_;
|
||||
std::map<ir::metadata::kind_t, std::vector<unsigned>> metadatas_;
|
||||
value_id_t id_;
|
||||
};
|
||||
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#ifndef _TRITON_IR_METADATA_H_
|
||||
#define _TRITON_IR_METADATA_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace triton{
|
||||
namespace ir{
|
||||
|
||||
@@ -16,14 +18,14 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
metadata(kind_t kind, unsigned value);
|
||||
metadata(kind_t kind, std::vector<unsigned> value);
|
||||
|
||||
public:
|
||||
static metadata* get(kind_t kind, unsigned value);
|
||||
static metadata* get(kind_t kind, std::vector<unsigned> value);
|
||||
|
||||
private:
|
||||
kind_t kind_;
|
||||
unsigned value_;
|
||||
std::vector<unsigned> value_;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ private:
|
||||
|
||||
class module {
|
||||
typedef std::pair<std::string, basic_block*> val_key_t;
|
||||
typedef std::pair<ir::metadata::kind_t, unsigned> md_pair_t;
|
||||
typedef std::pair<ir::metadata::kind_t, std::vector<unsigned>> md_pair_t;
|
||||
friend class function;
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user