diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-21 21:26:30 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-23 20:32:57 +0200 |
commit | 9394c3ec881a974afe679467f79a891548eadb89 (patch) | |
tree | d8a6a8c985651926541b0059ced20eb47af564b0 /llvm/lib/Support/UnicodeCaseFold.cpp | |
parent | d2b8fcff3446a9367472e338e44ecba9daf1e101 (diff) | |
download | llvm-9394c3ec881a974afe679467f79a891548eadb89.zip llvm-9394c3ec881a974afe679467f79a891548eadb89.tar.gz llvm-9394c3ec881a974afe679467f79a891548eadb89.tar.bz2 |
[SCCP] Directly remove non-feasible edges
Non-feasible control-flow edges are currently removed by replacing
the branch condition with a constant and then calling
ConstantFoldTerminator. This happens in a rather roundabout manner,
by inspecting the users (effectively: predecessors) of unreachable
blocks, and further complicated by the need to explicitly materialize
the condition for "forced" edges. I would like to extend SCCP to
discard switch conditions that are non-feasible based on range
information, but this is incompatible with the current approach
(as there is no single constant we could use.)
Instead, this patch explicitly removes non-feasible edges. It
currently only needs to handle the case where there is a single
feasible edge. The llvm_unreachable() branch will need to be
implemented for the aforementioned switch improvement.
Differential Revision: https://reviews.llvm.org/D84264
Diffstat (limited to 'llvm/lib/Support/UnicodeCaseFold.cpp')
0 files changed, 0 insertions, 0 deletions