summaryrefslogtreecommitdiffstats
path: root/llvm/test/BugPoint/func-attrs.ll
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2018-12-19 03:42:19 +0000
committerBrian Gesiak <modocache@gmail.com>2018-12-19 03:42:19 +0000
commit274981eb83440be5359da5efc221416f9ea96e91 (patch)
treefc187d7cd2c957ccfd15ad1b6849f816e64ff767 /llvm/test/BugPoint/func-attrs.ll
parent0b832095d7c383e464e51db0a7c86f9e553926ca (diff)
downloadbcm5719-llvm-274981eb83440be5359da5efc221416f9ea96e91.tar.gz
bcm5719-llvm-274981eb83440be5359da5efc221416f9ea96e91.zip
[bugpoint][PR29027] Reduce function attributes
Summary: In addition to reducing the functions in an LLVM module, bugpoint now reduces the function attributes associated with each of the remaining functions. To test this, add a -bugpoint-crashfuncattr test pass, which crashes if a function in the module has a "bugpoint-crash" attribute. A test case demonstrates that the IR is reduced to just that one attribute. Reviewers: MatzeB, silvas, davide, reames Reviewed By: reames Subscribers: reames, llvm-commits Differential Revision: https://reviews.llvm.org/D55216 llvm-svn: 349601
Diffstat (limited to 'llvm/test/BugPoint/func-attrs.ll')
-rw-r--r--llvm/test/BugPoint/func-attrs.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/BugPoint/func-attrs.ll b/llvm/test/BugPoint/func-attrs.ll
new file mode 100644
index 00000000000..3941e73c217
--- /dev/null
+++ b/llvm/test/BugPoint/func-attrs.ll
@@ -0,0 +1,11 @@
+; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
+; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
+; REQUIRES: loadable_module
+
+; CHECK: f() #[[ATTRS:[0-9]+]]
+define void @f() #0 {
+ ret void
+}
+
+; CHECK: attributes #[[ATTRS]] = { "bugpoint-crash" }
+attributes #0 = { noinline "bugpoint-crash" "no-frame-pointer-elim-non-leaf" }
OpenPOWER on IntegriCloud