[llvm] c51e989 - [NFC] Port all Coroutines tests to `-passes=` syntax

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 15:39:23 PST 2022


Author: Roman Lebedev
Date: 2022-12-08T02:38:41+03:00
New Revision: c51e98929e4f5f63aacf76b2f78c2bfb01f11f3f

URL: https://github.com/llvm/llvm-project/commit/c51e98929e4f5f63aacf76b2f78c2bfb01f11f3f
DIFF: https://github.com/llvm/llvm-project/commit/c51e98929e4f5f63aacf76b2f78c2bfb01f11f3f.diff

LOG: [NFC] Port all Coroutines tests to `-passes=` syntax

Added: 
    

Modified: 
    llvm/test/Transforms/Coroutines/coro-async-nomerge.ll
    llvm/test/Transforms/Coroutines/coro-elide-stat.ll
    llvm/test/Transforms/Coroutines/coro-elide.ll
    llvm/test/Transforms/Coroutines/coro-heap-elide.ll
    llvm/test/Transforms/Coroutines/smoketest.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Coroutines/coro-async-nomerge.ll b/llvm/test/Transforms/Coroutines/coro-async-nomerge.ll
index 3be0826b5818a..e018c2d511e78 100644
--- a/llvm/test/Transforms/Coroutines/coro-async-nomerge.ll
+++ b/llvm/test/Transforms/Coroutines/coro-async-nomerge.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -O2 -S
-; RUN: opt -S -hoist-common-insts -hoist-common-insts -simplifycfg < %s | FileCheck %s --check-prefixes=CHECK
+; RUN: opt -S -hoist-common-insts -hoist-common-insts -passes=simplifycfg < %s | FileCheck %s --check-prefixes=CHECK
 target datalayout = "p:64:64:64"
 %swift.async_func_pointer = type <{ i32, i32 }>
 %swift.context = type { %swift.context*, void (%swift.context*)* }
@@ -68,7 +68,7 @@ declare swifttailcc void @swift_task_switch(%swift.context*, i8*)
 
 define internal swifttailcc void @repo.1(i8* %0, %swift.context* %1) {
 entry:
-  musttail call swifttailcc void @swift_task_switch(%swift.context* swiftasync %1, i8* %0) 
+  musttail call swifttailcc void @swift_task_switch(%swift.context* swiftasync %1, i8* %0)
   ret void
 }
 

diff  --git a/llvm/test/Transforms/Coroutines/coro-elide-stat.ll b/llvm/test/Transforms/Coroutines/coro-elide-stat.ll
index b6e9bac442506..939a7b9b7a609 100644
--- a/llvm/test/Transforms/Coroutines/coro-elide-stat.ll
+++ b/llvm/test/Transforms/Coroutines/coro-elide-stat.ll
@@ -2,10 +2,10 @@
 ; REQUIRES: asserts
 ;
 ; RUN: opt < %s -S \
-; RUN:   -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' -stats 2>&1 \
+; RUN: -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' -stats 2>&1 \
 ; RUN:   | FileCheck %s
 ; RUN: opt < %s --disable-output \
-; RUN:   -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' \
+; RUN: -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' \
 ; RUN:   -coro-elide-info-output-file=%t && \
 ; RUN:  cat %t \
 ; RUN:   | FileCheck %s --check-prefix=FILE

diff  --git a/llvm/test/Transforms/Coroutines/coro-elide.ll b/llvm/test/Transforms/Coroutines/coro-elide.ll
index 7937b854a8d4f..35cf0efbef286 100644
--- a/llvm/test/Transforms/Coroutines/coro-elide.ll
+++ b/llvm/test/Transforms/Coroutines/coro-elide.ll
@@ -1,7 +1,7 @@
 ; Tests that the coro.destroy and coro.resume are devirtualized where possible,
 ; SCC pipeline restarts and inlines the direct calls.
 ; RUN: opt < %s -S \
-; RUN:   -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' \
+; RUN: -passes='cgscc(repeat<2>(inline,function(coro-elide,dce)))' \
 ; RUN:   | FileCheck %s
 
 declare void @print(i32) nounwind

diff  --git a/llvm/test/Transforms/Coroutines/coro-heap-elide.ll b/llvm/test/Transforms/Coroutines/coro-heap-elide.ll
index 2d8dcd646da34..d8fd52e254cc1 100644
--- a/llvm/test/Transforms/Coroutines/coro-heap-elide.ll
+++ b/llvm/test/Transforms/Coroutines/coro-heap-elide.ll
@@ -1,8 +1,8 @@
 ; Tests that the dynamic allocation and deallocation of the coroutine frame is
-; elided and any tail calls referencing the coroutine frame has the tail 
+; elided and any tail calls referencing the coroutine frame has the tail
 ; call attribute removed.
 ; RUN: opt < %s -S \
-; RUN:   -passes='cgscc(inline,function(coro-elide,instsimplify,simplifycfg))' \
+; RUN: -passes='cgscc(inline,function(coro-elide,instsimplify,simplifycfg))' \
 ; RUN:   -aa-pipeline='basic-aa' | FileCheck %s
 
 declare void @print(i32) nounwind
@@ -19,7 +19,7 @@ declare void @may_throw()
 declare i8* @CustomAlloc(i32)
 declare void @CustomFree(i8*)
 
- at f.resumers = internal constant [3 x void (%f.frame*)*] 
+ at f.resumers = internal constant [3 x void (%f.frame*)*]
   [void (%f.frame*)* @f.resume, void (%f.frame*)* @f.destroy, void (%f.frame*)* @f.cleanup]
 
 ; a coroutine start function
@@ -36,9 +36,9 @@ dyn.alloc:
 coro.begin:
   %phi = phi i8* [ null, %entry ], [ %alloc, %dyn.alloc ]
   %hdl = call i8* @llvm.coro.begin(token %id, i8* %phi)
-  invoke void @may_throw() 
+  invoke void @may_throw()
     to label %ret unwind label %ehcleanup
-ret:          
+ret:
   ret i8* %hdl
 
 ehcleanup:
@@ -338,7 +338,7 @@ entry:
 ; Tail call should remain tail calls
 ; CHECK: tail call void @bar(
   tail call void @bar(i8* %hdl)
-; CHECK: tail call void @bar(  
+; CHECK: tail call void @bar(
   tail call void @bar(i8* null)
 
 ; CHECK-NEXT: call fastcc void bitcast (void (%f.frame*)* @f.resume to void (i8*)*)(i8*

diff  --git a/llvm/test/Transforms/Coroutines/smoketest.ll b/llvm/test/Transforms/Coroutines/smoketest.ll
index 4bb039d6f9fb9..49894d81cb1c1 100644
--- a/llvm/test/Transforms/Coroutines/smoketest.ll
+++ b/llvm/test/Transforms/Coroutines/smoketest.ll
@@ -10,7 +10,7 @@
 ; RUN: opt < %s -disable-output -passes='default<O3>' \
 ; RUN:     -debug-pass-manager 2>&1 | FileCheck %s --check-prefixes=CHECK-ALL,CHECK-OPT
 ; RUN: opt < %s -disable-output -debug-pass-manager \
-; RUN:     -passes='module(coro-early),function(coro-elide),cgscc(coro-split),module(coro-cleanup)' 2>&1 \
+; RUN: -passes='module(coro-early),function(coro-elide),cgscc(coro-split),module(coro-cleanup)' 2>&1 \
 ; RUN:     | FileCheck %s --check-prefixes=CHECK-ALL,CHECK-OPT
 
 ; note that we run CoroElidePass before CoroSplitPass. This is because CoroElidePass is part of


        


More information about the llvm-commits mailing list