aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WindowsResource.cpp
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2017-06-19 18:48:58 +0000
committerTaewook Oh <twoh@fb.com>2017-06-19 18:48:58 +0000
commit9083547ae317b7ddf604a5bedac994cb392bb887 (patch)
tree80e0fbb6ef216a20c498ed99f511d4033a5585d6 /llvm/lib/Object/WindowsResource.cpp
parent162b40a85006f76e916225a7433a8194ae13c53b (diff)
downloadllvm-9083547ae317b7ddf604a5bedac994cb392bb887.zip
llvm-9083547ae317b7ddf604a5bedac994cb392bb887.tar.gz
llvm-9083547ae317b7ddf604a5bedac994cb392bb887.tar.bz2
Improve profile-guided heuristics to use estimated trip count.
Summary: Existing heuristic uses the ratio between the function entry frequency and the loop invocation frequency to find cold loops. However, even if the loop executes frequently, if it has a small trip count per each invocation, vectorization is not beneficial. On the other hand, even if the loop invocation frequency is much smaller than the function invocation frequency, if the trip count is high it is still beneficial to vectorize the loop. This patch uses estimated trip count computed from the profile metadata as a primary metric to determine coldness of the loop. If the estimated trip count cannot be computed, it falls back to the original heuristics. Reviewers: Ayal, mssimpso, mkuper, danielcdh, wmi, tejohnson Reviewed By: tejohnson Subscribers: tejohnson, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D32451 llvm-svn: 305729
Diffstat (limited to 'llvm/lib/Object/WindowsResource.cpp')
0 files changed, 0 insertions, 0 deletions