[PATCH] D47143: [InstrSimplify, NewGVN] Add option to ignore metadata when simplifying.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 25 13:07:32 PDT 2018


fhahn added a comment.

In https://reviews.llvm.org/D47143#1174501, @efriedma wrote:

> Is this supposed to apply specifically to metadata, or just anything that NewGVN doesn't consider while numbering?  Some InstSimplify transforms check, for example, nsw.


I think we cannot use anything for simplification that's not available for all members of a congruence class. Thanks for pointing me to nsw, I'll have a look and see how to best generalize this.

> You need to make sure you don't call into other places that might query metadata.  It looks like you caught isKnownNonEqual/isKnownNonZero, but there's also computeKnownBits and isKnownToBeAPowerOfTwo.

Ah yes thanks! Unfortunately there's quite a big set of functions to cover. If this kind of interface makes sense, I'll take another close look.


https://reviews.llvm.org/D47143





More information about the llvm-commits mailing list