Home

Refactor PGO code in preparation for handling non-C/C++ code.

Press ? to show keyboard shortcuts.
Committed
bwilsonMar 5 2014, 8:55 PM
Parents
rL203072: PGO: don't emit counter increment if no counters have been allocated.
Branches
Unknown
Tags
Unknown
Subscribers
None
Projects
None
Description

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.

rL203073

cfe/trunk/lib/CodeGen/CodeGenFunction.cpp

Loading...

cfe/trunk/lib/CodeGen/CodeGenPGO.cpp

Loading...

cfe/trunk/lib/CodeGen/CodeGenPGO.h

Loading...

Add Comment