[PATCH] D106423: [Attributor] Force simplication callback updates

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 21 08:16:30 PDT 2021


jdoerfert added a comment.

The force update stuff does only work for one level but not more. So an AA depending on one that was forcefully updated is still going to see inconsistent values.
To really solve the issue we need to clear the state in aavaluesimplify (and friends) at the beginning of the update.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:662
+    if (*SimplifiedV && isa<Constant>(*SimplifiedV))
       return cast<Constant>(*SimplifiedV);
   }
----------------
Same as below you have to give up and not fallback to aavaluesimplify.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:703
+      return SimplifiedV;
+    }
   }
----------------
I think we just have to return `SimplifiedV` and be done with it. Fallback to AAValueSimplify is what can cause problems and inconsistencies.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106423



More information about the llvm-commits mailing list