llvm-project/llvm
Craig Topper f4c67dfa92 [X86] More accurately model the cost of horizontal reductions.
This patch attempts to more accurately model the reduction of
power of 2 vectors of types we natively support. This takes into
account the narrowing of vectors that occur as we go from 512
bits to 256 bits, to 128 bits. It also takes into account the use
of wider elements in the shuffles for the first 2 steps of a
reduction from 128 bits. And uses a v8i16 shift for the final step
of vXi8 reduction.

The default implementation uses the legalized type for the arithmetic
for all levels. And uses the single source permute cost of the
legalized type for all levels. This penalizes things like
lack of v16i8 pshufb on pre-sse3 targets and the splitting and
joining that needs to be done for integer types on AVX1. We never
need v16i8 shuffle for a reduction and we only need split AVX1 ops
when type the type wide and needs to be split. I think we're still
over costing splits and joins for AVX1, but we're closer now.

I've also removed all pairwise special casing because I don't
think we ever want to generate that on X86. I've also adjusted
the add handling to more accurately account for any type splitting
that occurs before we reach a legal type.

Differential Revision: https://reviews.llvm.org/D76478
2020-03-22 14:20:15 -07:00
..
benchmarks
bindings Add an SDK attribute to DICompileUnit 2020-03-11 14:14:06 -07:00
cmake [CMake] Enable the use of -ffile-prefix-map 2020-03-19 15:14:15 -07:00
docs [CMake] Enable the use of -ffile-prefix-map 2020-03-19 15:14:15 -07:00
examples [ORC] Re-apply 98f2bb4461, enable JITEventListeners in OrcV2, with fixes. 2020-03-19 16:30:08 -07:00
include Add Triple::isAMDGPU 2020-03-22 14:20:28 -04:00
lib [X86] More accurately model the cost of horizontal reductions. 2020-03-22 14:20:15 -07:00
projects
resources
runtimes [runtimes] When COMPILER_RT is enabled, consider SANITIZER prefixes 2020-03-11 14:22:20 -07:00
test [X86] More accurately model the cost of horizontal reductions. 2020-03-22 14:20:15 -07:00
tools [obj2yaml] - Simplify and reduce `ELFDumper<ELFT>::dumpSections`. NFCI. 2020-03-21 18:15:26 +03:00
unittests Revert "[ADT] Implement the Waymarking as an independent utility" 2020-03-21 22:47:17 +02:00
utils [gn build] Port 34fd007aaf 2020-03-21 20:48:15 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [cmake] Fix -stripped for umbrella library install targets 2020-03-20 18:46:48 -07:00
CODE_OWNERS.TXT Remove myself from CODE_OWNERS. 2020-02-25 11:59:29 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.