summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ProfileData/InstrProfTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove specializations of ProfileSummaryEaswaran Raman2016-05-191-12/+9
| | | | | | | | This removes the subclasses of ProfileSummary, moves the members of the derived classes to the base class. Differential Revision: http://reviews.llvm.org/D20390 llvm-svn: 270143
* Retry^3 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-191-39/+49
| | | | | | | | | | | | | | | 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 llvm-svn: 270020
* Revert "Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""Vedant Kumar2016-05-161-49/+39
| | | | | | | | This reverts commit r269694. MSVC says: error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition llvm-svn: 269700
* Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-161-39/+49
| | | | | | | | | | | | | | | 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 llvm-svn: 269694
* Revert "Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""Chandler Carruth2016-05-141-49/+39
| | | | | | | This reverts commit r269491. It triggers warnings with Clang, breaking builds for -Werror users including several build bots. llvm-svn: 269547
* Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-131-39/+49
| | | | | | | | | | | | | | 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 llvm-svn: 269491
* Revert "(HEAD -> master, origin/master, origin/HEAD) [ProfileData] (llvm) ↵Vedant Kumar2016-05-131-49/+39
| | | | | | | | Use Error in InstrProf and Coverage, NFC" This reverts commit r269462. It fails two llvm-profdata tests. llvm-svn: 269466
* [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-131-39/+49
| | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269462
* Remove runtime specific code from common headerXinliang David Li2016-05-131-42/+33
| | | | llvm-svn: 269384
* [ProfileData] Assert NoError in InstrProfTestVedant Kumar2016-05-031-44/+44
| | | | | | | | | Check for success values in the InstrProfTest unit test file. This is part of a series of patches to transition ProfileData over to the stricter Error/Expected interface. llvm-svn: 268402
* Fix some spelling mistakesDavid Majnemer2016-04-221-1/+1
| | | | llvm-svn: 267112
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-141-2/+3
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* Fix asan test failureXinliang David Li2016-04-101-0/+2
| | | | llvm-svn: 265891
* [PGO] Fix deserialize bug Xinliang David Li2016-04-101-0/+40
| | | | | | | | | | Raw function pointer collected by value profile data may be from external functions that are not instrumented. They won't have mapping data to be used by the deserializer. Force the value to be 0 in this case. llvm-svn: 265890
* Clean up test caseXinliang David Li2016-04-101-40/+36
| | | | llvm-svn: 265887
* [PGO] Use ArrayRef in annotateValueSite()Rong Xu2016-03-301-1/+2
| | | | | | | | | Using ArrayRef in annotateValueSite's parameter instead of using an array and it's size. Differential Revision: http://reviews.llvm.org/D18568 llvm-svn: 264879
* Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). What's changed since the original commit? - I fixed up the covmap-V2 binary format tests using a linux VM. - I weakened the CHECK lines in instrprof-comdat.h to account for the fact that there have been bugfixes to clang coverage. These will be fixed up in a follow-up. - I added an assert to make sure we don't get bitten by this again. - I constructed the c-general.profraw file without name compression enabled to appease some bots. Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264658
* Revert "Reapply "[PGO] Fix name encoding for ObjC-like functions""Vedant Kumar2016-03-281-2/+2
| | | | | | | This reverts commit r264641 to investigate why c-general.test is failing on the bots. llvm-svn: 264643
* Reapply "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). This reverts the revert commit beaf3d18. What's changed? - I fixed up the covmap-V2 binary format tests using a linux VM. - I updated the expected counts in instrprof-comdat.h to account for the fact that there have been bugfixes to clang coverage. - I added an assert to make sure we don't get bitten by this again. Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264641
* Revert "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-281-2/+2
| | | | | | | | | This reverts commit r264587. Reverting to investigate 6 unexpected failures on the ppc bot: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2822 llvm-svn: 264590
* [PGO] Fix name encoding for ObjC-like functionsVedant Kumar2016-03-281-2/+2
| | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264587
* [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-181-0/+14
| | | | | | 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-031-0/+1
| | | | llvm-svn: 262674
* Metadata support for profile summary.Easwaran Raman2016-03-011-20/+32
| | | | | | | | 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 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-291-16/+47
| | | | | | | | | | 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
* 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
OpenPOWER on IntegriCloud