diff options
author | Peilin Guo <guopeilin1@huawei.com> | 2021-05-07 16:05:50 +0800 |
---|---|---|
committer | Peilin Guo <guopeilin1@huawei.com> | 2021-05-07 16:05:50 +0800 |
commit | 911a541620bcc78e637589b8623d94b8f3cdafba (patch) | |
tree | 38746ccd83db5c58f51380f475c01e3f0190ff17 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 9deb7eeaf76c3285b72ce75d30fcade63b96e2dc (diff) | |
download | llvm-911a541620bcc78e637589b8623d94b8f3cdafba.zip llvm-911a541620bcc78e637589b8623d94b8f3cdafba.tar.gz llvm-911a541620bcc78e637589b8623d94b8f3cdafba.tar.bz2 |
[LazyValueInfo] Insert an Overdefined placeholder to prevent infinite recursion
getValueFromCondition() uses a Visited set to record the intermediate value.
However, it uses a postorder way to compute the value first and update the
Visited set later. Thus it will be trapped into an infinite recursion if there
exists IRs that use no dominated by its def as in this example:
%tmp3 = or i1 undef, %tmp4
%tmp4 = or i1 undef, %tmp3
To prevent this, we can insert an Overdefined placeholder into the set
before computing the actual value.
Reviewed by: nikic
Differential Revision: https://reviews.llvm.org/D101273
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions