[llvm-branch-commits] [llvm] 4652718 - Cleanup coro-inline.ll

Xun Li via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 18 08:09:22 PST 2020


Author: Xun Li
Date: 2020-12-18T08:05:04-08:00
New Revision: 4652718ee38c519c6bb9470758d07430b0de02dd

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

LOG: Cleanup coro-inline.ll

Following up with the comments in D92706.
- Use -passes instead of -enable-new-pm
- CoroEarly should happen before AlwaysInliner, adjust it.
- Remove some unnecessary barriers (still kept one)
- Cleanup unnecessary debug info

Differential Revision: https://reviews.llvm.org/D93342

Added: 
    

Modified: 
    llvm/test/Transforms/Coroutines/coro-inline.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Coroutines/coro-inline.ll b/llvm/test/Transforms/Coroutines/coro-inline.ll
index fc5c1d0d6b1f..2cc679a0127d 100644
--- a/llvm/test/Transforms/Coroutines/coro-inline.ll
+++ b/llvm/test/Transforms/Coroutines/coro-inline.ll
@@ -1,7 +1,7 @@
-; RUN: opt < %s -always-inline -barrier -coro-early -barrier -coro-split -S | FileCheck %s
-; RUN: opt < %s -enable-new-pm  -always-inline -coro-early -coro-split  -S | FileCheck %s
-; RUN: opt < %s -sample-profile-file=%S/Inputs/sample.text.prof -pgo-kind=pgo-sample-use-pipeline -coro-early -barrier -sample-profile -barrier -coro-split  -disable-inlining=true -S | FileCheck %s
-; RUN: opt < %s -enable-new-pm -sample-profile-file=%S/Inputs/sample.text.prof -pgo-kind=pgo-sample-use-pipeline -coro-early -sample-profile -coro-split  -disable-inlining=true -S | FileCheck %s
+; RUN: opt < %s -always-inline -barrier -coro-split -S | FileCheck %s
+; RUN: opt < %s -passes='always-inline,cgscc(coro-split)' -S | FileCheck %s
+; RUN: opt < %s -sample-profile-file=%S/Inputs/sample.text.prof -pgo-kind=pgo-sample-use-pipeline -sample-profile -coro-split -disable-inlining=true -S | FileCheck %s
+; RUN: opt < %s -sample-profile-file=%S/Inputs/sample.text.prof -pgo-kind=pgo-sample-use-pipeline -passes='sample-profile,cgscc(coro-split)' -disable-inlining=true -S | FileCheck %s
 
 ; Function Attrs: alwaysinline ssp uwtable
 define void @ff() #0 !dbg !12 {
@@ -11,7 +11,6 @@ entry:
   ret void
 }
 
-; CHECK:  call void @ff()
 ; Function Attrs: alwaysinline ssp uwtable
 define void @foo() #0 !dbg !8 {
 entry:
@@ -20,11 +19,14 @@ entry:
   call void @ff(), !dbg !11
   ret void
 }
+; CHECK-LABEL: define void @foo()
+; CHECK:         call void @ff()
+
 
 declare token @llvm.coro.id(i32, i8* readnone, i8* nocapture readonly, i8*)
 declare i8* @llvm.coro.begin(token, i8* writeonly)
 
-attributes #0 = { alwaysinline ssp uwtable "coroutine.presplit"="1" "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-sample-profile" "use-soft-float"="false" }
+attributes #0 = { alwaysinline ssp uwtable "coroutine.presplit"="1" "use-sample-profile" }
 
 !llvm.dbg.cu = !{!0}
 !llvm.module.flags = !{!3, !4, !5, !6}


        


More information about the llvm-branch-commits mailing list