[PATCH] D15177: [LoopVectorizer] Refine loop vectorizer's register usage calculator by ignoring specific instructions.

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 22:10:04 PST 2015


congh created this revision.
congh added reviewers: hfinkel, spatel, RKSimon, davidxl.
congh added a subscriber: llvm-commits.

LoopVectorizationCostModel::calculateRegisterUsage() is used to estimate the register usage for specific VFs. However, it takes into account many instructions that won't be vectorized, such as induction variables, GetElementPtr instruction, etc.. This makes the loop vectorizer too conservative when choosing VF. In this patch, the induction variables that won't be vectorized plus GetElementPtr instruction will be added to ValuesToIgnore set so that their register usage won't be considered any more.

http://reviews.llvm.org/D15177

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll
  test/Transforms/LoopVectorize/reg-usage.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15177.41718.patch
Type: text/x-patch
Size: 8678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/93581aa9/attachment.bin>


More information about the llvm-commits mailing list