diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-02-22 09:53:32 +0100 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-02-22 10:02:37 +0100 |
| commit | f8d72100323b127b39fed5f5890b86d81b8a0335 (patch) | |
| tree | 97ac4757c47d662ad5bfefa1d8f470aa1a39778a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 48dc980847b25384511276e37c02c7edcf9e3d3a (diff) | |
[GlobalStatus] Keep Visited set in isSafeToDestroyConstant()
Constants cannot be cyclic, but they can be tree-like. Keep a
visited set to ensure we do not degenerate to exponential run-time.
This fixes the problem reported in https://reviews.llvm.org/D117223#3335482,
though I haven't been able to construct a concise test case for
the issue. This requires a combination of dead constants and the
kind of constant expression tree that textual IR cannot represent
(because the textual representation, unlike the in-memory
representation, is also exponential in size).
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
