[PATCH] D63305: Propagate Trip count Assumptions to runtime check

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 17:59:09 PDT 2019


Meinersbur added inline comments.


================
Comment at: lib/Analysis/ScopInfo.cpp:204
+             cl::desc("Propagate parameter restrictions form Trip count"
+                      " assumptions to overflow and alaias checks"),
+             cl::Hidden, cl::ZeroOrMore, cl::init(false),
----------------
[typo] alaias


================
Comment at: test/ScopDetect/model-dowhile-update-rtc.ll:29
+
+; NOFIXTRC: Invalid Context:
+; NOFIXRTC:  p_0 < 0
----------------
[typo] NIFIXTRC


================
Comment at: test/ScopDetect/model-dowhile-update-rtc.ll:33
+; NOFIXRTC: [p_0] -> {  : -2147483648 <= p_0 <= 2147483647 }
+; NOFIXRTC: if (p_0 >= 5 && 0 == (p_0 <= -1 || p_0 == 2147483647) && (&MemRef0[p_0 + 1] <= &MemRef1[5] || &MemRef1[p_0 + 1] <= &MemRef0[5]))
+
----------------
`p_0 >= 5 && !(p_0 <= -1 || p_0 == 2147483647)` is equivalent to `p_0 >= 5 && p_0 > -1 && p_0 != 2147483647` which could be simplified to `p_0 >= 5 && p_0 != 2147483647`, ie the FIXRTC case. I guess this is a consequence of having split `InvalidContext` and `AssumedContext` to avoid a `complement()`.

I'd prefer some more intelligent treatment of the `InvalidContext` and `AssumedContext` handling over special handling of `UPPERBOUND` assumptions.

The `buildMinMaxAccess` change is not reflected in this test case.



Repository:
  rPLO Polly

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

https://reviews.llvm.org/D63305





More information about the llvm-commits mailing list