#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MIRParser/MIRParser.h"
#include "llvm/CodeGen/MIRPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineModuleSlotTracker.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/FileCheck/FileCheck.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSlotTracker.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "gtest/gtest.h"
usingnamespacellvm;
class MachineMetadataTest : public testing::Test { … };
static std::string print(std::function<void(raw_ostream &OS)> PrintFn) { … }
TEST_F(MachineMetadataTest, TrivialHook) { … }
TEST_F(MachineMetadataTest, BasicHook) { … }
static bool checkOutput(std::string CheckString, std::string Output) { … }
TEST_F(MachineMetadataTest, MMSlotTrackerAArch64) { … }
TEST_F(MachineMetadataTest, isMetaInstruction) { … }
TEST_F(MachineMetadataTest, MMSlotTrackerX64) { … }
TEST_F(MachineMetadataTest, MMSlotTrackerAMDGPU) { … }
TEST_F(MachineMetadataTest, TiedOpsRewritten) { … }
TEST_F(MachineMetadataTest, NoTiedOpsRewritten) { … }