aboutsummaryrefslogtreecommitdiff
path: root/bolt/lib/Passes/ReorderFunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bolt/lib/Passes/ReorderFunctions.cpp')
-rw-r--r--bolt/lib/Passes/ReorderFunctions.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/bolt/lib/Passes/ReorderFunctions.cpp b/bolt/lib/Passes/ReorderFunctions.cpp
index f8f6a01..35c5acf 100644
--- a/bolt/lib/Passes/ReorderFunctions.cpp
+++ b/bolt/lib/Passes/ReorderFunctions.cpp
@@ -28,9 +28,8 @@ extern cl::OptionCategory BoltOptCategory;
extern cl::opt<unsigned> Verbosity;
extern cl::opt<uint32_t> RandomSeed;
-extern size_t padFunction(const cl::list<std::string> &Spec,
- const bolt::BinaryFunction &Function);
-extern cl::list<std::string> FunctionPadSpec, FunctionPadBeforeSpec;
+extern size_t padFunctionBefore(const bolt::BinaryFunction &Function);
+extern size_t padFunctionAfter(const bolt::BinaryFunction &Function);
extern cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions;
cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions(
@@ -306,12 +305,10 @@ Error ReorderFunctions::runOnFunctions(BinaryContext &BC) {
return false;
if (B->isIgnored())
return true;
- const size_t PadA =
- opts::padFunction(opts::FunctionPadSpec, *A) +
- opts::padFunction(opts::FunctionPadBeforeSpec, *A);
- const size_t PadB =
- opts::padFunction(opts::FunctionPadSpec, *B) +
- opts::padFunction(opts::FunctionPadBeforeSpec, *B);
+ const size_t PadA = opts::padFunctionBefore(*A) +
+ opts::padFunctionAfter(*A);
+ const size_t PadB = opts::padFunctionBefore(*B) +
+ opts::padFunctionAfter(*B);
if (!PadA || !PadB) {
if (PadA)
return true;