[PATCH] D83640: [PredicateInfo] Add a common method to interpret predicate as cmp constraint
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 10:38:17 PDT 2020
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
> (it would be nice to drop the PredicateBase/PredicateWithCondition split ... I saw you had a patch for that).
Yes, I have to dig it up again...
================
Comment at: llvm/include/llvm/Transforms/Utils/PredicateInfo.h:106
+ /// Pred/OtherOp if successful, otherwise returns false.
+ bool getAsCmp(CmpInst::Predicate &Pred, Value *&OtherOp) const;
+
----------------
How about returning `Optional<std::pair<CmpInst::Predicate &, Value *>>`? That would seem more explicit to me , but its mostly personal preference I think :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83640/new/
https://reviews.llvm.org/D83640
More information about the llvm-commits
mailing list