@@ -126,26 +126,15 @@ Error InsertNegateRAState::runOnFunctions(BinaryContext &BC) {
126126 return !BF.containedNegateRAState () || BF.isIgnored ();
127127 };
128128
129- int Total = llvm::count_if (
130- BC.getBinaryFunctions (),
131- [&](std::pair<const unsigned long , BinaryFunction> &P) {
132- return P.second .containedNegateRAState () && !P.second .isIgnored ();
133- });
134-
135- // If we attempt to run the pass, but SkipPredicate skips all functions,
136- // we get a warning that the SchedulingPolicy is changed to trivial.
137- // This would break bolt/test/AArch64/unmarked-data.test.
138- if (Total != 0 ) {
139- ParallelUtilities::runOnEachFunction (
140- BC, ParallelUtilities::SchedulingPolicy::SP_INST_LINEAR, WorkFun,
141- SkipPredicate, " InsertNegateRAStatePass" );
142-
143- BC.outs () << " BOLT-INFO: rewritten pac-ret DWARF info in "
144- << FunctionsModified << " out of "
145- << BC.getBinaryFunctions ().size () << " functions "
146- << format (" (%.2lf%%).\n " , (100.0 * FunctionsModified) /
147- BC.getBinaryFunctions ().size ());
148- }
129+ ParallelUtilities::runOnEachFunction (
130+ BC, ParallelUtilities::SchedulingPolicy::SP_INST_LINEAR, WorkFun,
131+ SkipPredicate, " InsertNegateRAStatePass" );
132+
133+ BC.outs () << " BOLT-INFO: rewritten pac-ret DWARF info in "
134+ << FunctionsModified << " out of " << BC.getBinaryFunctions ().size ()
135+ << " functions "
136+ << format (" (%.2lf%%).\n " , (100.0 * FunctionsModified) /
137+ BC.getBinaryFunctions ().size ());
149138 return Error::success ();
150139}
151140
0 commit comments