diff options
author | Diego Trevino Ferrer <diegof30@gmail.com> | 2019-08-07 00:00:52 +0000 |
---|---|---|
committer | Diego Trevino Ferrer <diegof30@gmail.com> | 2019-08-07 00:00:52 +0000 |
commit | 099e5c5bba23e06a7840d79ffcf66e9cd98cd52c (patch) | |
tree | c9bf3c05ed080c134d725ba378a071451c737ea9 /llvm/test/Reduce/remove-funcs.ll | |
parent | feef101ac2f6fe4f75670613dee7ab8408d93b2b (diff) | |
download | bcm5719-llvm-099e5c5bba23e06a7840d79ffcf66e9cd98cd52c.tar.gz bcm5719-llvm-099e5c5bba23e06a7840d79ffcf66e9cd98cd52c.zip |
Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.
Reviewers: alexshap, chandlerc
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63672
> llvm-svn: 368071
llvm-svn: 368112
Diffstat (limited to 'llvm/test/Reduce/remove-funcs.ll')
-rw-r--r-- | llvm/test/Reduce/remove-funcs.ll | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/test/Reduce/remove-funcs.ll b/llvm/test/Reduce/remove-funcs.ll new file mode 100644 index 00000000000..6125f7f1180 --- /dev/null +++ b/llvm/test/Reduce/remove-funcs.ll @@ -0,0 +1,34 @@ +; Test that llvm-reduce can remove uninteresting functions as well as +; their InstCalls. +; +; RUN: llvm-reduce --test %p/Inputs/remove-funcs.sh %s +; RUN: cat reduced.ll | FileCheck %s +; REQUIRES: plugins, shell + +; CHECK-NOT: uninteresting1() +define i32 @uninteresting1() { +entry: + ret i32 0 +} + +; CHECK: interesting() +define i32 @interesting() { +entry: + ; CHECK: call i32 @interesting() + %call2 = call i32 @interesting() + ; CHECK-NOT: call i32 @uninteresting1() + %call = call i32 @uninteresting1() + ret i32 5 +} + +; CHECK-NOT: uninteresting2() +define i32 @uninteresting2() { +entry: + ret i32 0 +} + +; CHECK-NOT: uninteresting3() +define i32 @uninteresting3() { +entry: + ret i32 10 +} |