summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData
Commit message (Collapse)AuthorAgeFilesLines
...
* Profile summary cleanup.Easwaran Raman2016-03-281-5/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D18468 llvm-svn: 264619
* [PGO] Comment how function pointers for indirect calls are mapped to ↵Adam Nemet2016-03-281-0/+3
| | | | | | | | | | | | | | | | 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
* 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
* [Coverage] Strip <unknown> from PGO names if no filenames are availableVedant Kumar2016-03-282-2/+4
| | | | | | Patch suggested by David Li! llvm-svn: 264586
* [Coverage] Fix the way we load "<unknown>:func" recordsVedant Kumar2016-03-281-1/+1
| | | | | | | | | 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
* Variable name cleanup /NFCXinliang David Li2016-03-161-5/+6
| | | | llvm-svn: 263666
* [ProfileData] Make a utility method public, NFCVedant Kumar2016-03-161-2/+2
| | | | | | | | | | | The swift frontend needs to be able to look up PGO function name variables based on the original raw function name. That's because it's not possible to create PGO function name variables while emitting swift IR. Instead, we have to create the name variables while lowering swift IR to llvm IR, at which point we fix up all calls to the increment intrinsic to point to the right name variable. llvm-svn: 263662
* Move global ID computation from Function to GlobalValue (NFC)Teresa Johnson2016-03-151-1/+1
| | | | | | | | Since the static getGlobalIdentifier and getGUID methods are now called for global values other than functions, reflect that by moving these methods to the GlobalValue class. llvm-svn: 263524
* Use LineLocation instead of CallsiteLocation to index callsite profile.Dehao Chen2016-03-033-40/+24
| | | | | | | | | | | | 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
* Fix some warnings a bit harder/differentDavid Blaikie2016-03-011-2/+0
| | | | | | | This is an alternate fix to 262378 and a fix to a pessimizing-move warning. llvm-svn: 262390
* Fix -Wnon-virtual-dtor warningsReid Kleckner2016-03-011-0/+2
| | | | llvm-svn: 262378
* Fix breakage caused by r262360.Easwaran Raman2016-03-011-0/+1
| | | | llvm-svn: 262363
* Metadata support for profile summary.Easwaran Raman2016-03-011-2/+239
| | | | | | | | 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 prefix based function layout when profile is available.Dehao Chen2016-02-231-0/+20
| | | | | | | | | | | | Summary: If a function is hot, put it in text.hot section. Reviewers: davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17532 llvm-svn: 261607
* Revert "Add prefix based function layout when profile is available."Duncan P. N. Exon Smith2016-02-231-21/+0
| | | | | | | | This reverts commit r261582, since this bot has been broken for four hours: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/19399/ llvm-svn: 261604
* Add prefix based function layout when profile is available.Dehao Chen2016-02-221-0/+21
| | | | | | | | | | | | Summary: If a function is hot, put it in text.hot section. Reviewers: davidxl Subscribers: eraman, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D17460 llvm-svn: 261582
* Add profile summary support for sample profile.Easwaran Raman2016-02-195-9/+128
| | | | | | Differential Revision: http://reviews.llvm.org/D17178 llvm-svn: 261304
* Add a profile summary class specific to instrumentation profiles.Easwaran Raman2016-02-173-23/+34
| | | | | | | | | 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/+7
| | | | | | | | | 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-2/+3
| | | | | | | | | | 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] Differentiate Clang instrumentation and IR level instrumentation profilesRong Xu2016-02-102-6/+30
| | | | | | | | | | | | | | | | | | | | 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
* Refactor PGO function naming and MD5 hashing support out of ProfileDataTeresa Johnson2016-02-091-19/+1
| | | | | | | | | | | | | | | | | | | | Summary: Move the function renaming logic into the Function class, and the MD5Hash routine into the MD5 header. This will enable these routines to be shared with ThinLTO, which will be changed to store the MD5 hash instead of full function name in the combined index for significant size reductions. And using the same function naming for locals in the function index facilitates future integration with indirect call value profiles. Reviewers: davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17006 llvm-svn: 260197
* [PGO] Revert r260146 as it breaks Darwin platforms.Rong Xu2016-02-082-30/+6
| | | | | | | 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
* [PGO] Differentiate Clang instrumentation and IR level instrumentation profilesRong Xu2016-02-082-6/+30
| | | | | | | | | | | | | | 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
* [PGO] Enable compression in pgo instrumentationXinliang David Li2016-02-082-9/+9
| | | | | | | | | | | | 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
* Move classes defined in a cpp file into an anonymous namespace.Benjamin Kramer2016-02-051-0/+2
| | | | | | No functionality change intended. llvm-svn: 259883
* Function name change /NFCXinliang David Li2016-02-041-2/+2
| | | | llvm-svn: 259851
* 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
OpenPOWER on IntegriCloud