[PATCH] D135539: llvm-reduce: Don't write out IR to score IR complexity

John Regehr via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 9 10:34:48 PDT 2022


regehr added a comment.

so at some level here we're scoring a test case based on how simple it is for a human being to understand. I mean, that's what we should be doing. from that point of view, I dislike assigning a small cost to poison and undef -- they're probably the most semantically challenging concepts in this entire IR, in terms of the number of compiler bugs they have caused.

I think that fast-math and other flags (especially ones like NSW) should be accounted for here, but if that's left for future work that's OK.

note that there exist some flags where the presence of the flag is semantically simpler than the absence of the flag! for example, a noundef function parameter can make a function considerably easier to understand. that's one of the things I disliked about the previous "file size" approach. could you please add some TODO/FIXME items regarding that sort of thing?

finally I agree that this should be unified with the quite similar code found elsewhere. I don't think that needs to block this pull request, but that's a displeasing kind of redundancy to have in our tool here.


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

https://reviews.llvm.org/D135539



More information about the llvm-commits mailing list