[PATCH] D104734: [llvm-diff] Explicitly check ConstantStructs for differences

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 15:27:24 PDT 2021


void added a comment.

In D104734#2836575 <https://reviews.llvm.org/D104734#2836575>, @rjmccall wrote:

> In D104734#2835045 <https://reviews.llvm.org/D104734#2835045>, @void wrote:
>
>> In D104734#2834999 <https://reviews.llvm.org/D104734#2834999>, @rjmccall wrote:
>>
>>> That should work, thanks.  What's going on with `StructStack`?
>>
>> Structures are the only types which can reference themselves. If I don't stop processing already seen types then it's possible they could infinitely recurse. The stack / std::find code is very hackish. I'm open to suggestions on making it non-gross. :-)
>
> Well, they can't reference themselves as sub-aggregates; you'll never see another field of this exact type.

Doh! Of course. I found the actual problem. A global variable may occur in its own initializer as part of a GEP or bitcast. I added a more sane check. PTAL


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104734/new/

https://reviews.llvm.org/D104734



More information about the llvm-commits mailing list