Files
clang-p2996/llvm/lib/Analysis/GuardUtils.cpp
Aleksandr Popov d6e7c162e1 [NFC][GuardUtils] Add util to extract widenable conditions
This is the next preparation patch to support widenable conditions
widening instead of branches widening.

We've added parseWidenableGuard util which parses guard condition and
collects all checks existing in the expression tree: D157276

Here we are adding util which walks similar way through the expression
tree but looks up for widenable condition without collecting the checks.
Therefore llvm::extractWidenableCondition could parse widenable branches
with arbitrary position of widenable condition in the expression tree.

llvm::parseWidenableBranch which is we are going to get rid of is being
replaced by llvm::extractWidenableCondition where it's possible.

Reviewed By: anna

Differential Revision: https://reviews.llvm.org/D157529
2023-08-18 17:36:05 +02:00

5.1 KiB