[PATCH] D149342: [RISCV] Add test describing constant materialisation problem in loops
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 06:08:41 PDT 2023
luke created this revision.
luke added reviewers: ABataev, reames, RKSimon.
Herald added subscribers: jobnoorman, asb, pmatos, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, arichardson.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
As @alexey-bataev noticed, with the current cost model we account for
the cost of constant materialisation through the user's instruction
cost.
For straight line code this is usually fine, but inside a loop these
constants are usually hoisted out by LICM.
They should probably not be accounted for in these cases.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149342
Files:
llvm/test/Analysis/CostModel/RISCV/const-loop.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149342.517533.patch
Type: text/x-patch
Size: 8170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230427/04488097/attachment.bin>
More information about the llvm-commits
mailing list