switch to O1 flag
This commit is contained in:
parent
375a325899
commit
b5e1610047
@ -96,9 +96,10 @@ int main(int argc, const char **argv) {
|
||||
std::make_shared<PassBuildCFG>(),
|
||||
std::make_shared<PassMem2Reg>(),
|
||||
};
|
||||
|
||||
for (auto pass : passes) {
|
||||
pass->run(visitor.module);
|
||||
if (flg_O1) {
|
||||
for (auto pass : passes) {
|
||||
pass->run(visitor.module);
|
||||
}
|
||||
}
|
||||
|
||||
if (emit_llvm) {
|
||||
|
||||
@ -69,6 +69,18 @@ static void analyze_alloca(InstAllocaPtr_t ai, AllocaInfo &info) {
|
||||
info.only_in_1_block = false;
|
||||
}
|
||||
}
|
||||
std::cout << "Alloca " << ai->name;
|
||||
std::cout << " Def: [";
|
||||
for (auto blk : info.def_blocks) {
|
||||
std::cout << blk->name << ", ";
|
||||
}
|
||||
std::cout << "]\n";
|
||||
std::cout << " Use: [";
|
||||
for (auto blk : info.def_blocks) {
|
||||
std::cout << blk->name << ", ";
|
||||
}
|
||||
std::cout << "]\n";
|
||||
std::cout.flush();
|
||||
}
|
||||
|
||||
// static bool rewrite_single_store(InstAllocaPtr_t ai, AllocaInfo& alloca_info) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user