[PATCH] D123530: Optimize cross block gc.relocate lowering. NFC.
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 04:07:11 PDT 2022
dantrushin added a comment.
In D123530#3473773 <https://reviews.llvm.org/D123530#3473773>, @skatkov wrote:
> Well.. Do I understand correctly that the original problem comes from the fact that during lowering of statepoint if value is relocated through register then this register is exported unconditionally?
>
> So if during statepoint lowering we export the value only in case there is a relocate outside of current basic block, the extra copy is disappeared.
> gc.relocate should be handled in the same way - if there is a use outside of this basic block then export is needed otherwise no export at all. As I understand this corresponds to usual handling of instruction and no special handling of gc.relocate is required?
Yes.
> Do I miss anything?
Well, the keyword here is `simplicity`. To make it work that way some tricks are needed to avoid complicated implementation (it already is not that simple). Please have a look at alternative solution: https://reviews.llvm.org/D124444
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123530/new/
https://reviews.llvm.org/D123530
More information about the llvm-commits
mailing list