summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SampleProfile.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Sample Profiles - Adjust integer types. Mostly NFC.Diego Novillo2015-10-151-22/+29
| | | | | | | | | | | | | | This adjusts all integers in the reader/writer to reflect the types stored on profile files. They should all be unsigned 32-bit or 64-bit values. Changed all associated internal types to be uint32_t or uint64_t. The only place that needed some adjustments is in the sample profile transformation. Altough the weight read from the profile are 64-bit values, the internal API for branch weights only accepts 32-bit values. The pass now saturates weights that overflow uint32_t. llvm-svn: 250427
* Make HeaderLineno a local variable.Dehao Chen2015-10-091-12/+8
| | | | | | | | http://reviews.llvm.org/D13576 As we are using hierarchical profile, there is no need to keep HeaderLineno a member variable. This is because each level of the inline stack will have its own header lineno. One should use the head lineno of its own inline stack level instead of the actual symbol. llvm-svn: 249848
* Update sample profile propagation algorithm.Dehao Chen2015-10-011-24/+14
| | | | | | http://reviews.llvm.org/D13218 llvm-svn: 248968
* http://reviews.llvm.org/D13145Dehao Chen2015-09-301-1/+125
| | | | | | Support hierarachical sample profile format. llvm-svn: 248865
* http://reviews.llvm.org/D13231Dehao Chen2015-09-291-46/+54
| | | | | | Change lookup functions to const functions. llvm-svn: 248818
* Revert r248810 which breaks tests.Dehao Chen2015-09-291-3/+2
| | | | llvm-svn: 248814
* http://reviews.llvm.org/D13231Dehao Chen2015-09-291-2/+3
| | | | | | Change lookup functions to const functions. llvm-svn: 248810
* Fix memory leak in sample profile pass.Diego Novillo2015-08-261-28/+23
| | | | | | | | | | | | | | | | The problem here were the function analyses invoked by the function pass manager from the new IPO pass. I looked at other IPO passes needing dominance information and the only one that requires it (partial inliner) does not use the standard dependency mechanism. This patch mimics what the partial inliner does to compute dominance, post-dominance and loop info. One thing I like about this approach is that I can delay the computation of all this until I actually need it. This should bring the ASAN buildbot back to green. If there's a better way to fix this, I'll do it in a follow-up patch. llvm-svn: 246066
* Convert SampleProfile pass into a Module pass.Diego Novillo2015-08-251-0/+794
Eventually, we will need sample profiles to be incorporated into the inliner's cost models. To do this, we need the sample profile pass to be a module pass. This patch makes no functional changes beyond the mechanical adjustments needed to run SampleProfile as a module pass. llvm-svn: 245940
OpenPOWER on IntegriCloud