[PATCH] D12905: [SCEV][LV] Introduce SCEV Predicates and use them to re-implement stride versioning

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 09:51:06 PDT 2015


anemet added inline comments.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:8911
@@ +8910,3 @@
+
+struct SCEVPredicateRewriter
+    : public SCEVVisitor<SCEVPredicateRewriter, const SCEV *> {
----------------
sbaranga wrote:
> anemet wrote:
> > Should probably be a class since not all members are public.
> > 
> > Also it needs a comment.
> > 
> > This may be a silly question but why we need to override all these members?
> I think because SCEVVisitor is a template that uses the visit* methods without defining them, users must define all the methods (or get a compilation error). Not really nice.
> 
> I'll make the changes (add a comment and convert to a class).
> I think because SCEVVisitor is a template that uses the visit* methods without defining them, users must define all the methods (or get a compilation error). Not really nice.

Can this be derived from SCEVParameterRewriter since we only support the equality predicate right now?  Then we can extend it later as we add the other predicates.



http://reviews.llvm.org/D12905





More information about the llvm-commits mailing list