================
@@ -6182,6 +6182,26 @@ void Clang::ConstructJob(Compilation &C, const JobAction 
&JA,
     }
   }
 
+  if (Arg *A =
+          Args.getLastArg(options::OPT_fpartition_static_data_sections,
+                          options::OPT_fno_partition_static_data_sections)) {
+    if (!A->getOption().matches(
+            options::OPT_fno_partition_static_data_sections)) {
+      // This codegen pass is only available on x86 and AArch64 ELF targets.
+      if ((Triple.isX86() || Triple.isAArch64()) && Triple.isOSBinFormatELF()) 
{
+        A->render(Args, CmdArgs);
+        // Turn on -memprof-annotate-static-data-prefix.
+        // When the memory profile (specified by --fmemory-profile-use) has
+        // static data access profiles, global variable hotness are inferrred
+        // from the profile. Otherwise this option is no-op.
----------------
mingmingl-llvm wrote:

Good question. The prior comment *global variable hotness are inferrred from 
the profile* is misleading; I updated the comment as a lightweight 
documentation on how data hotness is inferred when both profiles are present. 
PTAL.

https://github.com/llvm/llvm-project/pull/124991
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to