File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ namespace bolt {
2525
2626class ADRRelaxationPass : public BinaryFunctionPass {
2727public:
28- explicit ADRRelaxationPass () : BinaryFunctionPass(false ) {}
28+ explicit ADRRelaxationPass (const cl::opt<bool > &PrintPass)
29+ : BinaryFunctionPass(PrintPass) {}
2930
3031 const char *getName () const override { return " adr-relaxation" ; }
3132
Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ static cl::opt<bool> PrintJTFootprintReduction(
126126 cl::desc (" print function after jt-footprint-reduction pass" ), cl::Hidden,
127127 cl::cat(BoltOptCategory));
128128
129+ static cl::opt<bool >
130+ PrintAdrRelaxation (" print-adr-relaxation" ,
131+ cl::desc (" print functions after ADR Relaxation pass" ),
132+ cl::Hidden, cl::cat(BoltOptCategory));
133+
129134static cl::opt<bool >
130135 PrintLongJmp (" print-longjmp" ,
131136 cl::desc (" print functions after longjmp pass" ), cl::Hidden,
@@ -493,7 +498,8 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) {
493498 Manager.registerPass (std::make_unique<ReorderData>());
494499
495500 if (BC.isAArch64 ()) {
496- Manager.registerPass (std::make_unique<ADRRelaxationPass>());
501+ Manager.registerPass (
502+ std::make_unique<ADRRelaxationPass>(PrintAdrRelaxation));
497503
498504 // Tighten branches according to offset differences between branch and
499505 // targets. No extra instructions after this pass, otherwise we may have
You can’t perform that action at this time.
0 commit comments