Commit Graph

67 Commits

Author SHA1 Message Date
David Majnemer
dc9c737666 Use range algorithms instead of unpacking begin/end
No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-11 21:15:00 +00:00
Eugene Zelenko
c986ab210b Fix some Clang-tidy modernize and Include What You Use warnings.
Differential revision: https://reviews.llvm.org/D23291


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-11 17:20:18 +00:00
Vedant Kumar
d91d378e3a Retry: [llvm-profdata] Speed up merging by using a thread pool
Add a "-j" option to llvm-profdata to control the number of threads used.
Auto-detect NumThreads when it isn't specified, and avoid spawning threads when
they wouldn't be beneficial.

I tested this patch using a raw profile produced by clang (147MB). Here is the
time taken to merge 4 copies together on my laptop:

  No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total
  With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total

Changes since the initial commit:

  - When handling odd-length inputs, call ThreadPool::wait() before merging the
    last profile. Should fix a race/off-by-one (see r275937).

Differential Revision: https://reviews.llvm.org/D22438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275938 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-19 01:17:20 +00:00
Vedant Kumar
40a2c5247c Revert "[llvm-profdata] Speed up merging by using a thread pool"
This reverts commit r275921. It broke the ppc64be bot:

  http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/3537

I'm not sure why it broke, but based on the output, it looks like an
off-by-one (one profile left un-merged).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-19 00:57:09 +00:00
Vedant Kumar
94471e314e [llvm-profdata] Speed up merging by using a thread pool
Add a "-j" option to llvm-profdata to control the number of threads
used. Auto-detect NumThreads when it isn't specified, and avoid spawning
threads when they wouldn't be beneficial.

I tested this patch using a raw profile produced by clang (147MB). Here is the
time taken to merge 4 copies together on my laptop:

  No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total
  With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total

Differential Revision: https://reviews.llvm.org/D22438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275921 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 22:02:39 +00:00
Benjamin Kramer
e3bf66476f [ProfileData] Thread unique_ptr through the summary builder to avoid leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:18:37 +00:00
Easwaran Raman
30c760d801 Remove specializations of ProfileSummary
This removes the subclasses of ProfileSummary, moves the members of the derived classes to the base class.

Differential Revision: http://reviews.llvm.org/D20390



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 21:53:28 +00:00
Easwaran Raman
17e7f1191f Move ProfileSummary to IR.
This splits ProfileSummary into two classes: a ProfileSummary class that has methods to convert from/to metadata and a ProfileSummaryBuilder class that computes the profiles summary which is in ProfileData.

Differential Revision: http://reviews.llvm.org/D20314



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 21:07:12 +00:00
Vedant Kumar
c77570e062 Retry^3 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
- Remove the base ProfError class to work around an MSVC ICE.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 03:54:45 +00:00
Vedant Kumar
ce4aff93aa Revert "Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269694. MSVC says:

