diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-08-26 17:06:03 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-08-26 20:20:41 +0300 |
commit | 95848ea101274b8bd774c63bad55f21a08080705 (patch) | |
tree | a2c6a519a7a0d9bfb3a8ca94ac581e7f334bb762 /clang/lib/AST/DeclBase.cpp | |
parent | c07a430bd39cccb64712ddcba85254a5bb1cd89b (diff) | |
download | llvm-95848ea101274b8bd774c63bad55f21a08080705.zip llvm-95848ea101274b8bd774c63bad55f21a08080705.tar.gz llvm-95848ea101274b8bd774c63bad55f21a08080705.tar.bz2 |
[Value][InstCombine] Fix one-use checks in PHI-of-op -> Op-of-PHI[s] transforms to be one-user checks
As FIXME said, they really should be checking for a single user,
not use, so let's do that. It is not *that* unusual to have
the same value as incoming value in a PHI node, not unlike
how a PHI may have the same incoming basic block more than once.
There isn't a nice way to do that, Value::users() isn't uniqified,
and Value only tracks it's uses, not Users, so the check is
potentially costly since it does indeed potentially involes
traversing the entire use list of a value.
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
0 files changed, 0 insertions, 0 deletions