1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test
Amara Emerson 74c92ba816 [AArch64][GlobalISel] Split G_GLOBAL_VALUE into ADRP + G_ADD_LOW and optimize.
The concept of G_GLOBAL_VALUE is nice and simple, but always using it as the
representation for global var addressing until selection time creates some
problems in optimizing accesses in certain code/relocation models.

The problem comes from trying to optimize adrp -> add -> load/store sequences
in the most common "small" code model. These accesses can be optimized into an
adrp -> load with the add offset being folded into the load's immediate field.
If we try to keep all global var references as a single generic instruction
then by the time we get to the complex operand trying to match these, we end up
generating an adrp at the point of use. The real issue here is that we don't
have any form of CSE during selection, so the code size will bloat from many
redundant adrp's.

This patch custom legalizes small code mode non-GOT G_GLOBALs into target ADRP
and a new "target specific generic opcode" G_ADD_LOW. We also teach the
localizer to localize these instructions via the custom hook that was added
recently. Finally, the complex pattern for indexed loads/stores is extended to
try to fold these G_ADD_LOW instructions into the load immediate.

On -O0 CTMark, we see a 0.8% geomean code size improvement. We should also see
some minor performance improvements too.

Differential Revision: https://reviews.llvm.org/D78465
2020-06-01 16:00:56 -07:00
..
Analysis [BasicAA] Use known lower bounds for index values for size based check. 2020-05-30 16:20:42 +01:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen [AArch64][GlobalISel] Split G_GLOBAL_VALUE into ADRP + G_ADD_LOW and optimize. 2020-06-01 16:00:56 -07:00
DebugInfo [LiveDebugValues] Speed up removeEntryValue, NFC 2020-06-01 11:02:36 -07:00
Demangle
Examples
ExecutionEngine [jitlink] R_X86_64_PC32 support for the elf x86 jitlinker 2020-05-30 10:53:18 +10:00
Feature
FileCheck
Instrumentation
Integer
JitListener
Linker
LTO
MachineVerifier
MC [DebugInfo] Separate fields with commas in headers of compile units (2/3). 2020-06-01 17:40:24 +07:00
Object
ObjectYAML
Other [PrintSCC] Fix printing a basic-block without a name 2020-05-29 20:14:19 +03:00
Reduce
SafepointIRVerifier
Support
SymbolRewriter
TableGen
ThinLTO/X86
tools For --relativenames, ignore directory 0, which is the comp_dir. 2020-06-01 13:13:37 -07:00
Transforms [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def 2020-06-01 16:23:10 -04:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt [CMake] Change target 'check' from 'check-llvm' to 'check-all' 2020-05-29 14:15:27 -07:00
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh