]> granicus.if.org Git - clang/commit
PGO: Use the main file name to help distinguish functions with local linkage.
authorBob Wilson <bob.wilson@apple.com>
Thu, 6 Mar 2014 04:55:41 +0000 (04:55 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 6 Mar 2014 04:55:41 +0000 (04:55 +0000)
commite9773c0187bdd21fcdd4442025b8feb1ec03a345
treeeb685654523b5baeeff064a2645bc9eb41141afe
parent467db6f5992514a4db2c9980407f22c394a36c57
PGO: Use the main file name to help distinguish functions with local linkage.

In addition, for all functions, use the name from the llvm::Function to
identify the function in the profile data. Compute that "function name",
including the file name for local functions, once when assigning the PGO
counters and store it in the CodeGenPGO class.

Move the code to add InlineHint and Cold attributes out of StartFunction(),
because the "function name" string isn't available at that point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203075 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenPGO.cpp
lib/CodeGen/CodeGenPGO.h
test/CodeGen/Inputs/instr-profile.pgodata
test/CodeGen/instr-profile.c