llvm.org GIT mirror llvm / 4a60b93
Rename 'loopsimplify' to 'loop-simplify'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125317 91177308-0d34-0410-b5e6-96231b3b80d8 Cameron Zwarich 8 years ago
21 changed file(s) with 24 addition(s) and 24 deletion(s). Raw diff Collapse all Expand all
3636 //
3737 //===----------------------------------------------------------------------===//
3838
39 #define DEBUG_TYPE "loopsimplify"
39 #define DEBUG_TYPE "loop-simplify"
4040 #include "llvm/Transforms/Scalar.h"
4141 #include "llvm/Constants.h"
4242 #include "llvm/Instructions.h"
107107 }
108108
109109 char LoopSimplify::ID = 0;
110 INITIALIZE_PASS_BEGIN(LoopSimplify, "loopsimplify",
110 INITIALIZE_PASS_BEGIN(LoopSimplify, "loop-simplify",
111111 "Canonicalize natural loops", true, false)
112112 INITIALIZE_PASS_DEPENDENCY(DominatorTree)
113113 INITIALIZE_PASS_DEPENDENCY(LoopInfo)
114 INITIALIZE_PASS_END(LoopSimplify, "loopsimplify",
114 INITIALIZE_PASS_END(LoopSimplify, "loop-simplify",
115115 "Canonicalize natural loops", true, false)
116116
117117 // Publically exposed interface to pass...
None ; RUN: opt < %s -loopsimplify -lcssa -S | \
0 ; RUN: opt < %s -loop-simplify -lcssa -S | \
11 ; RUN: grep {%%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry}
2 ; RUN: opt < %s -loopsimplify -lcssa -S | \
2 ; RUN: opt < %s -loop-simplify -lcssa -S | \
33 ; RUN: grep {%%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry}
44
55 %struct.SetJmpMapEntry = type { i8*, i32, %struct.SetJmpMapEntry* }
0 ; Exit blocks need to be updated for all nested loops...
11
2 ; RUN: opt < %s -loopsimplify
2 ; RUN: opt < %s -loop-simplify
33
44 define i32 @yyparse() {
55 bb0:
0 ; This testcase exposed a problem with the loop identification pass (LoopInfo).
11 ; Basically, it was incorrectly calculating the loop nesting information.
22 ;
3 ; RUN: opt < %s -loopsimplify
3 ; RUN: opt < %s -loop-simplify
44
55 define i32 @yylex() {
66 br label %loopentry.0
11 ; inserted for the "fail" loop, but the exit block of a loop is not updated
22 ; to be the preheader instead of the exit loop itself.
33
4 ; RUN: opt < %s -loopsimplify
4 ; RUN: opt < %s -loop-simplify
55 define i32 @re_match_2() {
66 br label %loopentry.1
77 loopentry.1: ; preds = %endif.82, %0
None ; RUN: opt < %s -loopsimplify -verify -licm -disable-output
0 ; RUN: opt < %s -loop-simplify -verify -licm -disable-output
11
22 define void @.subst_48() {
33 entry:
None ; RUN: opt < %s -loopsimplify -licm -disable-output
0 ; RUN: opt < %s -loop-simplify -licm -disable-output
11 define void @main() {
22 entry:
33 br i1 false, label %Out, label %loop
None ; RUN: opt < %s -loopsimplify -licm -disable-output
0 ; RUN: opt < %s -loop-simplify -licm -disable-output
11
22 ; This is PR306
33
None ; RUN: opt < %s -loopsimplify -disable-output
0 ; RUN: opt < %s -loop-simplify -disable-output
11
22 define void @test() {
33 loopentry.0:
None ; RUN: opt < %s -scalarrepl -loopsimplify -licm -disable-output -verify-dom-info -verify-loop-info
0 ; RUN: opt < %s -scalarrepl -loop-simplify -licm -disable-output -verify-dom-info -verify-loop-info
11
22 define void @inflate() {
33 entry:
None ; RUN: opt < %s -loopsimplify -disable-output
0 ; RUN: opt < %s -loop-simplify -disable-output
11 ; PR1752
22 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-s0:0:64-f80:32:32"
33 target triple = "i686-pc-mingw32"
None ; RUN: opt < %s -domfrontier -loopsimplify -domfrontier -verify-dom-info -analyze
0 ; RUN: opt < %s -domfrontier -loop-simplify -domfrontier -verify-dom-info -analyze
11
22
33 define void @a() nounwind {
None ; RUN: opt < %s -loopsimplify -S
0 ; RUN: opt < %s -loop-simplify -S
11 ; PR8702
22 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
33 target triple = "x86_64-unknown-freebsd9.0"
None ; RUN: opt < %s -loopsimplify
0 ; RUN: opt < %s -loop-simplify
11
22 ; This function should get a preheader inserted before BB3, that is jumped
33 ; to by BB1 & BB2
None ; RUN: opt < %s -loopsimplify
0 ; RUN: opt < %s -loop-simplify
11
22 define void @foo(i1 %C) {
33 br i1 %C, label %T, label %F
None ; RUN: opt -loopsimplify -S < %s | FileCheck %s
0 ; RUN: opt -loop-simplify -S < %s | FileCheck %s
11
22 ; LoopSimplify shouldn't split loop backedges that use indirectbr.
33
None ; RUN: opt < %s -loopsimplify -lcssa -verify-loop-info -verify-dom-info -S \
0 ; RUN: opt < %s -loop-simplify -lcssa -verify-loop-info -verify-dom-info -S \
11 ; RUN: | grep -F {indirectbr i8* %x, \[label %L0, label %L1\]} \
22 ; RUN: | count 6
33
None ; RUN: opt < %s -loopsimplify -loop-rotate -instcombine -indvars -S -verify-loop-info -verify-dom-info > %t
0 ; RUN: opt < %s -loop-simplify -loop-rotate -instcombine -indvars -S -verify-loop-info -verify-dom-info > %t
11 ; RUN: not grep sext %t
22 ; RUN: grep {phi i64} %t | count 1
33
0 ; Loop Simplify should turn phi nodes like X = phi [X, Y] into just Y, eliminating them.
1 ; RUN: opt < %s -loopsimplify -S | grep phi | count 6
1 ; RUN: opt < %s -loop-simplify -S | grep phi | count 6
22
33 @A = weak global [3000000 x i32] zeroinitializer ; <[3000000 x i32]*> [#uses=1]
44 @B = weak global [20000 x i32] zeroinitializer ; <[20000 x i32]*> [#uses=1]
None ; RUN: opt -S -loopsimplify -disable-output -verify-loop-info -verify-dom-info < %s
0 ; RUN: opt -S -loop-simplify -disable-output -verify-loop-info -verify-dom-info < %s
11 ; PR5235
22
33 ; When loopsimplify inserts a preheader for this loop, it should add the new
None ; RUN: opt < %s -loop-unroll -loopsimplify -disable-output
0 ; RUN: opt < %s -loop-unroll -loop-simplify -disable-output
11
22 define void @print_board() {
33 entry: