summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Generic
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2018-12-04 17:45:12 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2018-12-04 17:45:12 +0000
commit43153024ab638b3a971038cd6f8b650667de77e4 (patch)
tree88f0bf6b8836bdd77bb82468a7abfd9c15183d41 /llvm/test/CodeGen/Generic
parentd23b5ed85757ed4a2ea4835e69177b5e7dedc5b4 (diff)
downloadbcm5719-llvm-43153024ab638b3a971038cd6f8b650667de77e4.tar.gz
bcm5719-llvm-43153024ab638b3a971038cd6f8b650667de77e4.zip
MIR: Add method to stop after specific runs of passes
Currently if you use -{start,stop}-{before,after}, it picks the first instance with the matching pass name. If you run the same pass multiple times, there's no way to distinguish them. Allow specifying a run index wih ,N to specify which you mean. llvm-svn: 348285
Diffstat (limited to 'llvm/test/CodeGen/Generic')
-rw-r--r--llvm/test/CodeGen/Generic/llc-start-stop-instance-errors.ll4
-rw-r--r--llvm/test/CodeGen/Generic/llc-start-stop-instance.ll50
2 files changed, 54 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/llc-start-stop-instance-errors.ll b/llvm/test/CodeGen/Generic/llc-start-stop-instance-errors.ll
new file mode 100644
index 00000000000..cb1b30f3a81
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/llc-start-stop-instance-errors.ll
@@ -0,0 +1,4 @@
+; RUN: not llc -debug-pass=Structure -stop-after=dead-mi-elimination,arst %s -o /dev/null 2>&1 \
+; RUN: | FileCheck -check-prefix=NOT-NUM %s
+
+; NOT-NUM: LLVM ERROR: invalid pass instance specifier dead-mi-elimination,arst
diff --git a/llvm/test/CodeGen/Generic/llc-start-stop-instance.ll b/llvm/test/CodeGen/Generic/llc-start-stop-instance.ll
new file mode 100644
index 00000000000..bf88a2c3793
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/llc-start-stop-instance.ll
@@ -0,0 +1,50 @@
+; RUN: llc -debug-pass=Structure -stop-after=dead-mi-elimination,1 %s -o /dev/null 2>&1 \
+; RUN: | FileCheck -check-prefix=STOP-AFTER-DEAD1 %s
+
+; RUN: llc -debug-pass=Structure -stop-after=dead-mi-elimination,0 %s -o /dev/null 2>&1 \
+; RUN: | FileCheck -check-prefix=STOP-AFTER-DEAD0 %s
+
+
+; RUN: llc -debug-pass=Structure -stop-before=dead-mi-elimination,1 %s -o /dev/null 2>&1 \
+; RUN: | FileCheck -check-prefix=STOP-BEFORE-DEAD1 %s
+
+
+; RUN: llc -debug-pass=Structure -start-before=dead-mi-elimination,1 %s -o /dev/null 2>&1 \
+; RUN: | FileCheck -check-prefix=START-BEFORE-DEAD1 %s
+
+; RUN: llc -debug-pass=Structure -start-after=dead-mi-elimination,1 %s -o /dev/null 2>&1 \
+; RUN: | FileCheck -check-prefix=START-AFTER-DEAD1 %s
+
+
+
+; STOP-AFTER-DEAD1: -dead-mi-elimination
+; STOP-AFTER-DEAD1-SAME: -dead-mi-elimination
+
+; STOP-AFTER-DEAD1: Remove dead machine instructions
+; STOP-AFTER-DEAD1: Remove dead machine instructions
+
+
+
+; STOP-AFTER-DEAD0: -dead-mi-elimination
+
+; STOP-AFTER-DEAD0-NOT: Remove dead machine instructions
+; STOP-AFTER-DEAD0: Remove dead machine instructions
+; STOP-AFTER-DEAD0-NOT: Remove dead machine instructions
+
+
+
+; STOP-BEFORE-DEAD1: -dead-mi-elimination
+; STOP-BEFORE-DEAD1: Remove dead machine instructions
+; STOP-BEFORE-DEAD1-NOT: Remove dead machine instructions
+
+
+
+; START-BEFORE-DEAD1: -dead-mi-elimination
+; START-BEFORE-DEAD1-NOT: Remove dead machine instructions
+; START-BEFORE-DEAD1: Remove dead machine instructions
+; START-BEFORE-DEAD1-NOT: Remove dead machine instructions
+
+
+
+; START-AFTER-DEAD1-NOT: -dead-mi-elimination
+; START-AFTER-DEAD1-NOT: Remove dead machine instructions
OpenPOWER on IntegriCloud