[PATCH] D83640: [PredicateInfo] Add a common method to interpret predicate as cmp constraint

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 11:50:14 PDT 2020


nikic updated this revision to Diff 278873.
nikic added a comment.

Return Optional<PredicateConstraint>.

What do you think about this variant? Something I have in mind here as a possible followup is to change the way we represent predicates away from storing the raw condition, which has renaming issues we only partially mitigated with RenamedOp, towards storing the PredicateConstraint introduced here directly. This makes sure that we cannot go out of sync between the PredicateInfo construction logic and the retrieval of the condition. (For now all conditions have the form of "cmp", but if needed this could be made polymorphic in the future.)


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

https://reviews.llvm.org/D83640

Files:
  llvm/include/llvm/Transforms/Utils/PredicateInfo.h
  llvm/lib/Transforms/Scalar/NewGVN.cpp
  llvm/lib/Transforms/Scalar/SCCP.cpp
  llvm/lib/Transforms/Utils/PredicateInfo.cpp
  llvm/test/Transforms/SCCP/predicateinfo-cond.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83640.278873.patch
Type: text/x-patch
Size: 13727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200717/a9951967/attachment.bin>


More information about the llvm-commits mailing list