llvm-project/llvm
Sanjay Patel 6f6d2d2383 [x86] refine conditions for immediate hoisting to save code-size
As shown in PR46237:
https://bugs.llvm.org/show_bug.cgi?id=46237

The size-savings win for hoisting an 8-bit ALU immediate (intentionally
excluding store constants) requires extreme conditions; it may not even
be possible when including REX prefix bytes on x86-64.

I did draft a version of this patch that included use counts after the
loop, but I suspect that accounting is not working as expected. I think
that is because the number of constant uses are changing as we select
instructions (for example as we transform shl/add into LEA).

Differential Revision: https://reviews.llvm.org/D81468
2020-06-09 15:44:55 -04:00
..
benchmarks
bindings
cmake [CMake] Do not append -lm to CMAKE_REQUIRED_LIBRARIES on Apple 2020-06-05 12:45:30 -04:00
docs Change filecheck default to dump input on failure 2020-06-09 18:57:46 +00:00
examples
include GlobalISel: Improve MachineIRBuilder construction 2020-06-09 15:05:04 -04:00
lib [x86] refine conditions for immediate hoisting to save code-size 2020-06-09 15:44:55 -04:00
projects
resources
runtimes
test [x86] refine conditions for immediate hoisting to save code-size 2020-06-09 15:44:55 -04:00
tools [SVE] Eliminate calls to default-false VectorType::get() from llvm-stress 2020-06-08 11:32:37 -07:00
unittests GlobalISel: Set instr/debugloc before any legalizer action 2020-06-09 15:37:02 -04:00
utils Change filecheck default to dump input on failure 2020-06-09 18:57:46 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Automatically configure MLIR when flang is enabled 2020-05-27 07:31:49 +00:00
CODE_OWNERS.TXT Make myself code owner of InferAddressSpaces 2020-06-08 21:26:01 -04:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.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.