[PATCH] [LAA] Fix estimation of number of memchecks

Michael Zolotukhin mzolotukhin at apple.com
Wed Jun 3 11:14:22 PDT 2015


A minor comment inline:


================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1132-1136
@@ -1129,6 +1131,7 @@
   // to place a runtime bound check.
-  bool CanDoRT = false;
-  if (NeedRTCheck)
-    CanDoRT = Accesses.canCheckPtrAtRT(PtrRtCheck, NumComparisons, SE, TheLoop,
-                                       Strides);
+  bool CanDoRT = NeedRTCheck ?
+                     Accesses.canCheckPtrAtRT(PtrRtCheck,
+                                              NumComparisons,
+                                              SE, TheLoop,
+                                              Strides) : true;
 
----------------
Would it be more readable if we write this as
```
CanDoRt = !NeedRTCheck || canCheckPtrAtRT(...)
```
?

http://reviews.llvm.org/D10217

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






More information about the llvm-commits mailing list