more cleaning

This commit is contained in:
Philippe Tillet
2019-10-12 01:25:08 -04:00
parent 7d77f34db0
commit 6beef4be1f
4 changed files with 24 additions and 23 deletions

View File

@@ -17,13 +17,11 @@ namespace codegen{
namespace analysis{
// Entry point
void liveness::run(ir::module &mod) {
indices.clear();
intervals_.clear();
// Assigns index to each instruction
std::map<ir::value*, slot_index> indices;
for(ir::function *fn: mod.get_function_list()){
slot_index index = 0;
for(ir::basic_block *block: fn->blocks())
@@ -33,6 +31,7 @@ void liveness::run(ir::module &mod) {
}
}
// create live intervals
for(auto &x: layouts_->get_all()) {
layout_t* layout = x.second;
if(layout->type != SHARED)