[llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 15:19:50 PDT 2023


================
@@ -27,10 +27,12 @@ class FileSystem;
 struct PGOOptions {
   enum PGOAction { NoAction, IRInstr, IRUse, SampleUse };
   enum CSPGOAction { NoCSAction, CSIRInstr, CSIRUse };
+  enum class ColdFuncAttr { None, OptSize, MinSize, OptNone };
----------------
david-xl wrote:

Even though the optimization directive is implemented as a function attribute, it might be better to express the real intention is to decide 'optimization strategy', so perhaps ColdFuncOpt as name or ColdFuncOptAttr? ColdFuncAttr feels too broad.

https://github.com/llvm/llvm-project/pull/69030


More information about the llvm-commits mailing list