File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,5 @@ add_llvm_library(LLVMBOLTProfile
1717target_link_libraries (LLVMBOLTProfile
1818 PRIVATE
1919 LLVMBOLTCore
20- LLVMBOLTPasses
2120 LLVMBOLTUtils
2221 )
Original file line number Diff line number Diff line change @@ -613,8 +613,6 @@ Error DataAggregator::readProfile(BinaryContext &BC) {
613613 if (std::error_code EC = writeBATYAML (BC, opts::SaveProfile))
614614 report_error (" cannot create output data file" , EC);
615615 }
616- PrintProgramStats PPS (BAT);
617- BC.logBOLTErrorsAndQuitOnFatal (PPS.runOnFunctions (BC));
618616 }
619617
620618 return Error::success ();
Original file line number Diff line number Diff line change 1717#include " bolt/Core/MCPlusBuilder.h"
1818#include " bolt/Core/ParallelUtilities.h"
1919#include " bolt/Core/Relocation.h"
20+ #include " bolt/Passes/BinaryPasses.h"
2021#include " bolt/Passes/CacheMetrics.h"
2122#include " bolt/Passes/ReorderFunctions.h"
2223#include " bolt/Profile/BoltAddressTranslation.h"
@@ -3281,8 +3282,11 @@ void RewriteInstance::processProfileData() {
32813282 // Release memory used by profile reader.
32823283 ProfileReader.reset ();
32833284
3284- if (opts::AggregateOnly)
3285+ if (opts::AggregateOnly) {
3286+ PrintProgramStats PPS (&*BAT);
3287+ BC->logBOLTErrorsAndQuitOnFatal (PPS.runOnFunctions (*BC));
32853288 exit (0 );
3289+ }
32863290}
32873291
32883292void RewriteInstance::disassembleFunctions () {
You can’t perform that action at this time.
0 commit comments