[PATCH] D107839: [OpenMP] AlwaysInline __kmpc_parallel_51 to improve inlining hueristics
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 10 11:42:01 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG640091884f81: [OpenMP] AlwaysInline __kmpc_parallel_51 to improve inlining hueristics (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107839/new/
https://reviews.llvm.org/D107839
Files:
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/test/Transforms/OpenMP/parallel_level_fold.ll
Index: llvm/test/Transforms/OpenMP/parallel_level_fold.ll
===================================================================
--- llvm/test/Transforms/OpenMP/parallel_level_fold.ll
+++ llvm/test/Transforms/OpenMP/parallel_level_fold.ll
@@ -108,7 +108,7 @@
define internal void @__kmpc_parallel_51(%struct.ident_t*, i32, i32, i32, i32, i8*, i8*, i8**, i64) {
; CHECK-LABEL: define {{[^@]+}}@__kmpc_parallel_51
-; CHECK-SAME: (%struct.ident_t* noalias nocapture nofree readnone align 536870912 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 [[TMP3:%.*]], i32 [[TMP4:%.*]], i8* noalias nocapture nofree readnone align 536870912 [[TMP5:%.*]], i8* noalias nocapture nofree readnone align 536870912 [[TMP6:%.*]], i8** noalias nocapture nofree readnone align 536870912 [[TMP7:%.*]], i64 [[TMP8:%.*]]) {
+; CHECK-SAME: (%struct.ident_t* noalias nocapture nofree readnone align 536870912 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 [[TMP3:%.*]], i32 [[TMP4:%.*]], i8* noalias nocapture nofree readnone align 536870912 [[TMP5:%.*]], i8* noalias nocapture nofree readnone align 536870912 [[TMP6:%.*]], i8** noalias nocapture nofree readnone align 536870912 [[TMP7:%.*]], i64 [[TMP8:%.*]]) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: call void @parallel_helper()
; CHECK-NEXT: ret void
;
@@ -142,6 +142,8 @@
!3 = !{void ()* @spmd, !"kernel", i32 1}
!4 = !{void ()* @parallel, !"kernel", i32 1}
;.
+; CHECK: attributes #[[ATTR0]] = { alwaysinline }
+;.
; CHECK: [[META0:![0-9]+]] = !{i32 7, !"openmp", i32 50}
; CHECK: [[META1:![0-9]+]] = !{i32 7, !"openmp-device", i32 50}
; CHECK: [[META2:![0-9]+]] = !{void ()* @none_spmd, !"kernel", i32 1}
Index: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
===================================================================
--- llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
+++ llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
@@ -510,6 +510,11 @@
? AttributeSet(EnumAttr(NoCapture))
: AttributeSet(EnumAttr(NoCapture)))
+__OMP_ATTRS_SET(AlwaysInlineAttrs,
+ OptimisticAttributes
+ ? AttributeSet(EnumAttr(AlwaysInline))
+ : AttributeSet(EnumAttr(AlwaysInline)))
+
#if 0
__OMP_ATTRS_SET(InaccessibleOnlyAttrs,
OptimisticAttributes
@@ -897,6 +902,9 @@
__OMP_RTL_ATTRS(__kmpc_task_allow_completion_event, DefaultAttrs,
ReturnPtrAttrs, ParamAttrs(ReadOnlyPtrAttrs))
+__OMP_RTL_ATTRS(__kmpc_parallel_51, AlwaysInlineAttrs, AttributeSet(),
+ ParamAttrs())
+
#undef __OMP_RTL_ATTRS
#undef OMP_RTL_ATTRS
#undef AttributeSet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107839.365565.patch
Type: text/x-patch
Size: 2625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210810/0a6bfde5/attachment.bin>
More information about the llvm-commits
mailing list