[PATCH] D158317: [IR] Add SturcturalHash printer pass

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 11:57:59 PDT 2023


nikic added a comment.

In D158317#4611182 <https://reviews.llvm.org/D158317#4611182>, @aidengrossman wrote:

> In D158317#4611131 <https://reviews.llvm.org/D158317#4611131>, @nikic wrote:
>
>> It would probably make sense to move your existing unit test coverage over to the printer pass.
>
> I think it would be difficult to express a lot of the `StructuralHash` test cases as lit style tests. A lot of the functionality that is tested is whether or not hashes are different for two slightly different functions rather than their exact values which is very feasible to do in a unit test and possible to do in a lit test but a little bit less elegant (more test churn if the StructuralHash implementation changes, dealing with 32/64-bit differences) I would think. Maybe I'm missing something though?

That's a good point, but ... what's the point of this pass if we can't use it for testing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158317



More information about the llvm-commits mailing list