[PATCH] D37638: [IPSCCP] Move common functions to IPOUtils (NFC)

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 13:27:11 PDT 2017


dberlin added a comment.

So, i can't find what the suggestion was, but these are fairly specific to value lattices and don't belong being used by most other things.
There are lattices where they are correct, and lattices where they make no sense.
It's also kinda conservative.

IMHO, these aren't generic enough to want to be used by a lot other things (plus at least one of them would lead to N^2 usage).
They definitely don't belong in something called "IPOUtils", because it implies they should be used broadly.

If you renamed it to ValueLatticeUtils or something, i'd be okay with it.



================
Comment at: lib/Analysis/IPOUtils.cpp:32
+    return false;
+  for (User *U : GV->users()) {
+    if (auto *Store = dyn_cast<StoreInst>(U)) {
----------------
this is just any_of.

It's also super-conservative.



https://reviews.llvm.org/D37638





More information about the llvm-commits mailing list