summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Lanai
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-11-15 23:55:44 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-11-15 23:55:44 +0000
commitf2df288e6e81e9466b45e446dd8c50c4a979ce55 (patch)
tree1e114de53191323acc047bcb8654d11c98c19ff1 /llvm/lib/Target/Lanai
parent9f6da99d09b1a06c0e26b5258b06363fc1d20bae (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
Diffstat (limited to 'llvm/lib/Target/Lanai')
-rw-r--r--llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp b/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp
index e377db1d49d..5eed0cb2836 100644
--- a/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp
+++ b/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp
@@ -21,5 +21,6 @@ Target &getTheLanaiTarget() {
} // namespace llvm
extern "C" void LLVMInitializeLanaiTargetInfo() {
- RegisterTarget<Triple::lanai> X(getTheLanaiTarget(), "lanai", "Lanai");
+ RegisterTarget<Triple::lanai> X(getTheLanaiTarget(), "lanai", "Lanai",
+ "Lanai");
}