[PATCH] D69686: [LVI][CVP] Use block value in getPredicateAt()

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 09:42:01 PST 2019


reames added a comment.

Can you give some context on the problem you're trying to solve?  This doesn't look quite right, but maybe with some context I can make a suggestion as to how to approach cleanly?



================
Comment at: llvm/lib/Analysis/LazyValueInfo.cpp:1865
+
+  // The getValueInBlock() result is valid anywhere in the block for non-pointer
+  // types. For pointer types, it will additionally take into account pointer
----------------
Wait, no, please don't do this.  Please don't bake in assumption about the semantics of the function based on the type of the argument.  If this difference exists, we should fix/remove it.  

I've long thought we needed to have a getValueAtBegin(BB) variant.  Would that solve your use case?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69686





More information about the llvm-commits mailing list