#include "bolt/Passes/RegReAssign.h"
#include "bolt/Core/BinaryFunctionCallGraph.h"
#include "bolt/Core/MCPlus.h"
#include "bolt/Passes/DataflowAnalysis.h"
#include "bolt/Passes/DataflowInfoManager.h"
#include "bolt/Utils/Utils.h"
#include <numeric>
#define DEBUG_TYPE …
usingnamespacellvm;
namespace opts {
extern cl::OptionCategory BoltOptCategory;
extern cl::opt<bool> UpdateDebugSections;
static cl::opt<bool> AggressiveReAssign(
"use-aggr-reg-reassign",
cl::desc("use register liveness analysis to try to find more opportunities "
"for -reg-reassign optimization"),
cl::cat(BoltOptCategory));
}
namespace llvm {
namespace bolt {
void RegReAssign::swap(BinaryFunction &Function, MCPhysReg A, MCPhysReg B) { … }
void RegReAssign::rankRegisters(BinaryFunction &Function) { … }
void RegReAssign::aggressivePassOverFunction(BinaryFunction &Function) { … }
bool RegReAssign::conservativePassOverFunction(BinaryFunction &Function) { … }
void RegReAssign::setupAggressivePass(BinaryContext &BC,
std::map<uint64_t, BinaryFunction> &BFs) { … }
void RegReAssign::setupConservativePass(
BinaryContext &BC, std::map<uint64_t, BinaryFunction> &BFs) { … }
Error RegReAssign::runOnFunctions(BinaryContext &BC) { … }
}
}