[PGO] Read VP raw data without depending on the Value field
authorXinliang David Li <davidxl@google.com>
Fri, 11 Dec 2015 06:53:53 +0000 (06:53 +0000)
committerXinliang David Li <davidxl@google.com>
Fri, 11 Dec 2015 06:53:53 +0000 (06:53 +0000)
commit6f139ce20bc911456a8edcaabd408e09bd41c806
treead06046d921a491f78507794f927bcbbe8c5316f
parentee256944c571b4be88fc7a17b6f9578a09bfd274
[PGO] Read VP raw data without depending on the Value field

Before this patch, each function's on-disk VP data is 'pointed'
to by the Value field of per-function ProfileData structue, and
read relies on this field (relocated with ValueDataDelta field)
to read the value data. However this means the Value field needs
to be updated during runtime before dumping, which creates undesirable
data races.

With this patch, the reading of VP data no longer depends on Value
field. There is no format change. ValueDataDelta header field becomes
obsolute but will be kept for compatibility reason (will be removed
next time the raw format change is needed).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255329 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/InstrProfReader.h
lib/ProfileData/InstrProfReader.cpp