From d3fd1644c0774cf745c0802e3fd3e8ffd21e4446 Mon Sep 17 00:00:00 2001 From: fye Date: Wed, 8 Jun 2022 11:16:29 -0700 Subject: [PATCH] debug: to align with gcc, resume call-graph at O0 and adjust invocation of BuildDebugInfo --- src/mapleall/maple_driver/src/driver_runner.cpp | 9 ++++----- src/mapleall/maple_phase/include/phases.def | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mapleall/maple_driver/src/driver_runner.cpp b/src/mapleall/maple_driver/src/driver_runner.cpp index 28adec1fba..40231dcdf0 100644 --- a/src/mapleall/maple_driver/src/driver_runner.cpp +++ b/src/mapleall/maple_driver/src/driver_runner.cpp @@ -296,16 +296,15 @@ void DriverRunner::RunNewPM(const std::string &output, const std::string &vtable void DriverRunner::ProcessMpl2mplAndMePhases(const std::string &output, const std::string &vtableImplFile) { CHECK_MODULE(); theMIRModule = theModule; - if (withDwarf && !theModule->IsWithDbgInfo()) { - std::cout << "set up debug info " << std::endl; - theMIRModule->GetDbgInfo()->BuildDebugInfo(); - } if (mpl2mplOptions != nullptr || meOptions != nullptr) { // multi-thread is not supported for now. MeOption::threads = 1; // main entry of newpm for me&mpl2mpl RunNewPM(output, vtableImplFile); - return; + } + if (withDwarf && !theModule->IsWithDbgInfo()) { + std::cout << "set up debug info " << std::endl; + theMIRModule->GetDbgInfo()->BuildDebugInfo(); } } diff --git a/src/mapleall/maple_phase/include/phases.def b/src/mapleall/maple_phase/include/phases.def index c1e7593ac0..13f6f39ad1 100644 --- a/src/mapleall/maple_phase/include/phases.def +++ b/src/mapleall/maple_phase/include/phases.def @@ -7,7 +7,7 @@ ADDMODULEPHASE("reflectionanalysis", JAVALANG) ADDMODULEPHASE("GenNativeStubFunc", JAVALANG) ADDMODULEPHASE("gencheckcast", JAVALANG) ADDMODULEPHASE("javaintrnlowering", JAVALANG) -ADDMODULEPHASE("callgraph", Options::O2 && !Options::profileUse) +ADDMODULEPHASE("callgraph", !Options::profileUse) ADDMODULEPHASE("inline", Options::O2 && Options::useInline && !Options::profileUse) // run callgraph again to delete fully inlined static function ADDMODULEPHASE("callgraph", Options::O2 && Options::useInline && !Options::profileUse) -- Gitee