diff options
| author | Vedant Kumar <vsk@apple.com> | 2016-04-22 06:51:37 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2016-04-22 06:51:37 +0000 |
| commit | 6013f45f920f8b208e945007697a5601f6f956fc (patch) | |
| tree | fe324d8bb253f369bf9294cbc5c0b13e6ba99570 /llvm/test | |
| parent | ae720dbbb61f8dcfe8bf44ec01160183c07cf40e (diff) | |
| download | bcm5719-llvm-6013f45f920f8b208e945007697a5601f6f956fc.tar.gz bcm5719-llvm-6013f45f920f8b208e945007697a5601f6f956fc.zip | |
Revert "Initial implementation of optimization bisect support."
This reverts commit r267022, due to an ASan failure:
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/1549
llvm-svn: 267115
Diffstat (limited to 'llvm/test')
| -rwxr-xr-x | llvm/test/Other/opt-bisect-helper.py | 39 | ||||
| -rw-r--r-- | llvm/test/Other/opt-bisect-legacy-pass-manager.ll | 148 | ||||
| -rw-r--r-- | llvm/test/Other/opt-bisect-new-pass-manager.ll | 109 |
3 files changed, 0 insertions, 296 deletions
diff --git a/llvm/test/Other/opt-bisect-helper.py b/llvm/test/Other/opt-bisect-helper.py deleted file mode 100755 index d75950f11d8..00000000000 --- a/llvm/test/Other/opt-bisect-helper.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import argparse -import subprocess - -parser = argparse.ArgumentParser() - -parser.add_argument('--start', type=int, default=0) -parser.add_argument('--end', type=int, default=(1 << 32)) -parser.add_argument('--optcmd', default=("opt")) -parser.add_argument('--filecheckcmd', default=("FileCheck")) -parser.add_argument('--prefix', default=("CHECK-BISECT")) -parser.add_argument('--test', default=("")) - -args = parser.parse_args() - -start = args.start -end = args.end - -opt_command = [args.optcmd, "-O2", "-opt-bisect-limit=%(count)s", "-S", args.test] -check_command = [args.filecheckcmd, args.test, "--check-prefix=%s" % args.prefix] -last = None -while start != end and start != end-1: - count = int(round(start + (end - start)/2)) - cmd = [x % {'count':count} for x in opt_command] - print("opt: " + str(cmd)) - opt_result = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - filecheck_result = subprocess.Popen(check_command, stdin=opt_result.stdout) - opt_result.stdout.close() - opt_result.stderr.close() - filecheck_result.wait() - if filecheck_result.returncode == 0: - start = count - else: - end = count - -print("Last good count: %d" % start) diff --git a/llvm/test/Other/opt-bisect-legacy-pass-manager.ll b/llvm/test/Other/opt-bisect-legacy-pass-manager.ll deleted file mode 100644 index 8c39187fcf0..00000000000 --- a/llvm/test/Other/opt-bisect-legacy-pass-manager.ll +++ /dev/null @@ -1,148 +0,0 @@ -; This file verifies the behavior of the OptBisect class, which is used to -; diagnose optimization related failures. The tests check various -; invocations that result in different sets of optimization passes that -; are run in different ways. -; -; This set of tests exercises the legacy pass manager interface to the OptBisect -; class. Because the exact set of optimizations that will be run may -; change over time, these tests are written in a more general manner than the -; corresponding tests for the new pass manager. -; -; Don't use NEXT checks or hard-code pass numbering so that this won't fail if -; new passes are inserted. - - -; Verify that the file can be compiled to an object file at -O3 with all -; skippable passes skipped. - -; RUN: opt -O3 -opt-bisect-limit=0 < %s | llc -O3 -opt-bisect-limit=0 - - -; Verify that no skippable passes are run with -opt-bisect-limit=0. - -; RUN: opt -disable-output -disable-verify -O3 -opt-bisect-limit=0 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-SKIP-ALL -; CHECK-SKIP-ALL: BISECT: NOT running pass ({{[0-9]+}}) -; CHECK-SKIP-ALL-NOT: BISECT: running pass ({{[0-9]+}}) - - -; Verify that we can use the opt-bisect-helper.py script (derived from -; utils/bisect) to locate the optimization that inlines the call to -; f2() in f3(). - -; RUN: %python %S/opt-bisect-helper.py --start=0 --end=256 --optcmd=opt \ -; RUN: --filecheckcmd=FileCheck --test=%s \ -; RUN: --prefix=CHECK-BISECT-INLINE-HELPER \ -; RUN: | FileCheck %s --check-prefix=CHECK-BISECT-INLINE-RESULT -; The helper script uses this to find the optimization that inlines the call. -; CHECK-BISECT-INLINE-HELPER: call i32 @f2() -; These checks verifies that the optimization was found. -; CHECK-BISECT-INLINE-RESULT-NOT: Last good count: 0 -; CHECK-BISECT-INLINE-RESULT: Last good count: {{[0-9]+}} - - -; Test a module pass. - -; RUN: opt -disable-output -disable-verify -deadargelim -opt-bisect-limit=-1 %s \ -; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEADARG -; CHECK-DEADARG: BISECT: running pass ({{[0-9]+}}) Dead Argument Elimination on module - -; RUN: opt -disable-output -disable-verify -deadargelim -opt-bisect-limit=0 %s \ -; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-DEADARG -; CHECK-NOT-DEADARG: BISECT: NOT running pass ({{[0-9]+}}) Dead Argument Elimination on module - - -; Test an SCC pass. - -; RUN: opt -disable-output -disable-verify -inline -opt-bisect-limit=-1 %s \ -; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-INLINE -; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>) -; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (g) -; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f1) -; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f2) -; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f3) -; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>) - -; RUN: opt -disable-output -disable-verify -inline -opt-bisect-limit=0 %s \ -; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-INLINE -; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>) -; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (g) -; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f1) -; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f2) -; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f3) -; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>) - - -; Test a function pass. - -; RUN: opt -disable-output -disable-verify -early-cse -opt-bisect-limit=-1 \ -; RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-EARLY-CSE -; CHECK-EARLY-CSE: BISECT: running pass ({{[0-9]+}}) Early CSE on function (f1) -; CHECK-EARLY-CSE: BISECT: running pass ({{[0-9]+}}) Early CSE on function (f2) -; CHECK-EARLY-CSE: BISECT: running pass ({{[0-9]+}}) Early CSE on function (f3) - -; RUN: opt -disable-output -disable-verify -early-cse -opt-bisect-limit=0 %s \ -; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-EARLY-CSE -; CHECK-NOT-EARLY-CSE: BISECT: NOT running pass ({{[0-9]+}}) Early CSE on function (f1) -; CHECK-NOT-EARLY-CSE: BISECT: NOT running pass ({{[0-9]+}}) Early CSE on function (f2) -; CHECK-NOT-EARLY-CSE: BISECT: NOT running pass ({{[0-9]+}}) Early CSE on function (f3) - - -; Test a loop pass. - -; RUN: opt -disable-output -disable-verify -loop-reduce -opt-bisect-limit=-1 \ -; RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-LOOP-REDUCE -; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop - -; RUN: opt -disable-output -disable-verify -loop-reduce -opt-bisect-limit=0 \ -; RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-LOOP-REDUCE -; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop -; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop - - -declare i32 @g() - -define void @f1() { -entry: - br label %loop.0 -loop.0: - br i1 undef, label %loop.0.0, label %loop.1 -loop.0.0: - br i1 undef, label %loop.0.0, label %loop.0.1 -loop.0.1: - br i1 undef, label %loop.0.1, label %loop.0 -loop.1: - br i1 undef, label %loop.1, label %loop.1.bb1 -loop.1.bb1: - br i1 undef, label %loop.1, label %loop.1.bb2 -loop.1.bb2: - br i1 undef, label %end, label %loop.1.0 -loop.1.0: - br i1 undef, label %loop.1.0, label %loop.1 -end: - ret void -} - -define i32 @f2() { -entry: - ret i32 0 -} - -define i32 @f3() { -entry: - %temp = call i32 @g() - %icmp = icmp ugt i32 %temp, 2 - br i1 %icmp, label %bb.true, label %bb.false -bb.true: - %temp2 = call i32 @f2() - ret i32 %temp2 -bb.false: - ret i32 0 -} diff --git a/llvm/test/Other/opt-bisect-new-pass-manager.ll b/llvm/test/Other/opt-bisect-new-pass-manager.ll deleted file mode 100644 index 3927422d6ed..00000000000 --- a/llvm/test/Other/opt-bisect-new-pass-manager.ll +++ /dev/null @@ -1,109 +0,0 @@ -; This file verifies the behavior of the OptBisect class, which is used to -; diagnose optimization related failures. The tests check various -; invocations that result in different sets of optimization passes that -; are run in different ways. -; -; Because the exact set of optimizations that will be run is expected to -; change over time, the checks for disabling passes are written in a -; conservative way that avoids assumptions about which specific passes -; will be disabled. - -; RUN: opt -disable-output -disable-verify \ -; RUN: -passes=inferattrs -opt-bisect-limit=-1 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS -; CHECK-MODULE-PASS: BISECT: running pass (1) InferFunctionAttrsPass on module - -; RUN: opt -disable-output -disable-verify \ -; RUN: -passes=inferattrs -opt-bisect-limit=0 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-LIMIT-MODULE-PASS -; CHECK-LIMIT-MODULE-PASS: BISECT: NOT running pass (1) InferFunctionAttrsPass on module - -; RUN: opt -disable-output -disable-verify \ -; RUN: -passes=early-cse -opt-bisect-limit=-1 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS -; CHECK-FUNCTION-PASS: BISECT: running pass (1) EarlyCSEPass on function (f1) -; CHECK-FUNCTION-PASS: BISECT: running pass (2) EarlyCSEPass on function (f2) -; CHECK-FUNCTION-PASS: BISECT: running pass (3) EarlyCSEPass on function (f3) - -; RUN: opt -disable-output -disable-verify \ -; RUN: -passes=early-cse -opt-bisect-limit=2 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-LIMIT-FUNCTION-PASS -; CHECK-LIMIT-FUNCTION-PASS: BISECT: running pass (1) EarlyCSEPass on function (f1) -; CHECK-LIMIT-FUNCTION-PASS: BISECT: running pass (2) EarlyCSEPass on function (f2) -; CHECK-LIMIT-FUNCTION-PASS: BISECT: NOT running pass (3) EarlyCSEPass on function (f3) - -; RUN: opt -disable-output -disable-verify \ -; RUN: -passes=function-attrs -opt-bisect-limit=-1 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS -; CHECK-CGSCC-PASS: BISECT: running pass (1) PostOrderFunctionAttrsPass on SCC (f2) -; CHECK-CGSCC-PASS: BISECT: running pass (2) PostOrderFunctionAttrsPass on SCC (f3) -; CHECK-CGSCC-PASS: BISECT: running pass (3) PostOrderFunctionAttrsPass on SCC (f1) - -; RUN: opt -disable-output -disable-verify \ -; RUN: -passes=function-attrs -opt-bisect-limit=2 %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-LIMIT-CGSCC-PASS -; CHECK-LIMIT-CGSCC-PASS: BISECT: running pass (1) PostOrderFunctionAttrsPass on SCC (f2) -; CHECK-LIMIT-CGSCC-PASS: BISECT: running pass (2) PostOrderFunctionAttrsPass on SCC (f3) -; CHECK-LIMIT-CGSCC-PASS: BISECT: NOT running pass (3) PostOrderFunctionAttrsPass on SCC (f1) - -; RUN: opt -disable-output -disable-verify -opt-bisect-limit=-1 \ -; RUN: -passes='inferattrs,cgscc(function-attrs,function(early-cse))' %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-MULTI-PASS -; CHECK-MULTI-PASS: BISECT: running pass (1) InferFunctionAttrsPass on module -; CHECK-MULTI-PASS: BISECT: running pass (2) PostOrderFunctionAttrsPass on SCC (f2) -; CHECK-MULTI-PASS: BISECT: running pass (3) EarlyCSEPass on function (f2) -; CHECK-MULTI-PASS: BISECT: running pass (4) PostOrderFunctionAttrsPass on SCC (f3) -; CHECK-MULTI-PASS: BISECT: running pass (5) EarlyCSEPass on function (f3) -; CHECK-MULTI-PASS: BISECT: running pass (6) PostOrderFunctionAttrsPass on SCC (f1) -; CHECK-MULTI-PASS: BISECT: running pass (7) EarlyCSEPass on function (f1) - -; RUN: opt -disable-output -disable-verify -opt-bisect-limit=5 \ -; RUN: -passes='inferattrs,cgscc(function-attrs,function(early-cse))' %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-LIMIT-MULTI-PASS -; CHECK-LIMIT-MULTI-PASS: BISECT: running pass (1) InferFunctionAttrsPass on module -; CHECK-LIMIT-MULTI-PASS: BISECT: running pass (2) PostOrderFunctionAttrsPass on SCC (f2) -; CHECK-LIMIT-MULTI-PASS: BISECT: running pass (3) EarlyCSEPass on function (f2) -; CHECK-LIMIT-MULTI-PASS: BISECT: running pass (4) PostOrderFunctionAttrsPass on SCC (f3) -; CHECK-LIMIT-MULTI-PASS: BISECT: running pass (5) EarlyCSEPass on function (f3) -; CHECK-LIMIT-MULTI-PASS: BISECT: NOT running pass (6) PostOrderFunctionAttrsPass on SCC (f1) -; CHECK-LIMIT-MULTI-PASS: BISECT: NOT running pass (7) EarlyCSEPass on function (f1) - -declare i32 @g() - -define void @f1() { -entry: - br label %loop.0 -loop.0: - br i1 undef, label %loop.0.0, label %loop.1 -loop.0.0: - br i1 undef, label %loop.0.0, label %loop.0.1 -loop.0.1: - br i1 undef, label %loop.0.1, label %loop.0 -loop.1: - br i1 undef, label %loop.1, label %loop.1.bb1 -loop.1.bb1: - br i1 undef, label %loop.1, label %loop.1.bb2 -loop.1.bb2: - br i1 undef, label %end, label %loop.1.0 -loop.1.0: - br i1 undef, label %loop.1.0, label %loop.1 -end: - ret void -} - -define i32 @f2() { -entry: - ret i32 0 -} - -define i32 @f3() { -entry: - %temp = call i32 @g() - %icmp = icmp ugt i32 %temp, 2 - br i1 %icmp, label %bb.true, label %bb.false -bb.true: - %temp2 = call i32 @f2() - ret i32 %temp2 -bb.false: - ret i32 0 -} |

