]> granicus.if.org Git - clang/commit
Refactor PGO code in preparation for handling non-C/C++ code.
authorBob Wilson <bob.wilson@apple.com>
Thu, 6 Mar 2014 04:55:35 +0000 (04:55 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 6 Mar 2014 04:55:35 +0000 (04:55 +0000)
commit83717113c57b1f9f7be295b007d60b44ac13f404
treef782a951a92ac08de6b27d80d6ebaf07da050850
parent4b1cb4e3c05e23d84a02c2120d1a5467e6d3e0eb
Refactor PGO code in preparation for handling non-C/C++ code.

Move the PGO.assignRegionCounters() call out of StartFunction, because that
function is called from many places where it does not make sense to do PGO
instrumentation (e.g., compiler-generated helper functions). Change several
functions to take a StringRef argument for the unique name associated with
a function, so that the name can be set differently for things like Objective-C
methods and block literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203073 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenPGO.cpp
lib/CodeGen/CodeGenPGO.h