diff options
author | Daniel Sanders <daniel_l_sanders@apple.com> | 2017-11-15 23:55:44 +0000 |
---|---|---|
committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2017-11-15 23:55:44 +0000 |
commit | 355825a81ef3e0a8d77826a689fc1111fe6a52ee (patch) | |
tree | b59ab0421469276a35ead39e29aeab8b1df11270 /lib/Target/BPF | |
parent | c39780185f3a0f09522bb21d6033df81bb8df692 (diff) |
Add backend name to Target to enable runtime info to be fed back into TableGen
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/BPF')
-rw-r--r-- | lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp b/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp index 265180b9987..1f7b8a04d58 100644 --- a/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp +++ b/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp @@ -28,9 +28,10 @@ Target &getTheBPFTarget() { extern "C" void LLVMInitializeBPFTargetInfo() { TargetRegistry::RegisterTarget(getTheBPFTarget(), "bpf", "BPF (host endian)", - [](Triple::ArchType) { return false; }, true); - RegisterTarget<Triple::bpfel, /*HasJIT=*/true> X(getTheBPFleTarget(), "bpfel", - "BPF (little endian)"); + "BPF", [](Triple::ArchType) { return false; }, + true); + RegisterTarget<Triple::bpfel, /*HasJIT=*/true> X( + getTheBPFleTarget(), "bpfel", "BPF (little endian)", "BPF"); RegisterTarget<Triple::bpfeb, /*HasJIT=*/true> Y(getTheBPFbeTarget(), "bpfeb", - "BPF (big endian)"); + "BPF (big endian)", "BPF"); } |