[llvm-bugs] [Bug 40518] New: Expose option for maximum vector width
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 29 19:10:22 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40518
Bug ID: 40518
Summary: Expose option for maximum vector width
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: ckennelly at google.com
CC: atdt at google.com, echristo at gmail.com,
llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
With the addition of the -mprefer-vector-width option, there may be hot
functions where we want to use as wide of vector instructions as are available
from the target ISA.
While it is possible to solve this problem using intrinsics or a chain of
macros (#ifdef __SOME_INSTRUCTION_SET__ ... #elif __OTHER_SET__ ...), this
requires modifying the code to as targets change. We would like to be able to
apply a function attribute requesting "max" width vectors to avoid these
workarounds.
Consider:
__attribute__((__min_vector_width__(256))) void DoStuff(int* buf, int n) {
// ...
}
When rebuilding this code for a platform with 512-bit vectors available, we
might prefer narrower vectors (for the reasons originally mentioned on
http://lists.llvm.org/pipermail/llvm-dev/2017-November/119078.html) in general,
but want to leverage our ISA for this particular function (based on profiling)
to request:
__attribute__((__min_vector_width__(max))) void DoStuff(int* buf, int n) {
// ...
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190130/b5cacffa/attachment.html>
More information about the llvm-bugs
mailing list