[PATCH] D10835: getStrideFromPointer and its helper function from LoopVectorize moved to VectorUtils

Nema, Ashutosh Ashutosh.Nema at amd.com
Thu Jul 2 21:11:04 PDT 2015


Thanks Hal. 
I'll incorporate these comments and soon come up with a new patch.

Regards,
Ashutosh

-----Original Message-----
From: hfinkel at anl.gov [mailto:hfinkel at anl.gov] 
Sent: Friday, July 03, 2015 4:33 AM
To: Nema, Ashutosh; charlie.turner at arm.com; dblaikie at gmail.com; listmail at philipreames.com
Cc: hfinkel at anl.gov; david.majnemer at gmail.com; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] D10835: getStrideFromPointer and its helper function from LoopVectorize moved to VectorUtils

hfinkel added a subscriber: hfinkel.

================
Comment at: include/llvm/Analysis/VectorUtils.h:65
@@ +64,3 @@
+
+/// \brief Remove GEPs whose indices but the last one are loop invariant and
+/// return the induction operand of the gep pointer.
----------------
I don't understand this comment.

Looking at the implementation, this function returns its first argument. If the argument is a GEP, then it normally returns the operand identified by getGEPInductionOperand. However, if there is some other non-loop-invariant operand, it returns that instead.


================
Comment at: include/llvm/Analysis/VectorUtils.h:69
@@ +68,3 @@
+
+/// \brief Look for a cast use of the passed value.
+Value *getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty);
----------------
a case use -> a unique case use, or better, just say:

  If a value has only one user that is a CastInst, return it.


================
Comment at: include/llvm/Analysis/VectorUtils.h:74
@@ +73,3 @@
+/// Looks for symbolic strides "a[i*stride]". Returns the symbolic stride as a
+/// pointer to the Value, or null otherwise.
+Value *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp);
----------------
Don't need to say 'a pointer to', Values are always passed by pointer.



rL LLVM

http://reviews.llvm.org/D10835







More information about the llvm-commits mailing list