#include "bolt/Passes/RegAnalysis.h"
#include "bolt/Core/BinaryFunction.h"
#include "bolt/Core/CallGraphWalker.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/CommandLine.h"
#define DEBUG_TYPE …
usingnamespacellvm;
namespace opts {
extern cl::opt<unsigned> Verbosity;
extern cl::OptionCategory BoltOptCategory;
cl::opt<bool> AssumeABI("assume-abi",
cl::desc("assume the ABI is never violated"),
cl::cat(BoltOptCategory));
}
namespace llvm {
namespace bolt {
RegAnalysis::RegAnalysis(BinaryContext &BC,
std::map<uint64_t, BinaryFunction> *BFs,
BinaryFunctionCallGraph *CG)
: … { … }
void RegAnalysis::beConservative(BitVector &Result) const { … }
bool RegAnalysis::isConservative(BitVector &Vec) const { … }
void RegAnalysis::getInstUsedRegsList(const MCInst &Inst, BitVector &RegSet,
bool GetClobbers) const { … }
void RegAnalysis::getInstClobberList(const MCInst &Inst,
BitVector &KillSet) const { … }
BitVector RegAnalysis::getFunctionUsedRegsList(const BinaryFunction *Func) { … }
BitVector RegAnalysis::getFunctionClobberList(const BinaryFunction *Func) { … }
void RegAnalysis::printStats() { … }
}
}