[PATCH] D111882: [NFC][LoopVectorize] Change getStepVector to take a Value* for the StartIdx

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 07:15:25 PDT 2021


fhahn accepted this revision.
fhahn added a comment.

LGTM, thanks



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1122
 
+Value *getRuntimeVFAsFloat(IRBuilder<> &B, Type *FTy, ElementCount VF) {
+  assert(FTy->isFloatingPointTy() && "Expected floating point type!");
----------------
david-arm wrote:
> fhahn wrote:
> > david-arm wrote:
> > > kmclaughlin wrote:
> > > > Hi @david-arm, could this be merged with getRuntimeVF? Where we create the sitofp if the type passed to the function is a floating point type?
> > > Hi @kmclaughlin, that's a good question! I did this originally with D111873, but one of the reviewers left a comment suggesting it seemed an unusual thing to do.
> > nit: could this be static? and outside the `llvm` namespace?
> Hi @fhahn, I can change this to static easily enough before merging if that's ok? However, for changing the namespace should that be in a separate follow-on patch? The problem is that `getRuntimeVFAsFloat` calls `getRuntimeVF`, which itself is used outside of this file. It would be a bit strange to have one outside the llvm namespace and one inside I think?
Adding the static on the committed version sounds good, thanks!

With respect to moving that also sounds good as potential Followup if it is not straight forward due to the depency. Probably not worth worrying once it is static.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111882/new/

https://reviews.llvm.org/D111882



More information about the llvm-commits mailing list