[PATCH] D94547: [lld-macho] Run ObjCContractPass during LTO
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 09:36:57 PST 2021
fhahn added inline comments.
================
Comment at: llvm/lib/LTO/LTOBackend.cpp:285
+ MPM.addPass(createModuleToFunctionPassAdaptor(ObjCARCContractPass()));
MPM.run(Mod, MAM);
----------------
int3 wrote:
> int3 wrote:
> > fhahn wrote:
> > > The reason this is not added to all backend pipelines is (presumably) that we do not want to run this unnecessarily on platforms that do not support ObjC. I think we should add a new flag to `lto::Config`, so users can request it. But as I mentioned below, I think it would be better to do it at the beginning of the codegen pass pipeline.
> > Isn't it technically possible for every platform to support ObjC, e.g. with GNUstep?
> (But I suppose it's a good idea not to make folks pay for edge cases that are in practice never used)
> Isn't it technically possible for every platform to support ObjC, e.g. with GNUstep?
I think all the matters in this case are frontends that emit LLVM IR I think. Not sure if Clang + ObjC is actually usable on non-Darwin platforms in practice.
In any case, I think it would be worth making it opt-in to start with. And if you are looking for enabling it unconditionally, it would probably be good as a separate patch and with a concrete motivation behind it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94547/new/
https://reviews.llvm.org/D94547
More information about the llvm-commits
mailing list