#include "../lib/CodeGen/RegAllocScore.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSlotTracker.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
usingnamespacellvm;
extern cl::opt<double> CopyWeight;
extern cl::opt<double> LoadWeight;
extern cl::opt<double> StoreWeight;
extern cl::opt<double> CheapRematWeight;
extern cl::opt<double> ExpensiveRematWeight;
namespace {
#include "MFCommon.inc"
#define MOCK_INSTR(MACRO) …
enum MockInstrId { … };
const std::array<MCInstrDesc, MockInstrId::TotalMockInstrs> MockInstrDescs{ … };
MachineInstr *createMockCopy(MachineFunction &MF) { … }
MachineInstr *createMockLoad(MachineFunction &MF) { … }
MachineInstr *createMockStore(MachineFunction &MF) { … }
MachineInstr *createMockLoadStore(MachineFunction &MF) { … }
MachineInstr *createMockCheapRemat(MachineFunction &MF) { … }
MachineInstr *createMockExpensiveRemat(MachineFunction &MF) { … }
MachineInstr *createMockDebug(MachineFunction &MF) { … }
MachineInstr *createMockKill(MachineFunction &MF) { … }
MachineInstr *createMockInlineAsm(MachineFunction &MF) { … }
TEST(RegAllocScoreTest, SkipDebugKillInlineAsm) { … }
TEST(RegAllocScoreTest, Counts) { … }
}