This is an archive of the discontinued LLVM Phabricator instance.

[PGO] generate different version for FE instrumentation and IR level instrumentation profiles
AbandonedPublic

Authored by xur on Dec 15 2015, 2:45 PM.

Details

Summary

This patch checks __llvm_profile_ir_level and sets the right version in the generated profiles.
This is related to http://reviews.llvm.org/D15540.

Diff Detail

Event Timeline

xur updated this revision to Diff 42916.Dec 15 2015, 2:45 PM
xur retitled this revision from to [PGO] generate different version for FE instrumentation and IR level instrumentation profiles.
xur updated this object.
xur added reviewers: davidxl, silvas, bogner.
xur added a subscriber: llvm-commits.
davidxl added inline comments.Dec 15 2015, 3:57 PM
lib/profile/InstrProfiling.c
22

use macro LLVM_ATTRIBUTE_WEAK

xur added inline comments.Dec 17 2015, 2:03 PM
lib/profile/InstrProfiling.c
22

Macro LLVM_ATTRIBUTE_WEAK is defined in llvm/Support/Compiler.h. It seems to me we should include that header here (also that is a c++ header).
There are also other direct uses of attribute((weak)) in InstrProfilingFile.c.

davidxl edited edge metadata.Dec 17 2015, 2:08 PM
davidxl added a subscriber: davidxl.

Please rebase your patch. The portability macro to be used is
COMPILER_RT_WEAK.

David

xur updated this revision to Diff 43190.Dec 17 2015, 3:12 PM
xur edited edge metadata.

Integrated David's comments.

xur abandoned this revision.Jan 21 2016, 12:56 PM

We now generate the profile version directly from the PGO instrumentation (based on Justin's suggestion).
This change is now obsolete.