1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

43 Commits

Author SHA1 Message Date
Xinliang David Li
ece172beb5 [profile] Remove another unneeded field in raw profile reader
DataValueSize is now removed. The change is consolidated
with previous raw version bump.

llvm-svn: 268703
2016-05-06 02:13:00 +00:00
Xinliang David Li
3bfeece63b [Profile] Raw profile header clean up
Remove dead ValueDataBegin field in raw header.

llvm-svn: 268602
2016-05-05 04:07:30 +00:00
Adam Nemet
1395c59123 [PGO] More comments how function pointers for indirect calls are mapped
to function names

Summary:
Hopefully this will make it easier for the next person to figure all
this out...

Reviewers: bogner, davidxl

Subscribers: davidxl, cfe-commits

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

llvm-svn: 264678
2016-03-28 22:15:15 +00:00
Adam Nemet
944c192519 [PGO] Update r264611 to use C-style comment
llvm-svn: 264614
2016-03-28 18:45:30 +00:00
Adam Nemet
b17081facf [PGO] Comment how function pointers for indirect calls are mapped to function names
Summary:
Hopefully this will make it easier for the next person to figure all
this out...

Reviewers: bogner, davidxl

Subscribers: llvm-commits

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

llvm-svn: 264611
2016-03-28 18:27:44 +00:00
Xinliang David Li
0b2716e0f4 Add forward declarations /NFC
llvm-svn: 261946
2016-02-26 00:54:08 +00:00
Rong Xu
846b326ad9 [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

llvm-svn: 260385
2016-02-10 17:18:30 +00:00
Rong Xu
6836bd6879 [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

llvm-svn: 260170
2016-02-08 23:11:16 +00:00
Rong Xu
5b6f09e7f2 [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

llvm-svn: 260146
2016-02-08 21:07:46 +00:00
Xinliang David Li
a698273397 [PGO] Enable compression in pgo instrumentation
This reduces sizes of instrumented object files, final binaries,
process images, and raw profile data.

The format of the indexed profile data remain the same.

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

llvm-svn: 260117
2016-02-08 18:13:49 +00:00
Xinliang David Li
fa6cd53219 [PGO] Profile interface cleanup
- Remove unused valuemapper parameter
  - add totalcount optional parameter

llvm-svn: 259756
2016-02-04 05:29:51 +00:00
Xinliang David Li
f9d9bfe484 [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

llvm-svn: 259626
2016-02-03 04:08:18 +00:00
Xinliang David Li
df11252ebe [PGO] Make header portable for C /NFC
llvm-svn: 258889
2016-01-27 00:13:39 +00:00
Eugene Zelenko
966902f532 Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes.
Differential revision: reviews.llvm.org/D16568

llvm-svn: 258831
2016-01-26 18:48:36 +00:00
Xinliang David Li
50d58058da Fix a typo
llvm-svn: 258716
2016-01-25 20:38:13 +00:00
Xinliang David Li
2c9c61a7ae Cleanup: shorten prefix to consistent with other decls /NFC
llvm-svn: 257744
2016-01-14 06:21:25 +00:00
Xinliang David Li
caf757f298 [PGO] Introducing version mask macro/NFC
llvm-svn: 257224
2016-01-08 22:55:16 +00:00
Xinliang David Li
7cc3407c44 Minor fix -- use the right version enum/NFC
llvm-svn: 257194
2016-01-08 19:21:32 +00:00
Xinliang David Li
a0cd8964ea [PGO] : Removing trailing space/define new macro/NFC
llvm-svn: 257123
2016-01-08 00:38:53 +00:00
Xinliang David Li
86978fc4f3 [PGO] Minor refactoring /NFC
Move common defs into common header files.

llvm-svn: 257108
2016-01-07 22:46:29 +00:00
NAKAMURA Takumi
e949298ce9 llvm/include/llvm/ProfileData/InstrProfData.inc: Add c++-mode in the header.
llvm-svn: 256721
2016-01-04 00:47:33 +00:00
Xinliang David Li
788f17541f [PGO] Introduce coverage map header structure in PGO data template file /NFC
llvm-svn: 256710
2016-01-03 18:35:56 +00:00
Xinliang David Li
7d948a5ebf Add a forward declaration (NFC)
llvm-svn: 255292
2015-12-10 20:13:41 +00:00
Xinliang David Li
1377f309a0 [PGO] Allow input value node list to be null
This is to handle the case when vp node linked
list array is laziliy initialized at runtime 

llvm-svn: 254551
2015-12-02 21:47:43 +00:00
Xinliang David Li
c258245ddf Define member operator delete
For the struct with trailing objects, define
a member operator delete. Without this, the program
will fail when -fsized-deallocation option is used
where the wrong size will be passed to the global
delete operator.

llvm-svn: 254471
2015-12-01 23:05:27 +00:00
Xinliang David Li
2f7575a9de Minor code cleanups
- Add const keyword
 - fix code comments
 - move forward decl to the common file

llvm-svn: 254244
2015-11-29 04:52:34 +00:00
Xinliang David Li
1c888b8d73 [PGO] Move value profile format related structures and APIs to common file
This is the last step to enable profile runtime to share the same value prof
data format and reader/writer code with llvm host tools. The VP related 
data structures are moved to a section in InstrProfData.inc enabled with macro
INSTR_PROF_VALUE_PROF_DATA, and common API implementations are enabled with
INSTR_PROF_COMMON_API_IMPL. There should be no functional change.

llvm-svn: 254235
2015-11-28 19:07:09 +00:00
Xinliang David Li
df875576b5 Fix a typo introduced in previous patches
llvm-svn: 254112
2015-11-26 00:02:23 +00:00
Xinliang David Li
02a0716447 Remove trailing space in comments
llvm-svn: 253941
2015-11-24 00:31:41 +00:00
Xinliang David Li
0b39dbc2f8 [PGO] Introduce alignment macro for instr-prof control data(NFC)
llvm-svn: 253893
2015-11-23 18:02:59 +00:00
Xinliang David Li
a6bd292bad Fix comment not allowed in C90
llvm-svn: 253880
2015-11-23 17:05:45 +00:00
Xinliang David Li
4878e2f9f9 Move two Value Profiler data structs to InstrProfData.inc (NFC)
llvm-svn: 253848
2015-11-23 05:29:51 +00:00
Xinliang David Li
076c9c59a2 [PGO] Fix remaining bugs in ProfData template file (when used by compiler-rt)
1. move const qualifier out of raw header field type as runtime use of the header
   needs to initialze the fields
2. use C style casting for integer types.

llvm-svn: 253844
2015-11-23 03:49:07 +00:00
Xinliang David Li
0a6ec9cd2c [PGO] move names of runtime sections definitions to InstrProfData.inc
In profile runtime implementation for Darwin, Linux and FreeBSD, the
names of sections holding profile control/counter/naming data need
to be known by the runtime in order to locate the start/end of the
data. Moving the name definitions to the common file to specify the
connection.

llvm-svn: 253814
2015-11-22 05:42:31 +00:00
Xinliang David Li
fc1d455417 [PGO] move raw magic and version def to InstrProfData.inc
These are shared definitions too. (NFC)

llvm-svn: 253809
2015-11-22 02:05:50 +00:00
Xinliang David Li
dde2bc76c3 [PGO] InstrProf Template file documentation change
Add more complete description of the content and structure
of the template file. Made the comment in C style to be
shared by C runtime. Also enhance the file structure so
that it can included as standalone header for common 
definitions.

llvm-svn: 253807
2015-11-22 01:51:31 +00:00
Xinliang David Li
241cfd4800 [PGO] Move Value Profile Kind to InstrProfData.inc
ValueProfKind value affects runtime data structure and
definition is shared between compiler-rt and LLVM.

llvm-svn: 253806
2015-11-22 01:39:07 +00:00
Xinliang David Li
b823f0597b [PGO] Define value profiling updater API signature in InstrProfData.inc (NFC)
llvm-svn: 253805
2015-11-22 00:22:07 +00:00
Xinliang David Li
64fc4b9d72 [PGO] Move Raw Header def into template file InstrProfData.inc
To enable code sharing with compiler-rt (NFC)

llvm-svn: 253803
2015-11-22 00:06:39 +00:00
Betul Buyukkurt
b3b3ea9a07 [PGO] Value profiling support
This change introduces an instrumentation intrinsic instruction for
value profiling purposes, the lowering of the instrumentation intrinsic
and raw reader updates. The raw profile data files for llvm-profdata
testing are updated.

llvm-svn: 253484
2015-11-18 18:14:55 +00:00
Xinliang David Li
d97f909352 Fix a bug exposed by uses in CFE
llvm-svn: 252146
2015-11-05 05:45:06 +00:00
Xinliang David Li
3edbd8ba8a [PGO] Use template file to define runtime structures
With this change, instrumentation code and reader/write
code related to profile data structs are kept strictly
in-sync. THis will be extended to cfe and compile-rt 
references as well.

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

llvm-svn: 252113
2015-11-05 00:47:26 +00:00
Xinliang David Li
cfb13c77ed Instroduce a template file to define InstrPGO core data structures.
Changing PGO data format layout can be a pain. Many different places need
to be touched and kept in sync. Failing to do so usually results in errors
very time consuming to debug.

This file is intended to be the master file that defines the layout of the
core runtime data structures. Currently only two structure is covered: Per
function ProfData structure and the function record structure used in
coverage mapping.

No client code has been made yet, so this commit is NFC.

llvm-svn: 250574
2015-10-16 23:17:34 +00:00