[PATCH] D104735: [OpenMP] Change remaining globalization from an analysis remark to missed
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 11:59:16 PDT 2021
jhuber6 created this revision.
jhuber6 added a reviewer: jdoerfert.
Herald added subscribers: ormris, guansong, hiraditya, yaxunl.
jhuber6 requested review of this revision.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a project: LLVM.
After landing the globalization optimizations, the precense of globalization on
the device that was not put in shared or stack memory is a failed optimization
with performance consequences so it should indicate a missed remark.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104735
Files:
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/globalization_remarks.ll
llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
Index: llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
===================================================================
--- llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
+++ llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
@@ -1,4 +1,4 @@
-; RUN: opt -O2 -pass-remarks-analysis=openmp-opt -enable-new-pm < %s 2>&1 | FileCheck %s --check-prefix=MODULE
+; RUN: opt -O2 -pass-remarks-missed=openmp-opt -enable-new-pm < %s 2>&1 | FileCheck %s --check-prefix=MODULE
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
@.str = private unnamed_addr constant [13 x i8] c"Alloc Shared\00", align 1
Index: llvm/test/Transforms/OpenMP/globalization_remarks.ll
===================================================================
--- llvm/test/Transforms/OpenMP/globalization_remarks.ll
+++ llvm/test/Transforms/OpenMP/globalization_remarks.ll
@@ -1,4 +1,4 @@
-; RUN: opt -passes=openmp-opt -pass-remarks-analysis=openmp-opt -disable-output < %s 2>&1 | FileCheck %s
+; RUN: opt -passes=openmp-opt -pass-remarks-missed=openmp-opt -disable-output < %s 2>&1 | FileCheck %s
; ModuleID = 'declare_target_codegen_globalization.cpp'
source_filename = "declare_target_codegen_globalization.cpp"
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
Index: llvm/lib/Transforms/IPO/OpenMPOpt.cpp
===================================================================
--- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -1145,13 +1145,13 @@
auto CheckGlobalization = [&](Use &U, Function &Decl) {
if (CallInst *CI = getCallIfRegularCall(U, &RFI)) {
- auto Remark = [&](OptimizationRemarkAnalysis ORA) {
- return ORA
+ auto Remark = [&](OptimizationRemarkMissed ORM) {
+ return ORM
<< "Found thread data sharing on the GPU. "
<< "Expect degraded performance due to data globalization.";
};
- emitRemark<OptimizationRemarkAnalysis>(CI, "OpenMPGlobalization",
- Remark);
+ emitRemark<OptimizationRemarkMissed>(CI, "OpenMPGlobalization",
+ Remark);
}
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104735.353741.patch
Type: text/x-patch
Size: 2237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210622/340b7b9d/attachment.bin>
More information about the llvm-commits
mailing list