[PATCH] D34133: Cold attribute on function decls are lost. Fix the problem

2017-06-13 Thread David Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305325: Preserve cold attribute for function decls (authored by davidxl). Changed prior to commit: https://reviews.llvm.org/D34133?vs=102358&id=102409#toc Repository: rL LLVM https://reviews.llvm.or

[PATCH] D34133: Cold attribute on function decls are lost. Fix the problem

2017-06-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D34133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D34133: Cold attribute on function decls are lost. Fix the problem

2017-06-13 Thread David Li via Phabricator via cfe-commits
davidxl updated this revision to Diff 102358. davidxl added a comment. Herald added a subscriber: javed.absar. Add a test case. https://reviews.llvm.org/D34133 Files: lib/CodeGen/CGCall.cpp test/CodeGen/attributes.c Index: test/CodeGen/attributes.c

[PATCH] D34133: Cold attribute on function decls are lost. Fix the problem

2017-06-12 Thread David Li via Phabricator via cfe-commits
davidxl created this revision. Herald added a subscriber: sanjoy. LLVM static branch prediction depends on cold attribute to annotate branch probability. This is currently not possible for cold function decls as the information is dropped by FE. This patch attaches the attributes to the callsi