summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ProfileData
Commit message (Collapse)AuthorAgeFilesLines
...
* [Coverage] Strip <unknown> from PGO names if no filenames are availableVedant Kumar2016-03-281-4/+6
| | | | | | Patch suggested by David Li! llvm-svn: 264586
* [Coverage] Fix the way we load "<unknown>:func" recordsVedant Kumar2016-03-281-0/+15
| | | | | | | | | When emitting coverage mappings for functions with local linkage and an unknown filename, we use "<unknown>:func" for the PGO function name. The problem is that we don't strip "<unknown>" from the name when loading coverage data, like we do for other file names. Fix that and add a test. llvm-svn: 264559
* [unittests] clang-format a line, NFCVedant Kumar2016-03-221-3/+1
| | | | llvm-svn: 264059
* Interface to get/set profile summary metadata to moduleEaswaran Raman2016-03-182-0/+27
| | | | | | Differential Revision: http://reviews.llvm.org/D17894 llvm-svn: 263835
* Remove code added for debugging purposes. NFC.Easwaran Raman2016-03-141-3/+3
| | | | llvm-svn: 263500
* Fix memory leak in tests.Easwaran Raman2016-03-032-0/+2
| | | | llvm-svn: 262674
* Use LineLocation instead of CallsiteLocation to index callsite profile.Dehao Chen2016-03-031-0/+2
| | | | | | | | | | | | Summary: With discriminator, LineLocation can uniquely identify a callsite without the need to specifying callee name. Remove Callee function name from the key, and put it in the value (FunctionSamples). Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17827 llvm-svn: 262634
* Metadata support for profile summary.Easwaran Raman2016-03-012-44/+69
| | | | | | | | This adds support to convert ProfileSummary object to Metadata and create a ProfileSummary object from metadata. This would allow attaching profile summary information to Module allowing optimization passes to use it. llvm-svn: 262360
* Add profile summary support for sample profile.Easwaran Raman2016-02-191-0/+30
| | | | | | Differential Revision: http://reviews.llvm.org/D17178 llvm-svn: 261304
* Add a profile summary class specific to instrumentation profiles.Easwaran Raman2016-02-171-5/+5
| | | | | | | | | 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 llvm-svn: 261119
* [PGO] Add another interface for annotateValueSiteRong Xu2016-02-121-0/+20
| | | | | | | | | Add another interface to function annotateValueSite() which directly uses the VauleData array. Differential Revision: http://reviews.llvm.org/D17108 llvm-svn: 260741
* [PGO] Make the number of records for each value site metada adjustableRong Xu2016-02-101-10/+31
| | | | | | | | | | The patch adds a parameter in annotateValueSite() to control the max number of records written to the value profile meta data for each value site. The default is kept as the current value of 3. Differential Revision: http://reviews.llvm.org/D17084 llvm-svn: 260450
* [PGO] fix prof symbol lookup bugXinliang David Li2016-02-101-0/+6
| | | | | | | | | | | | Patch by Rong Xu The problem is exposed by intra-module indirect call promotion where prof symtab is created from module which does not contain all symbols from the program. With partial symtab, the result needs to be checked more strictly. llvm-svn: 260361
* Add comments to some testsXinliang David Li2016-02-091-0/+4
| | | | llvm-svn: 260200
* Further reduce test overheadXinliang David Li2016-02-091-8/+4
| | | | llvm-svn: 260198
* Simplify some expressions involving unique_ptr and ErrorOrDavid Blaikie2016-02-091-42/+42
| | | | llvm-svn: 260179
* [PGO] Add interfaces to annotate instr with VP dataXinliang David Li2016-02-041-0/+55
| | | | | | | 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-2/+6
| | | | | | | - Remove unused valuemapper parameter - add totalcount optional parameter llvm-svn: 259756
* [PGO] Profile summary reader/writer supportXinliang David Li2016-02-031-0/+39
| | | | | | | | | | 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
* Further reduce test timeXinliang David Li2016-01-301-6/+2
| | | | llvm-svn: 259285
* [Profiling] Add a -sparse mode to llvm-profdata mergeVedant Kumar2016-01-292-27/+73
| | | | | | | | | | 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
* Improve test speed/trial 2Xinliang David Li2016-01-291-14/+12
| | | | llvm-svn: 259253
* Revert 259242, 259243 -- irrelvante changes pulled inXinliang David Li2016-01-291-51/+13
| | | | llvm-svn: 259244
* Use range for loopXinliang David Li2016-01-291-7/+5
| | | | llvm-svn: 259243
* Improve test speed (interchange loop, reducing padding)Xinliang David Li2016-01-291-13/+53
| | | | llvm-svn: 259242
* Remove autoconf supportChris Bieneman2016-01-261-15/+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-8/+9
| | | | | | | | other minor fixes. Differential revision: reviews.llvm.org/D16568 llvm-svn: 258831
* Revert 258486 -- for a better fix coming soonXinliang David Li2016-01-221-60/+55
| | | | llvm-svn: 258538
* [PGO] add an interface needed by icall promotionXinliang David Li2016-01-221-1/+3
| | | | llvm-svn: 258509
* [PGO] eliminate use of static variableXinliang David Li2016-01-221-55/+60
| | | | llvm-svn: 258486
* Fix a bug in testXinliang David Li2016-01-201-2/+2
| | | | llvm-svn: 258276
* [PGO] Add a new interface to be used by Indirect Call PromotionXinliang David Li2016-01-201-0/+36
| | | | llvm-svn: 258271
* InstrProfTest.cpp: Fix a warning. [-Wsign-compare]NAKAMURA Takumi2016-01-081-1/+1
| | | | llvm-svn: 257157
* Add value site truncation unit testXinliang David Li2016-01-081-10/+56
| | | | llvm-svn: 257153
* [PGO] Ensure vp data in indexed profile always sortedXinliang David Li2016-01-081-28/+0
| | | | | | | | | 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-081-0/+56
| | | | | | | | | | 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
* Add explicit string checks in testXinliang David Li2016-01-041-2/+15
| | | | llvm-svn: 256796
* [PGO]: Implement Func PGO name string compressionXinliang David Li2015-12-311-0/+61
| | | | | | | | | | 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
* InstrProfTest.cpp: Don't assume string literals are always merged.NAKAMURA Takumi2015-12-271-29/+37
| | | | | | | MSC18 Debug didn't merge them. FIXME: I tweaked just to appease a builder. Almost string literals should be addressed identically there. llvm-svn: 256459
* Improve InstrProfSymtab test coverageXinliang David Li2015-12-191-0/+27
| | | | llvm-svn: 256099
* [PGO] Add hash to name mapping in InstrProfSymtabXinliang David Li2015-12-191-0/+24
| | | | | | | | | Creator and lookup interfaces are added to this symtab class. The new interfaces will be used by InstrProf Readers and writer. A unit test is also added for the new APIs. llvm-svn: 256092
* [PGO] Handle and report overflow during profile merge for all types of dataNathan Slingerland2015-12-162-29/+68
| | | | | | | | | | | | Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user. Reviewers: davidxl, dnovillo, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15547 llvm-svn: 255825
* [llvm-profdata] Add support for weighted merge of profile data (2nd try)Nathan Slingerland2015-12-151-2/+27
| | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 255659
* [ProfileData] Add unit test infrastructure for sample profile reader/writerNathan Slingerland2015-12-102-0/+103
| | | | | | | | | | | | | | | Summary: Adds support for in-memory round-trip of sample profile data along with basic round trip unit tests. This will also make it easier to include unit tests for future changes to sample profiling. Reviewers: davidxl, dnovillo, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15211 llvm-svn: 255264
* Revert "[llvm-profdata] Add support for weighted merge of profile data"Nathan Slingerland2015-12-041-20/+0
| | | | | | | | This reverts commit b7250858d96b8ce567681214273ac0e62713c661. Reverting in order to investigate Windows test failure. llvm-svn: 254687
* [llvm-profdata] Add support for weighted merge of profile dataNathan Slingerland2015-12-041-0/+20
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 254669
* [llvm-profdata] Change instr prof counter overflow to saturate rather than ↵Nathan Slingerland2015-12-021-1/+4
| | | | | | | | | | | | | | 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 llvm-svn: 254525
* Use nullptr (NFC)Xinliang David Li2015-12-011-1/+1
| | | | llvm-svn: 254447
* [PGO] Allow value profile writer interface to allocated target buffer Xinliang David Li2015-11-281-1/+1
| | | | | | | | | Raw profile writer needs to write all data of one kind in one continuous block, so the buffer needs to be pre-allocated and passed to the writer method in pieces for function profile data. The change adds the support for raw value data writing. llvm-svn: 254219
* [PGO] Implement ValueProfiling Closure interfaces for runtime value profile dataXinliang David Li2015-11-251-0/+92
| | | | | | | | | | | | | | | | This is one of the many steps to commonize value profiling support between profile runtime and compiler/llvm tools. After this change, profiler runtime now can share the same C APIs to do VP serialization/deseriazation with LLVM host tools (and produces value data in identical format between indexed and raw profile). It is not yet enabled in profiler runtime yet. Also added a unit test case to test runtime profile data serialization/deserialization interfaces implemented using common closure code. llvm-svn: 254110
OpenPOWER on IntegriCloud