summaryrefslogtreecommitdiffstats
path: root/polly/test
diff options
context:
space:
mode:
authorPhilip Pfaffe <philip.pfaffe@gmail.com>2018-04-17 07:59:46 +0000
committerPhilip Pfaffe <philip.pfaffe@gmail.com>2018-04-17 07:59:46 +0000
commit8da7d1d7ee67e1935c685511de64e3bbc031b083 (patch)
tree35808d16142e6bf3a106c1c98c4d378d80ad7d6f /polly/test
parent21458fdc551d08908f20ecd54f73f24e6c62323a (diff)
downloadbcm5719-llvm-8da7d1d7ee67e1935c685511de64e3bbc031b083.tar.gz
bcm5719-llvm-8da7d1d7ee67e1935c685511de64e3bbc031b083.zip
[NewPM] Update pass registration for the LLVM plugin interface
Summary: As of rL329273, LLVM has a mechanism to load new-pm plugins in opt. Use this API in Polly. Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser, Meinersbur Subscribers: lksbhm, bollu, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D45484 llvm-svn: 330181
Diffstat (limited to 'polly/test')
-rw-r--r--polly/test/Support/Plugins.ll13
-rw-r--r--polly/test/lit.site.cfg.in2
2 files changed, 15 insertions, 0 deletions
diff --git a/polly/test/Support/Plugins.ll b/polly/test/Support/Plugins.ll
new file mode 100644
index 00000000000..26f0a8e93df
--- /dev/null
+++ b/polly/test/Support/Plugins.ll
@@ -0,0 +1,13 @@
+; RUN: opt %loadPolly -passes='polly-prepare,scop(print<polly-ast>)' -S < %s \
+; RUN: | FileCheck %s
+
+; This testcase tests plugin registration. Check-lines below serve to verify
+; that the passes actually ran.
+
+; CHECK-LABEL: void @foo
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label %entry.split
+define void @foo() {
+entry:
+ ret void
+}
diff --git a/polly/test/lit.site.cfg.in b/polly/test/lit.site.cfg.in
index fda0865271e..ad8437478b1 100644
--- a/polly/test/lit.site.cfg.in
+++ b/polly/test/lit.site.cfg.in
@@ -46,6 +46,8 @@ if config.link_polly_into_tools == '' or \
config.link_polly_into_tools.lower() == 'link_polly_into_tools-notfound':
config.substitutions.append(('%loadPolly', '-load '
+ config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
+ + ' -load-pass-plugin '
+ + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
+ ' -polly-process-unprofitable '
+ ' -polly-remarks-minimal '
+ ' -polly-use-llvm-names '
OpenPOWER on IntegriCloud