This is an archive of the discontinued LLVM Phabricator instance.

Introduce LLVM_HOT
AbandonedPublic

Authored by xbolva00 on Sep 7 2018, 4:29 AM.

Details

Summary

From GCC docs (I found no docs for this attribute in LLVM docs; but LLVM understands hot/cold attribute too):
"The hot attribute on a function is used to inform the compiler that the function is a hot spot of the compiled program. The function is optimized more aggressively and on many targets it is placed into a special subsection of the text section so all hot functions appear close together, improving locality."

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes

We can mark Clang/LLVM hotspots with LLVM_HOT as follow-up.

Diff Detail

Repository
rL LLVM

Event Timeline

xbolva00 created this revision.Sep 7 2018, 4:29 AM
kristina added a comment.EditedSep 7 2018, 5:36 AM

I think that's best left to PGO, manually marking LLVM/Clang/etc. codebase with hotspots seems difficult and unreliable. I can't think of many places where this would actually be universally useful. If you can think of such cases then maybe this would be of some use but right now, I don't really see the point, sorry.

Also please add reviewers to your differentials when you make one, otherwise it's in the review queue with no assigned reviewers.

xbolva00 added a reviewer: rsmith.
xbolva00 removed a reviewer: rsmmr.Sep 8 2018, 12:17 AM
xbolva00 abandoned this revision.Sep 11 2018, 1:53 PM