[BOLT][NFC] Move out PrintProgramStats from Profile into Rewrite (#93075)
Eliminate the dependence of Profile on Passes. Test Plan: NFC
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "bolt/Core/MCPlusBuilder.h"
|
||||
#include "bolt/Core/ParallelUtilities.h"
|
||||
#include "bolt/Core/Relocation.h"
|
||||
#include "bolt/Passes/BinaryPasses.h"
|
||||
#include "bolt/Passes/CacheMetrics.h"
|
||||
#include "bolt/Passes/ReorderFunctions.h"
|
||||
#include "bolt/Profile/BoltAddressTranslation.h"
|
||||
@@ -3281,8 +3282,11 @@ void RewriteInstance::processProfileData() {
|
||||
// Release memory used by profile reader.
|
||||
ProfileReader.reset();
|
||||
|
||||
if (opts::AggregateOnly)
|
||||
if (opts::AggregateOnly) {
|
||||
PrintProgramStats PPS(&*BAT);
|
||||
BC->logBOLTErrorsAndQuitOnFatal(PPS.runOnFunctions(*BC));
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
void RewriteInstance::disassembleFunctions() {
|
||||
|
||||
Reference in New Issue
Block a user