summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor profile summary support code. NFC.Easwaran Raman2016-02-043-50/+76
| | | | | | | | | | Summary computation is not just for instrumented profiling and so I have moved the ProfileSummary class to ProfileCommon.h (named so to allow code unrelated to summary but common to instrumented and sampled profiling to be placed there) Differential Revision: http://reviews.llvm.org/D16661 llvm-svn: 259846
* [PGO] Add interfaces to annotate instr with VP dataXinliang David Li2016-02-041-0/+87
| | | | | | | Add interfaces to do value profile data IR annnotation and read. Needed by both FE and IR based PGO. llvm-svn: 259813
* [PGO] Profile interface cleanupXinliang David Li2016-02-041-4/+3
| | | | | | | - Remove unused valuemapper parameter - add totalcount optional parameter llvm-svn: 259756
* Fix a typo in commentXinliang David Li2016-02-031-1/+1
| | | | llvm-svn: 259631
* Fix uninitiazed variable use problemXinliang David Li2016-02-031-1/+1
| | | | llvm-svn: 259630
* [PGO] Profile summary reader/writer supportXinliang David Li2016-02-033-13/+104
| | | | | | | | | | 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
* [Profiling] Add a -sparse mode to llvm-profdata mergeVedant Kumar2016-01-291-6/+24
| | | | | | | | | | 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 llvm-svn: 259258
* Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren2016-01-291-3/+3
| | | | | | | | r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
* [PGO] allow pgo name collector to disable compression (for testing)/NFCXinliang David Li2016-01-261-2/+3
| | | | llvm-svn: 258876
* Remove autoconf supportChris Bieneman2016-01-261-14/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; ↵Eugene Zelenko2016-01-261-5/+4
| | | | | | | | other minor fixes. Differential revision: reviews.llvm.org/D16568 llvm-svn: 258831
* [PGO] Remove use of static variable. /NFCXinliang David Li2016-01-221-11/+15
| | | | | | | | 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. llvm-svn: 258544
* Revert 258486 -- for a better fix coming soonXinliang David Li2016-01-221-10/+7
| | | | llvm-svn: 258538
* [PGO] eliminate use of static variableXinliang David Li2016-01-221-7/+10
| | | | llvm-svn: 258486
* [PGO] Add a new interface to be used by Indirect Call PromotionXinliang David Li2016-01-201-0/+7
| | | | llvm-svn: 258271
* Fix a coverage reading bug Xinliang David Li2016-01-191-1/+3
| | | | | | | | | function record pointer is not advanced when duplicate entry is found. Test case to be added. llvm-svn: 258188
* [Coverage] move a local var to be BinaryCoverageReader's memberXinliang David Li2016-01-181-8/+11
| | | | | | | | The symtab is logically referenced beyond the call to the create method. This changes makes sure its lifetime matches that of the reader. llvm-svn: 258036
* Fix -Wmismatched-tags warning/errorXinliang David Li2016-01-151-1/+2
| | | | llvm-svn: 257924
* [PGO] Commonize (more) index profile file and buffer writer.Xinliang David Li2016-01-151-33/+70
| | | | | | | | | | | | | | | | 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. llvm-svn: 257921
* [PGO] Move profile summary interface/impl into InstrProf.[*] /NFCXinliang David Li2016-01-141-0/+35
| | | | llvm-svn: 257819
* Rename local variable to avoid conflictXinliang David Li2016-01-141-5/+5
| | | | llvm-svn: 257748
* Cleanup: shorten prefix to consistent with other decls /NFCXinliang David Li2016-01-141-10/+8
| | | | llvm-svn: 257744
* [PGO] clean up and documentationXinliang David Li2016-01-142-4/+5
| | | | | | | Introduce enum for indexed format versions and document indexed format change history. llvm-svn: 257737
* Add virtual dtorXinliang David Li2016-01-141-0/+2
| | | | llvm-svn: 257734
* [Coverage] introduce class hierarchy (funcRecordReader) to support multiple ↵Xinliang David Li2016-01-131-22/+82
| | | | | | | | | | | | | versions of coverage data [resubmit after fixing build bot failures: qualify make_unique and eliminate -Wcovered-switch-default warning. With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version. No functional change is intended. Differiential Revision: http://reviews.llvm.org/D16133 llvm-svn: 257708
* Revert r257699 -- windows buildbot failure TBIXinliang David Li2016-01-131-85/+22
| | | | llvm-svn: 257703
* [Coverage] introduce class hierarchy (funcRecordReader) to support multiple ↵Xinliang David Li2016-01-131-22/+85
| | | | | | | | | | | | versions of coverage data With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version. No functional change is intended. Differiential Revision: http://reviews.llvm.org/D16133 llvm-svn: 257699
* [Coverage] Refactor coverage mapping reader code Xinliang David Li2016-01-131-17/+13
| | | | | | | | | | | | | | (Resubmit after fixing a typo that breaks test on big endian machines) In this refactoring, member functions are introduced to access CovMap header/func record members and hide layout details. This will enable further code restructuring to support reading multiple versions of coverage mapping data with shared/templatized code. (When coveremap format version changes, backward compatibtility should be preserved). llvm-svn: 257571
* Rollback r257551 -- unexpected test failures TBIXinliang David Li2016-01-131-13/+17
| | | | llvm-svn: 257564
* [Coverage] Refactor coverage mapping reader code /NFCXinliang David Li2016-01-131-17/+13
| | | | | | | | | | | | | (Resubmit after fixing build bot failures) In this refactoring, member functions are introduced to access CovMap header/func record members and hide layout details. This will enable further code restructuring to support reading multiple versions of coverage mapping data with shared/templatized code. (When coveremap format version changes, backward compatibtility should be preserved). llvm-svn: 257551
* Rollback r257547 -- buildbot failure TBIXinliang David Li2016-01-131-13/+17
| | | | llvm-svn: 257549
* [Coverage] Refactor coverage mapping reader code /NFCXinliang David Li2016-01-131-17/+13
| | | | | | | | | | | In this refactoring, member functions are introduced to access CovMap header/func record members and hide layout details. This will enable further code restructuring to support reading multiple versions of coverage mapping data with shared/templatized code. (When coveremap format version changes, backward compatibtility should be preserved). llvm-svn: 257547
* [Support] Add saturating multiply-add support functionNathan Slingerland2016-01-121-14/+3
| | | | | | | | | | | | Summary: Add SaturatingMultiplyAdd convenience function template since A + (X * Y) comes up frequently when doing weighted arithmetic. Reviewers: davidxl, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15385 llvm-svn: 257532
* Move coveragemap_error enum into coverage namespace and InstrProf.h /NFCXinliang David Li2016-01-101-1/+1
| | | | llvm-svn: 257295
* [PGO] Ensure vp data in indexed profile always sortedXinliang David Li2016-01-081-0/+2
| | | | | | | | | 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. llvm-svn: 257145
* [PGO] Fix a bug in InstProfWriter addRecordXinliang David Li2016-01-082-16/+43
| | | | | | | | | | 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). llvm-svn: 257143
* [PGO] Minor refactoring /NFCXinliang David Li2016-01-071-5/+1
| | | | | | Move common defs into common header files. llvm-svn: 257108
* [PGO] Simplify string parsingXinliang David Li2016-01-041-13/+3
| | | | | | Patch Suggested by Vedant. llvm-svn: 256785
* [PGO] Refactor string writer codeXinliang David Li2016-01-041-12/+18
| | | | | | | For readability and code sharing. (Adapted from Suggestions by Vedant). llvm-svn: 256784
* [PGO]: Use efficient 'join' API for uncompressed stringXinliang David Li2016-01-041-13/+5
| | | | llvm-svn: 256781
* [PGO]: reserve space for string to avoid excessive memory realloc/copy (non ↵Xinliang David Li2016-01-041-0/+6
| | | | | | linear) llvm-svn: 256776
* [PGO] Code refactoring to use header struct def /NFCXinliang David Li2016-01-031-5/+10
| | | | llvm-svn: 256712
* [PGO] simple refactoring (NFC)Xinliang David Li2016-01-031-4/+8
| | | | llvm-svn: 256695
* [PGO]: Implement Func PGO name string compressionXinliang David Li2015-12-311-2/+99
| | | | | | | | | | This is part of the effort/prepration to reduce the size instr-pgo (object, binary, memory footprint, and raw data). The functionality is currently off by default and not yet used by any clients. llvm-svn: 256667
* [ProfileData] Make helper function static.Benjamin Kramer2015-12-241-1/+1
| | | | | | No functional change. llvm-svn: 256375
* Fix a latent UAF bug in profwriterXinliang David Li2015-12-201-0/+2
| | | | llvm-svn: 256116
* [PGO] Improve Indexed Profile Reader efficiency Xinliang David Li2015-12-203-73/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 256114
* Minor clean up -- move large single use method out of header(NFC)Xinliang David Li2015-12-201-0/+31
| | | | llvm-svn: 256113
* [PGO] Cleanup: Move large member functions out of line (NFC)Xinliang David Li2015-12-181-2/+91
| | | | llvm-svn: 256058
* [PGO] Simplify computehash interface (NFC)Xinliang David Li2015-12-182-3/+2
| | | | llvm-svn: 256047
OpenPOWER on IntegriCloud