OSDN Git Service

[X86] Add support for passing 'prefer-vector-width' function attribute into X86Subtar...
authorCraig Topper <craig.topper@intel.com>
Sat, 20 Jan 2018 00:26:08 +0000 (00:26 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 20 Jan 2018 00:26:08 +0000 (00:26 +0000)
commit2f472871bc182b1cd56a717dedeffdd9bae823e4
tree394f78530307624f1fe563250c7ecbd0f55b3842
parent889833f36e1a2bee833817449f0cbde1cf3c6fd6
[X86] Add support for passing 'prefer-vector-width' function attribute into X86Subtarget and exposing via X86's getRegisterWidth TTI interface.

This will cause the vectorizers to do some limiting of the vector widths they create. This is not a strict limit. There are reasons I know of that the loop vectorizer will generate larger vectors for.

I've written this in such a way that the interface will only return a properly supported width(0/128/256/512) even if the attribute says something funny like 384 or 10.

This has been split from D41895 with the remainder in a follow up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323015 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86.td
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
lib/Target/X86/X86TargetMachine.cpp
lib/Target/X86/X86TargetTransformInfo.cpp
test/Transforms/LoopVectorize/X86/avx512.ll