[PATCH] D52407: [llvm-exegesis] Add lit tests.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 24 07:20:51 PDT 2018
courbet created this revision.
courbet added a reviewer: gchatelet.
Herald added subscribers: tschuett, mgorny.
Herald added a reviewer: alexshap.
gchatelet accepted this revision.
This revision is now accepted and ready to land.
Right now we only have unit tests. This will allow testing the whole
tool. Even though We can't really check actual values, this will avoid
regressions such as PR39055.
Repository:
rL LLVM
https://reviews.llvm.org/D52407
Files:
test/CMakeLists.txt
test/lit.cfg.py
test/tools/llvm-exegesis/X86/latency-by-opcode-name.s
test/tools/llvm-exegesis/X86/lit.local.cfg
test/tools/llvm-exegesis/X86/uops-by-opcode-name.s
test/tools/llvm-exegesis/lit.local.cfg
Index: test/tools/llvm-exegesis/lit.local.cfg
===================================================================
--- /dev/null
+++ test/tools/llvm-exegesis/lit.local.cfg
@@ -0,0 +1,2 @@
+if 'native' not in config.available_features:
+ config.unsupported = True
Index: test/tools/llvm-exegesis/X86/uops-by-opcode-name.s
===================================================================
--- /dev/null
+++ test/tools/llvm-exegesis/X86/uops-by-opcode-name.s
@@ -0,0 +1,6 @@
+# RUN: llvm-exegesis -mode=uops -opcode-name=ADD32rr | FileCheck %s
+
+CHECK: mode: uops
+CHECK-NEXT: key:
+CHECK-NEXT: instructions:
+CHECK-NEXT: ADD32rr
Index: test/tools/llvm-exegesis/X86/lit.local.cfg
===================================================================
--- /dev/null
+++ test/tools/llvm-exegesis/X86/lit.local.cfg
@@ -0,0 +1,2 @@
+if not ('x86' in config.root.target_triple):
+ config.unsupported = True
Index: test/tools/llvm-exegesis/X86/latency-by-opcode-name.s
===================================================================
--- /dev/null
+++ test/tools/llvm-exegesis/X86/latency-by-opcode-name.s
@@ -0,0 +1,6 @@
+# RUN: llvm-exegesis -mode=latency -opcode-name=ADD32rr | FileCheck %s
+
+CHECK: mode: latency
+CHECK-NEXT: key:
+CHECK-NEXT: instructions:
+CHECK-NEXT: ADD32rr
Index: test/lit.cfg.py
===================================================================
--- test/lit.cfg.py
+++ test/lit.cfg.py
@@ -140,16 +140,17 @@
# FIXME: Why do we have both `lli` and `%lli` that do slightly different things?
tools.extend([
- 'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as', 'llvm-bcanalyzer',
- 'llvm-config', 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-diff', 'llvm-dis',
- 'llvm-dwarfdump', 'llvm-extract', 'llvm-isel-fuzzer', 'llvm-opt-fuzzer', 'llvm-lib',
- 'llvm-link', 'llvm-lto', 'llvm-lto2', 'llvm-mc', 'llvm-mca',
- 'llvm-modextract', 'llvm-nm', 'llvm-objcopy', 'llvm-objdump',
- 'llvm-pdbutil', 'llvm-profdata', 'llvm-ranlib', 'llvm-readobj',
- 'llvm-rtdyld', 'llvm-size', 'llvm-split', 'llvm-strings', 'llvm-strip', 'llvm-tblgen',
- 'llvm-undname', 'llvm-c-test', 'llvm-cxxfilt', 'llvm-xray', 'yaml2obj', 'obj2yaml',
- 'yaml-bench', 'verify-uselistorder',
- 'bugpoint', 'llc', 'llvm-symbolizer', 'opt', 'sancov', 'sanstats'])
+ 'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as',
+ 'llvm-bcanalyzer', 'llvm-config', 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres',
+ 'llvm-diff', 'llvm-dis', 'llvm-dwarfdump', 'llvm-exegesis', 'llvm-extract',
+ 'llvm-isel-fuzzer', 'llvm-opt-fuzzer', 'llvm-lib', 'llvm-link', 'llvm-lto',
+ 'llvm-lto2', 'llvm-mc', 'llvm-mca', 'llvm-modextract', 'llvm-nm',
+ 'llvm-objcopy', 'llvm-objdump', 'llvm-pdbutil', 'llvm-profdata',
+ 'llvm-ranlib', 'llvm-readobj', 'llvm-rtdyld', 'llvm-size', 'llvm-split',
+ 'llvm-strings', 'llvm-strip', 'llvm-tblgen', 'llvm-undname', 'llvm-c-test',
+ 'llvm-cxxfilt', 'llvm-xray', 'yaml2obj', 'obj2yaml', 'yaml-bench',
+ 'verify-uselistorder', 'bugpoint', 'llc', 'llvm-symbolizer', 'opt',
+ 'sancov', 'sanstats'])
# The following tools are optional
tools.extend([
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -60,6 +60,7 @@
dsymutil
llvm-dwarfdump
llvm-dwp
+ llvm-exegesis
llvm-extract
llvm-isel-fuzzer
llvm-lib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52407.166646.patch
Type: text/x-patch
Size: 3502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180924/33fbbdfb/attachment.bin>
More information about the llvm-commits
mailing list