[PATCH] Loop Versioning for LICM

Nema, Ashutosh Ashutosh.Nema at amd.com
Tue Jun 23 09:58:20 PDT 2015


Thanks Charlie for looking into this.

Yes, these functions can be moved to a utility, soon will come up with a patch.

Regards,
Ashutosh

-----Original Message-----
From: Charlie Turner [mailto:charlie.turner at arm.com] 
Sent: Tuesday, June 23, 2015 4:15 AM
To: Nema, Ashutosh; anemet at apple.com; hfinkel at anl.gov; listmail at philipreames.com
Cc: charlie.turner at arm.com; javed.absar at arm.com; silviu.baranga at arm.com; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Loop Versioning for LICM

In addition to some dups you already noticed in `LoopVectorize`, I spotted a few more on my initial scan.


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:99
@@ +98,3 @@
+/// pointer.
+static unsigned getGEPInductionOperand(const GetElementPtrInst *Gep) {
+  unsigned LastOperand = Gep->getNumOperands() - 1;
----------------
This is duplicated from LoopVectorize.

================
Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:179
@@ +178,3 @@
+/// pointer to the Value, or null otherwise.
+static Value *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
+  const PointerType *PtrTy = dyn_cast<PointerType>(Ptr->getType());
----------------
Duplicate in LoopVectorize.

================
Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:338
@@ +337,3 @@
+/// \brief Collects stride access from a given value.
+void LoopVersioningLICM::collectStridedAccess(Value *MemAccess) {
+  Value *Ptr = nullptr;
----------------
Almost identical to the one in LoopVectorize.

http://reviews.llvm.org/D9151

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






More information about the llvm-commits mailing list