[llvm] [SHT_LLVM_FUNC_MAP][ObjectYaml]Introduce function address map section and emit dynamic instruction count(ObjectYaml part) (PR #124332)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 00:32:52 PST 2025


================
@@ -1027,6 +1027,44 @@ struct PGOAnalysisMap {
   }
 };
 
+// Struct representing the FuncMap for one function.
+struct FuncMap {
+
+  // Bitfield of optional features to control the extra information
+  // emitted/encoded in the the section.
+  struct Features {
----------------
jh7370 wrote:

Do we really need this feature bitfield at all if there's only one feature and a version for the section? It feels redundant to me.

If the section needs extending e.g. to add more features, you'll presumably need to update the version number anyway, in which case you can add optional feature toggles as needed at that point.

Otherwise, this just feels like unnecessary complexity and wasted space in the encoding.

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


More information about the llvm-commits mailing list