[llvm] r255691 - [LoopVectorizer] Refine loop vectorizer's register usage calculator by ignoring specific instructions.

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 11:06:16 PST 2016


On Mon, Feb 15, 2016 at 12:28 PM, Dimitry Andric <dimitry at andric.com> wrote:
> On 15 Dec 2015, at 23:45, Cong Hou via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: conghou
>> Date: Tue Dec 15 16:45:09 2015
>> New Revision: 255691
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=255691&view=rev
>> Log:
>> [LoopVectorizer] Refine loop vectorizer's register usage calculator by ignoring specific instructions.
>>
>> (This is the third attempt to check in this patch, and the first two are r255454
>> and r255460. The once failed test file reg-usage.ll is now moved to
>> test/Transform/LoopVectorize/X86 directory with target datalayout and target
>> triple indicated.)
>>
>> 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.
>>
>>
>> Differential revision: http://reviews.llvm.org/D15177
>
> This appears to have introduced a use-after-free, see https://llvm.org/bugs/show_bug.cgi?id=26509 for the details and a valgrind log.  Is there any way we can fix this one before 3.8 release, or revert it otherwise?

Cong, do you think this is something that's easy to fix or should we
revert in the branch to be safe?

Thanks,
Hans


More information about the llvm-commits mailing list