[PATCH] D99675: RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 16 21:17:59 PDT 2021
pengfei added a comment.
In D99675#2695424 <https://reviews.llvm.org/D99675#2695424>, @kpn wrote:
> What changes are needed for a backend, and what happens if they aren't done?
As far as I understand it, backend does optimizations based on patterns of the known nodes and MIs. Inserting a new node/MI will block any optimizations across the fence. So it respects the semantics of the intrinsic without target special chenges.
I'm not sure if there's room for optimization cross the `arithmetic.fence`. If there is and no changes for it, backend may have some performance loss under these circumstances.
> Having something needed for correctness silently not work seems ... sub-optimal.
I think backend is conservative for optimizations when use the intrinsic. It won't have correctness issue silently, but performance loss might.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99675/new/
https://reviews.llvm.org/D99675
More information about the llvm-commits
mailing list