]> granicus.if.org Git - clang/commit
Add support for __attribute__((hot)) and __attribute__((cold)).
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 12 May 2012 21:10:52 +0000 (21:10 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 12 May 2012 21:10:52 +0000 (21:10 +0000)
commitee409a916e9b97ed6bc2f48d8d6aac6b8b773d7b
tree12e368032b763331926a01290bffec6c87598e30
parent2283b4664b004aae034b08f305ad2bc1dff9868e
Add support for __attribute__((hot)) and __attribute__((cold)).

Currently cold functions are marked with the "optsize" attribute in CodeGen
so they are always optimized for size.  The hot attribute is just ignored,
LLVM doesn't have a way to express hotness at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156723 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Attr.td
lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaDeclAttr.cpp
test/CodeGen/attr-coldhot.c [new file with mode: 0644]
test/Sema/attr-coldhot.c [new file with mode: 0644]