llvm-project/llvm
Simon Pilgrim 7d8fd4f5db [DAG] visitINSERT_VECTOR_ELT - attempt to reconstruct BUILD_VECTOR before other fold interfere
Another issue unearthed by D127115

We take a long time to canonicalize an insert_vector_elt chain before being able to convert it into a build_vector - even if they are already in ascending insertion order, we fold the nodes one at a time into the build_vector 'seed', leaving plenty of time for other folds to alter it (in particular recognising when they come from extract_vector_elt resulting in a shuffle_vector that is much harder to fold with).

D127115 makes this particularly difficult as we're almost guaranteed to have the lost the sequence before all possible insertions have been folded.

This patch proposes to begin at the last insertion and attempt to collect all the (oneuse) insertions right away and create the build_vector before its too late.

Differential Revision: https://reviews.llvm.org/D127595
2022-06-13 11:48:18 +01:00
..
benchmarks
bindings [llvm-ocaml] Add and use opaque pointer compatible bindings 2022-06-02 11:42:24 +02:00
cmake Revert "[cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore" 2022-06-10 19:26:12 +00:00
docs Revert "[X86][RFC] Enable `_Float16` type support on X86 following the psABI" 2022-06-12 15:14:37 +00:00
examples Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
include [MC][re-land] Omit DWARF unwind info if compact unwind is present where eligible 2022-06-12 17:24:19 -04:00
lib [DAG] visitINSERT_VECTOR_ELT - attempt to reconstruct BUILD_VECTOR before other fold interfere 2022-06-13 11:48:18 +01:00
projects
resources
runtimes Revert "[runtimes] Detect changes to Tests.cmake" 2022-05-26 09:34:18 -07:00
test [DAG] visitINSERT_VECTOR_ELT - attempt to reconstruct BUILD_VECTOR before other fold interfere 2022-06-13 11:48:18 +01:00
tools [ORC][ORC_RT] Integrate ORC platforms with LLJIT and lli 2022-06-09 22:47:58 -07:00
unittests [X86][Disassembler] Fix displacement operand size for symbolizer 2022-06-13 00:14:43 -07:00
utils [gn build] Port 988682a389 2022-06-13 10:23:45 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux 2022-06-07 21:22:38 -07:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
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.