[PATCH] D105349: [llvm][Inline] Add interface to return cost-benefit stuff
Liqiang Tao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 17:02:31 PDT 2021
taolq added inline comments.
================
Comment at: llvm/include/llvm/Analysis/InlineCost.h:63
+
+ APInt Cost;
+ APInt Benefit;
----------------
mtrofin wrote:
> const, both here and below.
I have been trying to use const, but it still doesn't go well. It still needs an assignment operation.
In `ReplayInlineAdvisor::getAdviceImpl`
```
Optional<InlineCost> InlineRecommended = None;
if (Iter != InlineSitesFromRemarks.end()) {
InlineRecommended = llvm::InlineCost::getAlways("found in replay");
}
```
By the way, it is always passed by value, just like the Cost or Threshold.
So I think it is safe to use w/o const, right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105349/new/
https://reviews.llvm.org/D105349
More information about the llvm-commits
mailing list