[PATCH] D11892: LoopVersioning: Use default LAA runtimeCheck, When input check not provided.

Nema, Ashutosh via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 19:47:55 PDT 2015


Sure Adam, will update it.

Thanks,
Ashutosh

-----Original Message-----
From: Adam Nemet [mailto:anemet at apple.com] 
Sent: Tuesday, August 11, 2015 5:11 AM
To: Nema, Ashutosh; anemet at apple.com
Cc: llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D11892: LoopVersioning: Use default LAA runtimeCheck, When input check not provided.

anemet added inline comments.

================
Comment at: include/llvm/Transforms/Utils/LoopVersioning.h:33-37
@@ -32,7 +32,7 @@
 class LoopVersioning {
 public:
-  LoopVersioning(SmallVector<RuntimePointerChecking::PointerCheck, 4> Checks,
-                 const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI,
-                 DominatorTree *DT,
-                 const SmallVector<int, 8> *PtrToPartition = nullptr);
+  LoopVersioning(
+      const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI, DominatorTree *DT,
+      SmallVector<RuntimePointerChecking::PointerCheck, 4> *Checks = nullptr,
+      const SmallVector<int, 8> *PtrToPartition = nullptr);
 
----------------
How about adding another constructor that does not take Checks instead?  Then you should be able to initialize Checks with LAI.getRuntimePointerChecking()->getChecks().

I like the fact that LoopVersioning owns the checks.  That keeps things simple.


Repository:
  rL LLVM

http://reviews.llvm.org/D11892





More information about the llvm-commits mailing list