aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-08-26 17:06:03 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-08-26 20:20:41 +0300
commit95848ea101274b8bd774c63bad55f21a08080705 (patch)
treea2c6a519a7a0d9bfb3a8ca94ac581e7f334bb762 /clang/lib/AST/DeclBase.cpp
parentc07a430bd39cccb64712ddcba85254a5bb1cd89b (diff)
downloadllvm-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