[llvm] r295598 - Re-add debugcounter.ll with Requires: Asserts so that it only triggers when asserts are on
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 14:41:14 PST 2017
This sounds very similar to the OptBisect machinery which enables/disables non-essential passes based on a "optimization fuel" / "counter" value. Should we rather extend OptBisect to allow to trigger arbitrary transformations or change the OptBisect implementation to use a DebugCounter?
- Matthias
> On Feb 18, 2017, at 10:45 PM, Daniel Berlin via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: dannyb
> Date: Sun Feb 19 00:45:02 2017
> New Revision: 295598
>
> URL: http://llvm.org/viewvc/llvm-project?rev=295598&view=rev
> Log:
> Re-add debugcounter.ll with Requires: Asserts so that it only triggers when asserts are on
>
> Added:
> llvm/trunk/test/Other/debugcounter.ll
>
> Added: llvm/trunk/test/Other/debugcounter.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/debugcounter.ll?rev=295598&view=auto
> ==============================================================================
> --- llvm/trunk/test/Other/debugcounter.ll (added)
> +++ llvm/trunk/test/Other/debugcounter.ll Sun Feb 19 00:45:02 2017
> @@ -0,0 +1,40 @@
> +; REQUIRES: Asserts
> +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
> +;; Test that, with debug counters on, we don't rename the first info, only the second
> +; RUN: opt -debug-counter=predicateinfo-rename-skip=1,predicateinfo-rename-count=1 -print-predicateinfo -analyze < %s 2>&1 | FileCheck %s
> +define fastcc void @barney() {
> +; CHECK-LABEL: @barney(
> +; CHECK-NEXT: bb:
> +; CHECK-NEXT: br label [[BB22:%.*]]
> +; CHECK: bb22:
> +; CHECK-NEXT: [[TMP23:%.*]] = icmp eq i32 undef, 2
> +; CHECK: [[TMP23_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[TMP23]])
> +; CHECK-NEXT: br i1 [[TMP23]], label [[BB29:%.*]], label [[BB35:%.*]]
> +; CHECK: bb29:
> +; CHECK: [[TMP23_0_1:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[TMP23_0]])
> +; CHECK-NEXT: br i1 [[TMP23]], label [[BB33:%.*]], label [[BB35]]
> +; CHECK: bb33:
> +; CHECK-NEXT: br i1 [[TMP23_0_1]], label [[BB35]], label [[BB35]]
> +; CHECK: bb35:
> +; CHECK-NEXT: unreachable
> +;
> +bb:
> + br label %bb22
> +bb22: ; preds = %bb21
> + %tmp23 = icmp eq i32 undef, 2
> + br i1 %tmp23, label %bb29, label %bb35
> +
> +
> +bb29: ; preds = %bb28
> +;; We will not rename this one (we will still generate a copy of a copy for the next one)
> + br i1 %tmp23, label %bb33, label %bb35
> +
> +
> +bb33: ; preds = %bb31
> +;; We will rename this one
> + br i1 %tmp23, label %bb35, label %bb35
> +
> +bb35: ; preds = %bb33, %bb29, %bb22
> + unreachable
> +}
> +
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list