[PATCH] D49746: [WIP][LV][DebugInfo] Set DL to the middle block Icmp instruction

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 16:33:16 PDT 2018


hsaito added a comment.

This is essentially a zero trip check for the remainder loop and from that perspective, the most correct DL we should use would be the one related to trip count computation. InnerLoopVectorizer::getOrCreateTripCount() is where LV computes the trip count of the incoming scalar loop. It uses getBackedgeTakeCount(). As such, strictly speaking, taking the DL from the predicate (i.e., loop bottom test) fed to the loop backedge would make most sense. That would be OrigLoop->getLoopLatch()->getTerminator() to get to the backedge. In a relaxed thinking, however, this is the code executed when we know vector code executes. So, taking DL from VectorPH code isn't too bad. OrigLoop->getStartLoc() could be another viable enough alternative.

Does this make sense to you? Which one would you pick?


Repository:
  rL LLVM

https://reviews.llvm.org/D49746





More information about the llvm-commits mailing list