https://github.com/efriedma-quic commented:

I'm not sure I understand why we're changing the linkage of functions in an IR 
pass, instead of just setting the correct linkage in the first place.  Is there 
some form of linker involved?  If there is, should the linker fix the linkage?

By convention, passes which are required for correctness are part of the 
backend, so you can't accidentally skip running them.  (This isn't 100%, but we 
try when possible.)  If this needs to be target-independent, you can stick it 
in the target-independent TargetMachine code that computes the pass pipeline.  
Adding it in clang means every other frontend needs an equivalent change.

https://github.com/llvm/llvm-project/pull/134260
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to