[codegen][coalesce] more bugfixes
This commit is contained in:
@@ -298,7 +298,7 @@ void grids::run(ir::module &mod) {
|
||||
unsigned current = num_threads;
|
||||
std::string nts = "nts.d" + s_ld;
|
||||
std::string mts = "mts.d" + s_ld;
|
||||
params_.at(i).at(nts)->set_value(clamp(size / num_threads, 1, 8));
|
||||
params_.at(i).at(nts)->set_value(clamp(size / num_threads, 1, 4));
|
||||
params_.at(i).at(mts)->set_value(clamp(current, 1, shapes[ld] / params_.at(i).at(nts)->get_value()));
|
||||
current = current / params_.at(i).at(mts)->get_value();
|
||||
for(size_t d = 1; d < shapes.size(); d++){
|
||||
|
@@ -34,6 +34,16 @@ void meminfo::replace(ir::value* before, ir::value *after) {
|
||||
}
|
||||
}
|
||||
|
||||
void meminfo::copy(ir::value* y, ir::value *x) {
|
||||
if(shared_.find(x) != shared_.end())
|
||||
shared_.insert(y);
|
||||
if(refs_.find(x) != refs_.end())
|
||||
refs_[y] = refs_[x];
|
||||
if(double_.find(x) != double_.end())
|
||||
double_.insert(y);
|
||||
}
|
||||
|
||||
|
||||
inline bool get_is_shared(ir::value* v) {
|
||||
if(dynamic_cast<ir::atomic_cas_inst*>(v))
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user