summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Generic
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-07-02 19:48:45 +0000
committerBob Wilson <bob.wilson@apple.com>2012-07-02 19:48:45 +0000
commitcac3b9063320fdace01f1e994addf3b6823c8030 (patch)
tree5e7209428771ad7342d10bc57a6960d26b13b326 /llvm/test/CodeGen/Generic
parenta3f9fa710a0523b548ada0b700e525f0ae5f3520 (diff)
downloadbcm5719-llvm-cac3b9063320fdace01f1e994addf3b6823c8030.tar.gz
bcm5719-llvm-cac3b9063320fdace01f1e994addf3b6823c8030.zip
Extend TargetPassConfig to allow running only a subset of the normal passes.
This is still a work in progress but I believe it is currently good enough to fix PR13122 "Need unit test driver for codegen IR passes". For example, you can run llc with -stop-after=loop-reduce to have it dump out the IR after running LSR. Serializing machine-level IR is not yet supported but we have some patches in progress for that. The plan is to serialize the IR to a YAML file, containing separate sections for the LLVM IR, machine-level IR, and whatever other info is needed. Chad suggested that we stash the stop-after pass in the YAML file and use that instead of the start-after option to figure out where to restart the compilation. I think that's a great idea, but since it's not implemented yet I put the -start-after option into this patch for testing purposes. llvm-svn: 159570
Diffstat (limited to 'llvm/test/CodeGen/Generic')
-rw-r--r--llvm/test/CodeGen/Generic/stop-after.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/stop-after.ll b/llvm/test/CodeGen/Generic/stop-after.ll
new file mode 100644
index 00000000000..557e097840a
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/stop-after.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP
+; RUN: llc < %s -debug-pass=Structure -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START
+
+; STOP: -loop-reduce -print-module
+; STOP: Loop Strength Reduction
+; STOP-NEXT: Machine Function Analysis
+
+; START: -machine-branch-prob -gc-lowering
+; START: FunctionPass Manager
+; START-NEXT: Lower Garbage Collection Instructions
OpenPOWER on IntegriCloud