[llvm] [RISCV] Select atomic_{load/store} to pseudos and expand them later (PR #67108)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 00:08:02 PDT 2023
wangpc-pp wrote:
> If we have Zalasr, wouldn't we disable the fence emission rather than trying to pattern match it?
> Yes, just don't expand them into memory access + fence... you don't need a pseudo for that
Yes, I agree. We can just do the instruction selection like AArch64, and the patterns will be like these in this PR expect that the selected instructions are `Zalasr` instructions instead of pseudos.
The existence of pseudos is to unify the implementation of `Zalasr` and fused atomic load/store, can this be a strong reason? And there is one more information that `MacroFusion` way may not be perfect because some fence+load/store are still seperated when postRA scheduler is enabled. After some rough investigation, this may be bacause there is no data dependency between fence and load/store and the dependency analysis is not so smart.
https://github.com/llvm/llvm-project/pull/67108
More information about the llvm-commits
mailing list