summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-03-25 23:26:31 +0000
committerBob Wilson <bob.wilson@apple.com>2014-03-25 23:26:31 +0000
commit70f12c60afd1c3fdf2dd8718f734fd06646bf588 (patch)
tree15b387165c44275ba8dbc5f7e096c451caa9b8a3 /lib/CodeGen/CGExpr.cpp
parent0733650b60a57b9fab2e1d8b3f26613fd4f46c53 (diff)
downloadclang-70f12c60afd1c3fdf2dd8718f734fd06646bf588.tar.gz
clang-70f12c60afd1c3fdf2dd8718f734fd06646bf588.tar.bz2
clang-70f12c60afd1c3fdf2dd8718f734fd06646bf588.tar.xz
[PGO] Add simplified branch weights for Objective-C for-collection loops.
Conceptually one of these loops is just a while-loop, but the actual code-gen is more complicated. We don't instrument all the different control flow edges to get accurate counts for each conditional branch, nor do I think it makes sense to do so. Instead, make the simplifying assumption that the loop behaves like a while-loop. Use the same branch weights for the first check for an empty collection as would be used for the back-edge of a while loop, and use that same weighting for the innermost loop, ignoring the possibility that there may be some extra code to go fetch more elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions