2016-02-18 15:37:17 +08:00
|
|
|
#include "gtest/gtest.h"
|
2016-05-03 07:05:48 +08:00
|
|
|
#include "llvm/ADT/STLExtras.h"
|
|
|
|
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
|
|
|
|
#include "llvm/CodeGen/MIRParser/MIRParser.h"
|
|
|
|
#include "llvm/CodeGen/MachineFunction.h"
|
2016-05-10 11:03:55 +08:00
|
|
|
#include "llvm/CodeGen/MachineModuleInfo.h"
|
2016-05-03 07:05:48 +08:00
|
|
|
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
|
|
|
#include "llvm/CodeGen/Passes.h"
|
|
|
|
#include "llvm/Support/MemoryBuffer.h"
|
|
|
|
#include "llvm/Support/SourceMgr.h"
|
|
|
|
#include "llvm/Support/TargetRegistry.h"
|
|
|
|
#include "llvm/Support/TargetSelect.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/TargetOptions.h"
|
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
|
|
|
#include "llvm/IR/LegacyPassManager.h"
|
2016-02-18 15:37:17 +08:00
|
|
|
|
2016-05-03 07:05:48 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
void initializeTestPassPass(PassRegistry &);
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
void initLLVM() {
|
|
|
|
InitializeAllTargets();
|
|
|
|
InitializeAllTargetMCs();
|
|
|
|
InitializeAllAsmPrinters();
|
|
|
|
InitializeAllAsmParsers();
|
|
|
|
|
|
|
|
PassRegistry *Registry = PassRegistry::getPassRegistry();
|
|
|
|
initializeCore(*Registry);
|
|
|
|
initializeCodeGen(*Registry);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Create a TargetMachine. As we lack a dedicated always available target for
|
2016-07-26 11:57:45 +08:00
|
|
|
/// unittests, we go for "AMDGPU" to be able to test normal and subregister
|
|
|
|
/// liveranges.
|
2016-05-03 07:05:48 +08:00
|
|
|
std::unique_ptr<TargetMachine> createTargetMachine() {
|
2016-07-26 11:57:45 +08:00
|
|
|
Triple TargetTriple("amdgcn--");
|
2016-05-03 07:05:48 +08:00
|
|
|
std::string Error;
|
|
|
|
const Target *T = TargetRegistry::lookupTarget("", TargetTriple, Error);
|
|
|
|
if (!T)
|
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
TargetOptions Options;
|
|
|
|
return std::unique_ptr<TargetMachine>(
|
2016-07-26 11:57:45 +08:00
|
|
|
T->createTargetMachine("AMDGPU", "", "", Options, None,
|
2016-05-03 07:05:48 +08:00
|
|
|
CodeModel::Default, CodeGenOpt::Aggressive));
|
|
|
|
}
|
|
|
|
|
|
|
|
std::unique_ptr<Module> parseMIR(LLVMContext &Context,
|
|
|
|
legacy::PassManagerBase &PM, std::unique_ptr<MIRParser> &MIR,
|
|
|
|
const TargetMachine &TM, StringRef MIRCode, const char *FuncName) {
|
|
|
|
SMDiagnostic Diagnostic;
|
|
|
|
std::unique_ptr<MemoryBuffer> MBuffer = MemoryBuffer::getMemBuffer(MIRCode);
|
|
|
|
MIR = createMIRParser(std::move(MBuffer), Context);
|
|
|
|
if (!MIR)
|
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
std::unique_ptr<Module> M = MIR->parseLLVMModule();
|
|
|
|
if (!M)
|
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
M->setDataLayout(TM.createDataLayout());
|
|
|
|
|
|
|
|
Function *F = M->getFunction(FuncName);
|
|
|
|
if (!F)
|
|
|
|
return nullptr;
|
|
|
|
|
2016-05-10 09:32:40 +08:00
|
|
|
const LLVMTargetMachine &LLVMTM = static_cast<const LLVMTargetMachine&>(TM);
|
|
|
|
LLVMTM.addMachineModuleInfo(PM);
|
|
|
|
LLVMTM.addMachineFunctionAnalysis(PM, MIR.get());
|
2016-05-03 07:05:48 +08:00
|
|
|
|
|
|
|
return M;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef std::function<void(MachineFunction&,LiveIntervals&)> LiveIntervalTest;
|
|
|
|
|
|
|
|
struct TestPass : public MachineFunctionPass {
|
|
|
|
static char ID;
|
|
|
|
TestPass() : MachineFunctionPass(ID) {
|
|
|
|
// We should never call this but always use PM.add(new TestPass(...))
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
TestPass(LiveIntervalTest T) : MachineFunctionPass(ID), T(T) {
|
|
|
|
initializeTestPassPass(*PassRegistry::getPassRegistry());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool runOnMachineFunction(MachineFunction &MF) override {
|
|
|
|
LiveIntervals &LIS = getAnalysis<LiveIntervals>();
|
|
|
|
T(MF, LIS);
|
|
|
|
EXPECT_TRUE(MF.verify(this));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
|
|
|
AU.setPreservesAll();
|
|
|
|
AU.addRequired<LiveIntervals>();
|
|
|
|
AU.addPreserved<LiveIntervals>();
|
|
|
|
MachineFunctionPass::getAnalysisUsage(AU);
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
LiveIntervalTest T;
|
|
|
|
};
|
|
|
|
|
2016-07-26 11:57:45 +08:00
|
|
|
static MachineInstr &getMI(MachineFunction &MF, unsigned At,
|
|
|
|
unsigned BlockNum) {
|
2016-05-25 05:54:01 +08:00
|
|
|
MachineBasicBlock &MBB = *MF.getBlockNumbered(BlockNum);
|
2016-05-03 07:05:48 +08:00
|
|
|
|
|
|
|
unsigned I = 0;
|
|
|
|
for (MachineInstr &MI : MBB) {
|
2016-07-26 11:57:45 +08:00
|
|
|
if (I == At)
|
|
|
|
return MI;
|
2016-05-03 07:05:48 +08:00
|
|
|
++I;
|
|
|
|
}
|
2016-07-26 11:57:45 +08:00
|
|
|
llvm_unreachable("Instruction not found");
|
|
|
|
}
|
2016-05-03 07:05:48 +08:00
|
|
|
|
2016-07-26 11:57:45 +08:00
|
|
|
/**
|
|
|
|
* Move instruction number \p From in front of instruction number \p To and
|
|
|
|
* update affected liveness intervals with LiveIntervalAnalysis::handleMove().
|
|
|
|
*/
|
|
|
|
static void testHandleMove(MachineFunction &MF, LiveIntervals &LIS,
|
|
|
|
unsigned From, unsigned To, unsigned BlockNum = 0) {
|
|
|
|
MachineInstr &FromInstr = getMI(MF, From, BlockNum);
|
|
|
|
MachineInstr &ToInstr = getMI(MF, To, BlockNum);
|
|
|
|
|
|
|
|
MachineBasicBlock &MBB = *FromInstr.getParent();
|
|
|
|
MBB.splice(ToInstr.getIterator(), &MBB, FromInstr.getIterator());
|
|
|
|
LIS.handleMove(FromInstr, true);
|
2016-05-03 07:05:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void liveIntervalTest(StringRef MIRFunc, LiveIntervalTest T) {
|
|
|
|
LLVMContext Context;
|
|
|
|
std::unique_ptr<TargetMachine> TM = createTargetMachine();
|
|
|
|
// This test is designed for the X86 backend; stop if it is not available.
|
|
|
|
if (!TM)
|
|
|
|
return;
|
|
|
|
|
|
|
|
legacy::PassManager PM;
|
|
|
|
|
|
|
|
SmallString<160> S;
|
|
|
|
StringRef MIRString = (Twine(
|
|
|
|
"---\n"
|
|
|
|
"...\n"
|
|
|
|
"name: func\n"
|
|
|
|
"registers:\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" - { id: 0, class: sreg_64 }\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
"body: |\n"
|
|
|
|
" bb.0:\n"
|
|
|
|
) + Twine(MIRFunc) + Twine("...\n")).toNullTerminatedStringRef(S);
|
|
|
|
std::unique_ptr<MIRParser> MIR;
|
|
|
|
std::unique_ptr<Module> M = parseMIR(Context, PM, MIR, *TM, MIRString,
|
|
|
|
"func");
|
|
|
|
|
|
|
|
PM.add(new TestPass(T));
|
|
|
|
|
|
|
|
PM.run(*M);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // End of anonymous namespace.
|
|
|
|
|
|
|
|
char TestPass::ID = 0;
|
|
|
|
INITIALIZE_PASS(TestPass, "testpass", "testpass", false, false)
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveUpDef) {
|
|
|
|
// Value defined.
|
|
|
|
liveIntervalTest(
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
" early-clobber %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveUpRedef) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
" %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveUpEarlyDef) {
|
|
|
|
liveIntervalTest(
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
" early-clobber %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveUpEarlyRedef) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
" early-clobber %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveUpKill) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveUpKillFollowing) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Construct a situation where we have intervals following a hole
|
|
|
|
// while still having connected components.
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveDownDef) {
|
|
|
|
// Value defined.
|
|
|
|
liveIntervalTest(
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
" early-clobber %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveDownRedef) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
|
|
|
" %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveDownEarlyDef) {
|
|
|
|
liveIntervalTest(
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
2016-05-03 07:05:48 +08:00
|
|
|
" early-clobber %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveDownEarlyRedef) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
|
|
|
" early-clobber %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveDownKill) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit %0\n"
|
|
|
|
" S_NOP 0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveDownKillFollowing) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit %0\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
2016-05-03 07:05:48 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-05-07 05:47:41 +08:00
|
|
|
TEST(LiveIntervalTest, MoveUndefUse) {
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit undef %0\n"
|
|
|
|
" S_NOP 0, implicit %0\n"
|
|
|
|
" S_NOP 0\n",
|
2016-05-07 05:47:41 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 1, 3);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-05-25 05:54:01 +08:00
|
|
|
TEST(LiveIntervalTest, MoveUpValNos) {
|
|
|
|
// handleMoveUp() had a bug where it would reuse the value number of the
|
|
|
|
// destination segment, even though we have no guarntee that this valno wasn't
|
|
|
|
// used in other segments.
|
|
|
|
liveIntervalTest(
|
|
|
|
" successors: %bb.1, %bb.2\n"
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_CBRANCH_VCCNZ %bb.2, implicit undef %vcc\n"
|
|
|
|
" S_BRANCH %bb.1\n"
|
2016-05-25 05:54:01 +08:00
|
|
|
" bb.2:\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0, implicit %0\n"
|
2016-05-25 05:54:01 +08:00
|
|
|
" bb.1:\n"
|
|
|
|
" successors: %bb.2\n"
|
|
|
|
" %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
|
|
|
" %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
|
|
|
" %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_BRANCH %bb.2\n",
|
2016-05-25 05:54:01 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 2, 0, 2);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-06-11 08:31:28 +08:00
|
|
|
TEST(LiveIntervalTest, MoveOverUndefUse0) {
|
|
|
|
// findLastUseBefore() used by handleMoveUp() must ignore undef operands.
|
|
|
|
liveIntervalTest(
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit undef %0\n"
|
2016-06-11 08:31:28 +08:00
|
|
|
" %0 = IMPLICIT_DEF implicit %0(tied-def 0)\n",
|
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 3, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(LiveIntervalTest, MoveOverUndefUse1) {
|
|
|
|
// findLastUseBefore() used by handleMoveUp() must ignore undef operands.
|
|
|
|
liveIntervalTest(
|
2016-07-26 11:57:45 +08:00
|
|
|
" %sgpr0 = IMPLICIT_DEF\n"
|
|
|
|
" S_NOP 0\n"
|
|
|
|
" S_NOP 0, implicit undef %sgpr0\n"
|
|
|
|
" %sgpr0 = IMPLICIT_DEF implicit %sgpr0(tied-def 0)\n",
|
2016-06-11 08:31:28 +08:00
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
testHandleMove(MF, LIS, 3, 1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-07-26 11:57:45 +08:00
|
|
|
TEST(LiveIntervalTest, SubRegMoveDown) {
|
|
|
|
// Subregister ranges can have holes inside a basic block. Check for a
|
|
|
|
// movement of the form 32->150 in a liverange [16, 32) [100,200).
|
|
|
|
liveIntervalTest(
|
|
|
|
" successors: %bb.1, %bb.2\n"
|
|
|
|
" %0 = IMPLICIT_DEF\n"
|
|
|
|
" S_CBRANCH_VCCNZ %bb.2, implicit undef %vcc\n"
|
|
|
|
" S_BRANCH %bb.1\n"
|
|
|
|
" bb.2:\n"
|
|
|
|
" successors: %bb.1\n"
|
2016-07-27 05:49:34 +08:00
|
|
|
" S_NOP 0, implicit %0.sub0\n"
|
|
|
|
" S_NOP 0, implicit %0.sub1\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" S_NOP 0\n"
|
2016-07-27 05:49:34 +08:00
|
|
|
" undef %0.sub0 = IMPLICIT_DEF\n"
|
|
|
|
" %0.sub1 = IMPLICIT_DEF\n"
|
2016-07-26 11:57:45 +08:00
|
|
|
" bb.1:\n"
|
|
|
|
" S_NOP 0, implicit %0\n",
|
|
|
|
[](MachineFunction &MF, LiveIntervals &LIS) {
|
|
|
|
// Scheduler behaviour: Clear def,read-undef flag and move.
|
|
|
|
MachineInstr &MI = getMI(MF, 3, /*BlockNum=*/1);
|
|
|
|
MI.getOperand(0).setIsUndef(false);
|
|
|
|
testHandleMove(MF, LIS, 1, 4, /*BlockNum=*/1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-05-03 07:05:48 +08:00
|
|
|
int main(int argc, char **argv) {
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
|
|
initLLVM();
|
|
|
|
return RUN_ALL_TESTS();
|
2016-02-18 15:37:17 +08:00
|
|
|
}
|