[PATCH] D54892: [LAA] Avoid generating RT checks for known deps preventing vectorization.

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 27 09:02:08 PST 2018


anemet added inline comments.


================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:212
+  bool shouldRetryWithRuntimeCheck() {
+    return RuntimeChecksFeasible && ShouldRetryWithRuntimeCheck;
+  }
----------------
fhahn wrote:
> anemet wrote:
> > What is the actual semantical difference between RuntimeChecksFeasible and ShouldRetryWithRuntimeCheck?
> > 
> > In other words, can't we just clear ShouldRetryWithRuntimeCheck when we see an unsafe known dep?
> At the moment, they refer to slightly different things: RuntimeChecksFeasible is true iff we did not find any dependences making RT ineffective, ShouldRetryWithRuntimeChecks is true iff we encountered an unknown dependence where RT checks might help. Additionally we only set ShouldRetryWithRuntimeChecks for some Unknown dependences. The reason I went with an additional flag was that it seemed easier to see what is going on.
> 
> Currently clearing ShouldRetryWithRuntimeCheck would not be enough I think, because we keep checking dependences and we could set ShouldRetryWithRuntimeChecks again for later dependences. Changing the code to bail out early would help (see discussion below)
> 
> 
Even then I would prefer a single three-state value rather than a two booleans, e.g. something like: true, false and unfeasible/failed or some such.


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

https://reviews.llvm.org/D54892





More information about the llvm-commits mailing list