This patch adds the cold attribute to the keepAlive functions in the
RTL. This dummy function exists to keep certain RTL calls alive without
them being optimized out, but it is never called and can be declared
cold. This also helps some erroneous remarks being given on this
function because it has weak linkage and cannot be made internal.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I did a test locally and it resolved the issue, but it's not necessary because I already have a test that doesn't emit a remark if the cold attribute is present in OpenMPOpt's tests.
Comment Actions
It's covered by this line which basically tests internalization, which is what emits the remark this hides.
llvm/test/Transforms/OpenMP/single_threaded_execution.ll:; CHECK-NOT: [openmp-opt] Basic block @cold entry is executed by a single thread.