WIP: merge with master
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#define _LEAK_
|
||||
#include "../Utils/leak_detector.h"
|
||||
#include "leak_detector.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -8,9 +8,9 @@
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
|
||||
#include "../Utils/SgUtils.h"
|
||||
#include "../Utils/CommonBlock.h"
|
||||
#include "../GraphCall/graph_calls.h"
|
||||
#include "SgUtils.h"
|
||||
#include "CommonBlock.h"
|
||||
#include "graph_calls.h"
|
||||
|
||||
#include "dvm.h"
|
||||
#include "IR.h"
|
||||
@@ -1167,6 +1167,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__);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user