Lines Matching defs:ReorderFunctions
1 //===- bolt/Passes/ReorderFunctions.cpp - Function reordering pass --------===//
9 // This file implements ReorderFunctions class.
13 #include "bolt/Passes/ReorderFunctions.h"
34 extern cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions;
35 cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions(
38 cl::init(bolt::ReorderFunctions::RT_NONE),
39 cl::values(clEnumValN(bolt::ReorderFunctions::RT_NONE, "none",
41 clEnumValN(bolt::ReorderFunctions::RT_EXEC_COUNT, "exec-count",
43 clEnumValN(bolt::ReorderFunctions::RT_HFSORT, "hfsort",
45 clEnumValN(bolt::ReorderFunctions::RT_HFSORT_PLUS, "hfsort+",
47 clEnumValN(bolt::ReorderFunctions::RT_CDSORT, "cdsort",
49 clEnumValN(bolt::ReorderFunctions::RT_PETTIS_HANSEN,
51 clEnumValN(bolt::ReorderFunctions::RT_RANDOM, "random",
53 clEnumValN(bolt::ReorderFunctions::RT_USER, "user",
56 cl::callback([](const bolt::ReorderFunctions::ReorderType &option) {
57 if (option == bolt::ReorderFunctions::RT_HFSORT_PLUS) {
60 ReorderFunctions = bolt::ReorderFunctions::RT_CDSORT;
118 void ReorderFunctions::reorder(BinaryContext &BC,
141 if (opts::ReorderFunctions == RT_NONE)
147 void ReorderFunctions::printStats(BinaryContext &BC,
258 Error ReorderFunctions::readFunctionOrderFile(
272 Error ReorderFunctions::runOnFunctions(BinaryContext &BC) {
274 if (opts::ReorderFunctions != RT_NONE &&
275 opts::ReorderFunctions != RT_EXEC_COUNT &&
276 opts::ReorderFunctions != RT_USER) {
295 switch (opts::ReorderFunctions) {