[PATCH] D84614: [Attributor][WIP] Cost interface for function internalization
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 19:15:41 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:195
+ static InternalizeCost &getAlways(Function &F) {
+ return *new InternalizeCost(F, AlwaysInternalizeCost, 0);
+ }
----------------
There is no need for dynamic allocation here. Let's just return a value, it's only 16 bytes on most systems so easy to copy and with the advantage that we don't leak memory ;)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84614/new/
https://reviews.llvm.org/D84614
More information about the llvm-commits
mailing list