[PATCH] D60740: [InlineCost] cleanup calculations of Cost and Threshold
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 20:32:54 PDT 2019
yrouban added a comment.
I would split this change into NFC and last-call-to-static.
================
Comment at: lib/Analysis/InlineCost.cpp:295
+ void addCost(int64_t Inc, int64_t UpperBound = INT_MAX) {
+ Cost = std::min(UpperBound, Cost + Inc);
----------------
Cost is //int//, why do we use //int64_t//? May be //UpperBound// should be //int//?
================
Comment at: lib/Analysis/InlineCost.cpp:316
+ Params.ComputeFullInlineCost || ORE),
IsCallerRecursive(false), IsRecursiveCall(false),
ExposesReturnsTwice(false), HasDynamicAlloca(false),
----------------
may be all const initialization can be moved to field declarations like you do with //Cost//, //VectorBonus//, ...
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60740/new/
https://reviews.llvm.org/D60740
More information about the llvm-commits
mailing list