[PATCH] D104890: [OpenMP] Prevent OpenMPOpt from internalizing uncalled functions
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 25 22:31:23 PDT 2021
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2655
if (Attributor::internalizeFunction(F, /* Force */ true))
InternalizedFuncs.insert(&F);
----------------
Up to this point it makes sense. (clang-tidy/format!)
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2661
+ if (!F.isDeclaration() && !InternalizedFuncs.contains(&F) && isCalled(F))
SCC.push_back(&F);
----------------
This change is what irritates me. We basically won't emit a remark anymore, nor will we try hard to optimize a function, but we should. The user now doesn't know that we kinda ignored "unsued" below even though it can be very much used from outside the translation unit. We still didn't run H2S on it or reported that globalization was left. Instead, we should report there is a external version of a function (regardless of the internalization) and we should report if the external version has leftover globalization, for example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104890/new/
https://reviews.llvm.org/D104890
More information about the llvm-commits
mailing list