mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-23 12:40:38 +00:00
da5e92486c
This creates the new-style LoopPassManager and wires it up with dummy and print passes. This version doesn't support modifying the loop nest at all. It will be far easier to discuss and evaluate the approaches to that with this in place so that the boilerplate is out of the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261831 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
931 B
LLVM
36 lines
931 B
LLVM
; RUN: opt -disable-output -debug-pass-manager \
|
|
; RUN: -passes='no-op-loop' %s 2>&1 \
|
|
; RUN: | FileCheck %s
|
|
|
|
; @f()
|
|
; / \
|
|
; loop.0 loop.1
|
|
; / \ \
|
|
; loop.0.0 loop.0.1 loop.1.0
|
|
;
|
|
; CHECK: Running pass: NoOpLoopPass on loop.1.0
|
|
; CHECK: Running pass: NoOpLoopPass on loop.1
|
|
; CHECK: Running pass: NoOpLoopPass on loop.0.0
|
|
; CHECK: Running pass: NoOpLoopPass on loop.0.1
|
|
; CHECK: Running pass: NoOpLoopPass on loop.0
|
|
define void @f() {
|
|
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
|
|
}
|