[PATCH] D101231: [RFC][InlineCost] Don't count the cost of truly exceptionally unlikely blocks (PR50099)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 24 11:31:13 PDT 2021
lebedev.ri added a comment.
In D101231#2714842 <https://reviews.llvm.org/D101231#2714842>, @davidxl wrote:
> Do we know why the destructor call is determined to be cold in the first place? Is there something can be done to improve static branch prediction?
I've posted full unoptimized repro IR at https://bugs.llvm.org/show_bug.cgi?id=50099
I believe that determination is correct. Said destructor call is only reachable through `landingpad`s,
which are obviously modelled as being quite cold.
> I believe this patch itself will likely help improve performance of programs with EH (without PGO) at the cost of increased code size in general.
That's the idea, yes. I see two alternatives: just bump the threshold (D101229 <https://reviews.llvm.org/D101229>),
or give bonus per each alloca (that is suspected as SROA'ble) that is passed as an argument into the callee function.
There is a problem with the latter approach - such cold callsites currently disable *all* bonuses
If there are other alternatives i'd love to hear about them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101231/new/
https://reviews.llvm.org/D101231
More information about the llvm-commits
mailing list