[PATCH] D100559: [GC][NFC] Make getGCStrategy by name available in IR

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 13:54:32 PDT 2021


reames added a comment.

I don't think the interface on this is quite right.  You have the new utility exposing a new instance of the GCStrategy object.  I would expect each GCStrategy to be a singleton.  (i.e. having two "statepoint-example" GCStrategy instances would seem surprising.)

I think you need to move the ownership of GCStrategy objects from GCMetadata to LLVMContext, and then cache the lookup.  You want to leave GCStrategyList in place, but probably make it non-owning.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100559/new/

https://reviews.llvm.org/D100559



More information about the llvm-commits mailing list