mehdi_amini added a comment.

In D81223#2087660 <https://reviews.llvm.org/D81223#2087660>, @rcorcs wrote:

> The way I see it, with size level for LTO, we could have a different LTO 
> optimization pipeline for size or runtime performance.


So this is the important point to settle before going on with any patch: this 
isn't how LTO is setup today.

>   For example, we could have a different tuning for inlining,  vectorization, 
> etc. 

All these are covered by the function attributes already.

> We could also use the size level to automatically enable optimizations such 
> as HotColdSplitting, MergeFunctions, etc., instead of relying on specific 
> enabling flags. We could also have other size-specific optimizations in the 
> future, such as MergeSimilarFunctions (https://reviews.llvm.org/D52896).

All these could be in the LTO pipeline and driven by the attribute as well.

> I believe that function attributes for size are useful for optimizing cold 
> functions that have been outlined by HotColdSplitting, for example.

The attribute is added by the frontend and can change per translation-unit / 
per function though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81223



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to