[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

Snehasish Kumar via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 27 13:39:24 PST 2023


================
@@ -1364,12 +1364,22 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
   TI.getTargetDefines(LangOpts, Builder);
 }
 
+static void InitializePGOProfileMacros(const CodeGenOptions &CodeGenOpts,
----------------
snehasish wrote:

There are IR PGO users (e.g. Rust) which don't use the clang frontend. Do we need this macro based checks? 

I would prefer to just limit this patch to exposing the necessary interfaces. End-users can manage their own macros if they want to exclude the profile APIs from the source. 

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


More information about the cfe-commits mailing list