error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 21:03:38 +00:00
Vedant Kumar
515ee3e025 Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Address undefined-var-template warning.
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:49:39 +00:00
Chandler Carruth
2e531af53a Revert "Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269491. It triggers warnings with Clang, breaking
builds for -Werror users including several build bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 05:26:26 +00:00
Vedant Kumar
db1d476217 Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:50:56 +00:00
Vedant Kumar
8007bdd41f Revert "(HEAD -> master, origin/master, origin/HEAD) [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
This reverts commit r269462. It fails two llvm-profdata tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:09:39 +00:00
Vedant Kumar
5b34ed8191 [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:01:27 +00:00
Vedant Kumar
6d6b3df09a [ProfileData] Use SoftInstrProfErrors to count soft errors, NFC
Differential Revision: http://reviews.llvm.org/D20082

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 19:42:19 +00:00
Easwaran Raman
448784058c Add profile summary support for sample profile.
Differential Revision: http://reviews.llvm.org/D17178



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261304 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-19 03:15:33 +00:00
Easwaran Raman
233e7d3773 Add a profile summary class specific to instrumentation profiles.
Modify ProfileSummary class to make it not instrumented profile specific.
Add a new InstrumentedProfileSummary class that inherits from ProfileSummary.

Differential Revision: http://reviews.llvm.org/D17310



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 18:18:47 +00:00
Rong Xu
c7d7fb02f4 [PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
This patch uses one bit in profile version to differentiate Clang
instrumentation and IR level instrumentation profiles.

PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so
that the compiler runtime can set the right profile kind.
For Maco-O platform, we generate the variable as linkonce_odr linkage as
COMDAT is not supported.

PGOInstrumenation now checks this bit to make sure it's an IR level
instrumentation profile.

The patch was submitted as r260164 but reverted due to a Darwin test breakage.
Original Differential Revision: http://reviews.llvm.org/D15540

Differential Revision: http://reviews.llvm.org/D17020



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260385 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 17:18:30 +00:00
Rong Xu
aab8d7f3e3 [PGO] Revert r260146 as it breaks Darwin platforms.
r260146 | xur | 2016-02-08 13:07:46 -0800 (Mon, 08 Feb 2016) | 13 lines
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260170 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 23:11:16 +00:00
Rong Xu
c9a01773b0 [PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
This patch uses one bit in profile version to differentiate Clang
instrumentation and IR level instrumentation profiles.

PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so
that the compiler runtime can set the right profile kind.
PGOInstrumenation now checks this bit to make sure it's an IR level
instrumentation profile.

Differential Revision: http://reviews.llvm.org/D15540



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260146 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 21:07:46 +00:00
Xinliang David Li
916e1f1bd4 Fix a typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 06:24:11 +00:00
Xinliang David Li
8fd9cfb481 [PGO] Profile summary reader/writer support
With this patch, the profile summary data will be available in indexed
profile data file so that profiler reader/compiler optimizer can start
to make use of.

Differential Revision: http://reviews.llvm.org/D16258



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259626 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 04:08:18 +00:00
Vedant Kumar
0c94d7d441 [Profiling] Add a -sparse mode to llvm-profdata merge
Add an option to llvm-profdata merge for writing out sparse indexed
profiles. These profiles omit InstrProfRecords for functions which are
never executed.

Differential Revision: http://reviews.llvm.org/D16727

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:54:45 +00:00
Xinliang David Li
5c32749d7b [PGO] Remove use of static variable. /NFC
Make the variable a member of  the writer trait object owned
now by the writer. Also use a different generator interface
to pass the infoObject from the writer. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258544 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 20:25:56 +00:00
Xinliang David Li
8c37fa8006 Revert 258486 -- for a better fix coming soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 19:53:31 +00:00
Xinliang David Li
860ed4e8ad [PGO] eliminate use of static variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:48:40 +00:00
Xinliang David Li
f223b5182f Fix -Wmismatched-tags warning/error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257924 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 19:22:41 +00:00
Xinliang David Li
48b8a6c6a9 [PGO] Commonize (more) index profile file and buffer writer.
The file and buffer writer code are mostly shared except for the
stream back-patching. This is because raw_string_ostream does not
support seek like interface. The result is that the data patching
code needs to be pushed to the caller which is not quite readable 
(passing around offset, value etc). This also makes future enhancement
(which needs more patching) more difficult (and can make impl messy).

In this patch, two types of streams needed by the writer are now
unified with same set of interfaces under ProfOStream class. The patch
method is added so that common implementation becomes cleaner. It
also enables future enhancement. Should be NFC.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257921 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 19:01:04 +00:00
Xinliang David Li
5fd06e2add [PGO] clean up and documentation
Introduce enum for indexed format versions and 
document indexed format change history.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:47:01 +00:00
Xinliang David Li
36838feb74 [PGO] Ensure vp data in indexed profile always sorted
Done in  InstrProfWriter to eliminate the need for client
code to do the sorting. The operation is done once and reused 
many times so it is more efficient. Update unit test to remove
sorting. Also update expected output of affected tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08 05:45:21 +00:00
Xinliang David Li
4f87d1237a [PGO] Fix a bug in InstProfWriter addRecord
For a new record with weight != 1, only edge profiling
counters are scaled, VP data is not properly scaled.

This patch refactors the code and fixes the problem.
Also added sort by count interface (for follow up patch).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08 03:49:59 +00:00
Xinliang David Li
cb4197f621 Fix a latent UAF bug in profwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256116 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 08:46:18 +00:00
Xinliang David Li
cfbaf11a0d [PGO] Improve Indexed Profile Reader efficiency
With the support of value profiling added, the Indexed prof
reader gets less efficient. The prof reader initialization
used to be just reading the file header, but with VP support
added, initialization needs to walk through all profile keys
of ondisk hash table resulting in very poor locality and large
memory increase (keys are stored together with the profile data
in the mapped profile buffer). Even worse, when the reader is 
used by the compiler (not llvm-profdata too), the penalty becomes
very high as compilation of each single module requires touching
profile data buffer for the whole program. 

In this patch, the icall target values (MD5hash) are no longer eargerly 
converted back to name strings when the data is read into memory. New
interface is added to to profile reader so that InstrProfSymtab can be
lazily created for Indexed profile reader on-demand. Creating of the 
symtab is intended to be used by llvm-profdata tool for symbolic dumping
of  VP data. It can be used with compiler (for legacy out of tree uses)
too but not recommended due to compile time and memory reasons 
mentioned above.

Some other cleanups are also included: Function Addr to md5 map is now
consolated into InstrProfSymtab. InstrProfStringtab is no longer used and
eliminated.







git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 06:22:13 +00:00
Xinliang David Li
5c542537c1 [PGO] Simplify computehash interface (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 22:22:12 +00:00
Nathan Slingerland
824c3eccff [llvm-profdata] Add support for weighted merge of profile data (2nd try)
Summary:
This change adds support for specifying a weight when merging profile data with the llvm-profdata tool.
Weights are specified by using the --weighted-input=<weight>,<filename> option. Input files not specified
with this option (normal positional list after options) are given a default weight of 1.

Adding support for arbitrary weighting of input profile data allows for relative importance to be placed on the
input data from multiple training runs.

Both sampled and instrumented profiles are supported.

Reviewers: davidxl, dnovillo, bogner, silvas

Subscribers: silvas, davidxl, llvm-commits

Differential Revision: http://reviews.llvm.org/D15306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255659 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15 17:37:09 +00:00
Xinliang David Li
ea0570fdaf [PGO] Value profiling text format reader/writer support
This patch adds the missing functionality in parsable
text format support for value profiling.

Differential Revision: http://reviews.llvm.org/D15212



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255523 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14 18:44:01 +00:00
Nathan Slingerland
8061fe5c67 Revert "[llvm-profdata] Add support for weighted merge of profile data"
This reverts commit b7250858d9.

Reverting in order to investigate Windows test failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254687 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04 02:13:58 +00:00
Nathan Slingerland
b7250858d9 [llvm-profdata] Add support for weighted merge of profile data
This change adds support for an optional weight when merging profile data with the llvm-profdata tool.
Weights are specified by adding an option ':<weight>' suffix to the input file names.

Adding support for arbitrary weighting of input profile data allows for relative importance to be placed on the
input data from multiple training runs.

Both sampled and instrumented profiles are supported.

Reviewers: dnovillo, bogner, davidxl

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14547

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254669 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04 00:00:20 +00:00
Nathan Slingerland
1c2b998913 [llvm-profdata] Change instr prof counter overflow to saturate rather than discard
Summary: This changes overflow handling during instrumentation profile merge. Rathar than throwing away records that would result in counter overflow, merged counts are instead clamped to the maximum representable value. A warning about counter overflow is still surfaced to the user as before.

Reviewers: dnovillo, davidxl, silvas

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14893

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254525 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:19:24 +00:00
Xinliang David Li
54daffcbaa [PGO] In llvm-profdata text dump, add comment lines as annotations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:31:22 +00:00
Xinliang David Li
55f78334c1 [PGO] Add --text option for llvm-profdata show|merge commands
The new option is similar to the SampleProfile dump option.

- dump raw/indexed format into text profile format
- merge the profile and output into text profile format.

Note that Value Profiling data text format is not yet designed. 
That functionality will be added later.

Differential Revision: http://reviews.llvm.org/D14894



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253913 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 20:47:38 +00:00
Reid Kleckner
368c7cb1bd Fix the Windows build, include <tuple> for std::tie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253698 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 19:29:40 +00:00
Nathan Slingerland
e0a7f28fc6 [llvm-profdata] Add merge() to InstrProfRecord
Summary:
This change refactors two aspects of InstrProfRecord:

1) Add a merge() method to InstrProfRecord (previously InstrProfWriter combineInstrProfRecords()) in order to better encapsulate this functionality and to make the InstrProfRecord and SampleRecord APIs more consistent.

2) Make InstrProfRecord mergeValueProfData() a private method since it is only ever called internally by merge().

Reviewers: dnovillo, bogner, davidxl

Subscribers: silvas, vsk, llvm-commits

Differential Revision: http://reviews.llvm.org/D14786

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 19:12:43 +00:00
Xinliang David Li
e34401de05 [PGO] Move value profile data definitions out of IndexedInstrProf
Move the data structure defintions out of the namespace. The defs will
be shared by raw format. [NFC]



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253394 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 23:00:40 +00:00
Xinliang David Li
bcd8e0aae7 [PGO] Make indexed value profile data more compact
- Make indexed value profile data more compact by peeling out 
  the per-site value count field into its own smaller sized array.
- Introduced formal data structure definitions to specify value 
  profile data layout in indexed format. Previously the layout 
  of the data is only assumed in the client code (scattered in 
  three different places : size computation, EmitData, and ReadData
- The new data structure  serves as a central place for layout documentation.
- Add interfaces to force BE output for value profile data (testing purpose)
- Add byte swap unit tests

Differential Revision: http://reviews.llvm.org/D14401


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252563 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 00:24:45 +00:00
Xinliang David Li
4d774a3941 Code style fix (caused by wrongly default clang-format style) (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252276 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 07:54:21 +00:00
Xinliang David Li
61c7e68339 [PGO] Value profiling (index format) code cleanup and testing
1. Added a set of public interfaces in InstrProfRecord
    class to access (read/write) value profile data.
 2. Changed IndexedProfile reader and writer code to 
    use the newly defined interfaces and hide implementation
    details.
 3. Added a couple of unittests for value profiling:
   - Test new interfaces to get and set value profile data
   - Test value profile data merging with various scenarios.

 No functional change is expected. The new interfaces will also
 make it possible to change on-disk format of value prof data
 to be more compact (to be submitted). 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251771 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 05:08:23 +00:00
Xinliang David Li
09717fa07b Minor Instr PGO code restructuring
1. Key constant values (version, magic) and data structures related to raw and 
   indexed profile format are moved into one centralized file: InstrProf.h.
2. Utility function such as MD5Hash computation is also moved to the common 
   header to allow sharing with other components in the future.
3. A header data structure is introduced for Indexed format so that the reader
   and writer can always be in sync.
4. Added some comments to document different places where multiple definition
   of the data structure must be kept in sync (reader/writer, runtime, lowering 
   etc).  No functional change is intended.

Differential Revision:  http://reviews.llvm.org/D13758


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250638 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-18 01:02:29 +00:00
Justin Bogner
c96f87a892 InstrProf: Support for value profiling in the indexed profile format
Add support to the indexed instrprof reader and writer for the format
that will be used for value profiling.

Patch by Betul Buyukkurt, with minor modifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-29 22:13:58 +00:00