[PATCH] D123530: Optimize cross block gc.relocate lowering. NFC.

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 23:33:42 PDT 2022


skatkov added a comment.

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?

Do I miss anything?


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