[codegen][align] reverted some changes

This commit is contained in:
Philippe Tillet
2019-09-03 15:28:07 -04:00
parent 97fdb5b6be
commit 5e03f0a065
2 changed files with 6 additions and 7 deletions

View File

@@ -2,7 +2,6 @@
#define TDL_INCLUDE_CODEGEN_ALIGNMENT_INFO_PASS_H
#include <map>
#include <vector>
namespace triton {
@@ -25,7 +24,7 @@ private:
bool is_first_axis_unit(ir::value *v);
// populate maps
std::vector<cst_info> populate_is_constant(ir::value *v);
cst_info populate_is_constant(ir::value *v);
unsigned populate_max_contiguous(ir::value *v);
unsigned populate_starting_multiple(ir::value *v);
@@ -36,9 +35,9 @@ public:
void copy(ir::value *dst, ir::value *src);
private:
std::map<ir::value*, std::vector<cst_info>> is_constant_;
std::map<ir::value*, std::vector<unsigned>> max_contiguous_;
std::map<ir::value*, std::vector<unsigned>> starting_multiple_;
std::map<ir::value*, cst_info> is_constant_;
std::map<ir::value*, unsigned> max_contiguous_;
std::map<ir::value*, unsigned> starting_multiple_;
};

View File

@@ -36,11 +36,11 @@ bool align::is_first_axis_unit(ir::value *x){
return true;
}
std::vector<align::cst_info> align::populate_is_constant(ir::value *v) {
align::cst_info align::populate_is_constant(ir::value *v) {
if(is_constant_.find(v) != is_constant_.end())
return is_constant_.at(v);
// helper for the cache
auto cache = [this,v](const std::vector<cst_info>& value){
auto cache = [this,v](cst_info value){
return add_to_cache(v, value, is_constant_); }
;
// populate