llvm/llvm/unittests/CodeGen/RegAllocScoreTest.cpp

//===- MachineInstrTest.cpp -----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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 helper functions to ease the manipulation of MachineFunctions.
#include "MFCommon.inc"

// MachineFunction::CreateMachineInstr doesn't copy the MCInstrDesc, it
// takes its address. So we want a bunch of pre-allocated mock MCInstrDescs.
#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) {}
} // end namespace