[PATCH] [LAA] Fix estimation of number of memchecks
    silviu.baranga at arm.com 
    silviu.baranga at arm.com
       
    Thu Jun  4 08:42:28 PDT 2015
    
    
  
================
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;
 
----------------
mzolotukhin wrote:
> Would it be more readable if we write this as
> ```
> CanDoRt = !NeedRTCheck || canCheckPtrAtRT(...)
> ```
> ?
Yes, that looks better. I've included the change in the new revision.
http://reviews.llvm.org/D10217
EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
    
    
More information about the llvm-commits
mailing list