diff options
author | Max Kazantsev <max.kazantsev@azul.com> | 2018-08-06 05:49:19 +0000 |
---|---|---|
committer | Max Kazantsev <max.kazantsev@azul.com> | 2018-08-06 05:49:19 +0000 |
commit | eded4abef8ddaca246ad21f3f79a9555a0c27333 (patch) | |
tree | cb7efab135ca2da7b79c32906852266589e21898 /lldb/source/Utility/ConstString.cpp | |
parent | 77931caec5cfdabc5155e5a6d0200b5ff46cf889 (diff) | |
download | bcm5719-llvm-eded4abef8ddaca246ad21f3f79a9555a0c27333.tar.gz bcm5719-llvm-eded4abef8ddaca246ad21f3f79a9555a0c27333.zip |
[GuardWidening] Widen guards with conditions of frequently taken dominated branches
If there is a frequently taken branch dominated by a guard, and its condition is available
at the point of the guard, we can widen guard with condition of this branch and convert
the branch into unconditional:
guard(cond1)
if (cond2) {
// taken in 99.9% cases
// do something
} else {
// do something else
}
Converts to
guard(cond1 && cond2)
// do something
Differential Revision: https://reviews.llvm.org/D49974
Reviewed By: reames
llvm-svn: 338988
Diffstat (limited to 'lldb/source/Utility/ConstString.cpp')
0 files changed, 0 insertions, 0 deletions