[PATCH] D97896: [Clang][RISCV][RFC] Add byval parameter attribute?
Alex Bradbury via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 4 05:06:42 PST 2021
asb added a comment.
I think I may have had the impression from some previous discussions that byval may have limited positive impact, and that letting Clang add the copies to the IR might in some cases help optimisations (that may not be written to reason about byval). You've got a good example of a case where the lack of byval causes weaker optimisation though.
Just running this across the GCC torture suite on rv32imafdc_{ilp32,ilp32d}, rv64imafdc_{lp64, lp64d} and {O0,O1 <https://reviews.llvm.org/owners/package/1/>,O2 <https://reviews.llvm.org/owners/package/2/>,O3 <https://reviews.llvm.org/owners/package/3/>,Os}, I see `22394 insertions(+), 17462 deletions(-)` in the generated .s. Obviously not a representative benchmark, but it does seem there are potential regressions to consider.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97896/new/
https://reviews.llvm.org/D97896
More information about the cfe-commits
mailing list