[PATCH] D93342: Cleanup coro-inline.ll

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 17:44:36 PST 2020


lxfind updated this revision to Diff 312350.
lxfind added a comment.

Update test. A few things: 1) we don't need and shouldn't add --coro-early. Both functions are already marked with coroutine.presplit=1, ready for CoroSplit. coro-early will actually mess it up. 2) It turns out we need the meta data and dbg info since SampleProfileLoader depends on it. 3) We don't need all the attributes. Removed the unused ones.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93342/new/

https://reviews.llvm.org/D93342

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


Index: llvm/test/Transforms/Coroutines/coro-inline.ll
===================================================================
--- llvm/test/Transforms/Coroutines/coro-inline.ll
+++ 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 @@
   ret void
 }
 
-; CHECK:  call void @ff()
 ; Function Attrs: alwaysinline ssp uwtable
 define void @foo() #0 !dbg !8 {
 entry:
@@ -20,11 +19,14 @@
   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}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93342.312350.patch
Type: text/x-patch
Size: 2544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201217/43e2e8e9/attachment.bin>


More information about the llvm-commits mailing list