aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2022-12-02 03:15:13 +0100
committerNicolai Hähnle <nicolai.haehnle@amd.com>2023-06-13 21:14:32 +0200
commit2cb5c6d124d64344fd91eb769438fb81367bb266 (patch)
treef94fd81d82e4ee8013eb529f3743ba0f2de0d539 /flang/lib/Frontend/CompilerInvocation.cpp
parentfc7e60f1f6749e9620f9005e740a8e1ec3cb9298 (diff)
downloadllvm-2cb5c6d124d64344fd91eb769438fb81367bb266.zip
llvm-2cb5c6d124d64344fd91eb769438fb81367bb266.tar.gz
llvm-2cb5c6d124d64344fd91eb769438fb81367bb266.tar.bz2
Scalarizer: limit scalarization for small element types
Scalarization can expose optimization opportunities for the individual elements of a vector, and can therefore be beneficial on targets like GPUs that tend to operate on scalars anyway. However, notably with 16-bit operations it is often beneficial to keep <2 x i16 / half> vectors around since there are packed instructions for those. Refactor the code to operate on "fragments" of split vectors. The fragments are usually scalars, but may themselves be smaller vectors when the scalarizer-min-bits option is used. If the split is uneven, the last fragment is a shorter remainder. This is almost NFC when the new option is unused, but it happens to clean up some code in the fully scalarized case as well. Differential Revision: https://reviews.llvm.org/D149842
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions