[PATCH] [SCEV] make SCEV smarter about proving no-wrap.

Andrew Trick atrick at apple.com
Tue Mar 3 14:24:54 PST 2015


The logic is great. But we really need to determine whether computing SCEV for each recurrence 5 times is worthwhile. Please do some compile time experiments where SCEV is taking more time than usual to find out how much worse this makes it.

Why did you do this rather than checking SCEV's for existing phis? (I realize this is strictly better, but I'm curious about your motivation given that this is potentially a lot of extra work)


================
Comment at: lib/Analysis/ScalarEvolution.cpp:1332-1333
@@ +1331,4 @@
+//
+// A motivating example for this rule: if we know `{0,+,4}` is `ult` `-1` and it
+// does not itself wrap then we can conclude that `{1,+,4}` is `nuw`.
+//
----------------
I would like better comments here. It should show the formula.

e.g.

{start - delta,+,step} ult (INT_MAX - delta)

http://reviews.llvm.org/D7980

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list