[PATCH] D14296: [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 02:00:25 PST 2015


sbaranga added a comment.

In http://reviews.llvm.org/D14296#288608, @anemet wrote:

> You guys lost me at this point.  AIUI, SE->getSCEV(value) returns the SCEV without any assumptions.  PSE->getSCEV(value) returns a SCEV with the assumption backed in.  The only problem I can see is when the latter is used without run-time guarding it with the corresponding predicate.   What am I missing, how is LLE potentially broken?


LLE is not broken, but introducing some new SCEV predicates might break it.

There are some places where it should do PSE->getSCEV(Value) instead of SE->getValue().  To be more specific, in isDependenceDistanceOfOne we assume that pointers from a forward/backward dependence are AddRecExprs when we query SCEV directly. However, with predicates, they might not be. I expect this might trigger an assert in some cases after we introduce predicates for overflows. So before introducing the new predicates, we have to change LLE to use PSE there.


http://reviews.llvm.org/D14296





More information about the llvm-commits mailing list