diff options
author | Bob Wilson <bob.wilson@apple.com> | 2014-03-25 23:26:31 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2014-03-25 23:26:31 +0000 |
commit | 0ed74d9634f40d1069df1cebb7e7c45c83a37151 (patch) | |
tree | 202a8094b1a5cf1c4c840f473fc0c0224a92bc85 /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | 3a485fba1f660ef3c127b83fd28cbe67f5777493 (diff) | |
download | bcm5719-llvm-0ed74d9634f40d1069df1cebb7e7c45c83a37151.tar.gz bcm5719-llvm-0ed74d9634f40d1069df1cebb7e7c45c83a37151.zip |
[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.
llvm-svn: 204767
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
0 files changed, 0 insertions, 0 deletions