mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
6503157726
Summary: Make it possible to feed runtime information back to tablegen to enable profile-guided tablegen-eration, detection of untested tablegen definitions, etc. Being a cross-compiler by nature, LLVM will potentially collect data for multiple architectures (e.g. when running 'ninja check'). We therefore need a way for TableGen to figure out what data applies to the backend it is generating at the time. This patch achieves that by including the name of the 'def X : Target ...' for the backend in the TargetRegistry. Reviewers: qcolombet Reviewed By: qcolombet Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev Differential Revision: https://reviews.llvm.org/D39742 llvm-svn: 318352
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
//===-- MipsTargetInfo.cpp - Mips Target Implementation -------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Mips.h"
|
|
#include "llvm/IR/Module.h"
|
|
#include "llvm/Support/TargetRegistry.h"
|
|
using namespace llvm;
|
|
|
|
Target &llvm::getTheMipsTarget() {
|
|
static Target TheMipsTarget;
|
|
return TheMipsTarget;
|
|
}
|
|
Target &llvm::getTheMipselTarget() {
|
|
static Target TheMipselTarget;
|
|
return TheMipselTarget;
|
|
}
|
|
Target &llvm::getTheMips64Target() {
|
|
static Target TheMips64Target;
|
|
return TheMips64Target;
|
|
}
|
|
Target &llvm::getTheMips64elTarget() {
|
|
static Target TheMips64elTarget;
|
|
return TheMips64elTarget;
|
|
}
|
|
|
|
extern "C" void LLVMInitializeMipsTargetInfo() {
|
|
RegisterTarget<Triple::mips,
|
|
/*HasJIT=*/true>
|
|
X(getTheMipsTarget(), "mips", "Mips", "Mips");
|
|
|
|
RegisterTarget<Triple::mipsel,
|
|
/*HasJIT=*/true>
|
|
Y(getTheMipselTarget(), "mipsel", "Mipsel", "Mips");
|
|
|
|
RegisterTarget<Triple::mips64,
|
|
/*HasJIT=*/true>
|
|
A(getTheMips64Target(), "mips64", "Mips64 [experimental]", "Mips");
|
|
|
|
RegisterTarget<Triple::mips64el,
|
|
/*HasJIT=*/true>
|
|
B(getTheMips64elTarget(), "mips64el", "Mips64el [experimental]", "Mips");
|
|
}
|