fixed code style, moved dom tree building to IR

This commit is contained in:
ALEXks
2025-05-30 11:34:32 +03:00
parent 4e16638c36
commit d3e8c481d2
11 changed files with 155 additions and 213 deletions

View File

@@ -1149,6 +1149,16 @@ map<FuncInfo*, vector<BBlock*>> buildCFG(const map<string, CommonBlock*>& common
if (settings.withRD)
buildReachingDefs(result, settings);
if (settings.withDominators)
{
auto t = high_resolution_clock::now();
for (auto& [func, bblocks] : result)
SAPFOR::buildDominatorTree(bblocks);
auto msec = duration_cast<milliseconds>(high_resolution_clock::now() - t).count();
__spf_print(1, "dominator build time is %.3f sec\n", msec / 1000.);
}
if (SgFile::switchToFile(oldFile) == -1)
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);