[PYTHON][KERNEL] Added benchmarking functionalities for kernels

This commit is contained in:
Philippe Tillet
2019-10-27 15:32:34 -04:00
parent e11557855f
commit 0ec213547c
9 changed files with 207 additions and 112 deletions

View File

@@ -56,14 +56,12 @@ void disassociate::run(ir::module &mod) {
bld.set_insert_point(y);
bld.insert(cloned);
clone_map[y] = cloned;
// replace in above level
if(depth > 1){
// replace operands of parents
if(depth > 1)
for(ir::user* ux: x.second.at(depth - 1))
clone_map.at((ir::instruction*)ux)->replace_uses_of_with(y, cloned);
}
else{
else
x.first->replace_uses_of_with(y, cloned);
}
}
depth += 1;
}