[PATCH] D130933: Add docs for function attributes hot/cold
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 2 13:38:40 PDT 2022
aaron.ballman added a comment.
Thank you for adding the docs! I'm not well-versed enough in hot/cold behavior and PGO to comment on the documentation accuracy, so I'm hopeful someone can sign off on that bit.
================
Comment at: clang/include/clang/Basic/Attr.td:1077
- let Documentation = [Undocumented];
- let SimpleHandler = 1;
}
----------------
I think the change on this line was unintentional.
================
Comment at: clang/include/clang/Basic/Attr.td:1523
- let Documentation = [Undocumented];
- let SimpleHandler = 1;
}
----------------
I think the change on this line was unintentional.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:5248
+``__attribute__((hot))`` marks a function as hot, as a manual alternative to PGO hotness data.
+In case PGO data is available too user annotated ``__attribute__((hot))`` overwrites profile count based hotness (unlike ``__attribute__((cold))``).
+}];
----------------
================
Comment at: clang/include/clang/Basic/AttrDocs.td:5255-5256
+ let Content = [{
+``__attribute__((cold))`` marks a function as cold, as a manual alternative to PGO hotness data.
+In case PGO data is available too profile count based hotness overwrites user annotated ``__attribute__((cold))`` (unlike ``__attribute__((hot))``).
+}];
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130933/new/
https://reviews.llvm.org/D130933
More information about the cfe-commits
mailing list