1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00
Go to file
Serguei Katkov 2281491db1 [GreedyRA] Add support for invoke statepoint with tied-defs.
statepoint instruction uses tied-def registers to represent live gc value which
is use and def at the same time on a call.
At the same time invoke statepoint instruction is a last split point which can throw and
jump to landing pad.
As a result we have instructon which is last split point with tied-defs registers and
we need to teach Greedy RA to work with it.

The option -use-registers-for-gc-values-in-landing-pad controls whether statepoint lowering
will generate tied-defs for invoke statepoint and is off by default now.

To resolve all issues the following changes has been done.
1) Last Split point for invoke statepoint should be statepoint itself

If statepoint has a def it is a relocated gc pointer and it should be available in landing pad.
So we cannot split interval after statepoint at end of basic block.

2) Do not split interval on tied-def

If end of interval for overlap utility is a use which has tied-def we
should not split interval on this instruction due to in this case use
and def may have different registers and it breaks tied-def property.

3) Take into account Last Split Point for enterIntvAtEnd

If the use after Last Split Point is a def so it should be tied-def and
we can take the def of the tied-use as ParentVNI and thus
tied-use and tied-def will be live in resulting interval.

4) Handle the case when def is after LIP in InlineSpiller

If def of LI is after last insertion point of basic block we cannot hoist in this BB.

The example of such instruction is invoke statepoint where def represents the
relocated live gc pointer. Invoke is a last insertion point and its def is located after it.
In this case there is no place to insert spill and we bail out.

5) Fix removeBackCopies to account empty copies

RegAssignMap cannot hold empty interval, so do not set stop
to kill value if it produces empty interval.

This can happen if we remove back-copy and right before that we have another
back-copy.

For example, for parent %0 we can get
%1 = COPY %0
%2 = COPY %0
while we removing %2 we cannot set kill for %1 due to its empty.

6) Do not hoist copy to BB if its def is after LSP

If the parent def is a LastSplitPoint or later we cannot hoist copy to this basic block
because inserted copy (or re-materialization) will be located before the def.

All parts have been reviewed separately as follows:
https://reviews.llvm.org/D100747
https://reviews.llvm.org/D100748
https://reviews.llvm.org/D100750
https://reviews.llvm.org/D100927
https://reviews.llvm.org/D100945
https://reviews.llvm.org/D101028

Reviewers: reames, rnk, void, MatzeB, wmi, qcolombet
Reviewed By: reames, qcolombet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D101150
2021-05-05 11:13:35 +07:00
benchmarks
bindings [NFC][OCaml] Reformat to clean up following CAMLprim removal 2021-04-05 10:55:08 +01:00
cmake [cmake] Use -ffunction-sections and -Wl,--gc-sections on MinGW targets 2021-04-30 10:53:40 +03:00
docs Add cal entry for MemorySSA syncs. 2021-05-04 12:56:06 -07:00
examples [Orc][examples] Add missing FileCheck for lit test and polish output 2021-04-07 11:12:20 +02:00
include [MC] Add MCAsmParser::parseComma to improve diagnostics 2021-05-04 14:13:19 -07:00
lib [GreedyRA] Add support for invoke statepoint with tied-defs. 2021-05-05 11:13:35 +07:00
projects llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
resources
runtimes [runtimes] Add the libc project to the list of runtimes. 2021-03-23 17:33:03 +00:00
test [GreedyRA] Add support for invoke statepoint with tied-defs. 2021-05-05 11:13:35 +07:00
tools [llvm-objcopy] --dump-section: error if '=' is missing or filename is empty 2021-05-04 17:30:57 -07:00
unittests [ORC] Reintroduce the ORC C API test. 2021-05-04 20:46:00 -07:00
utils [gn build] Port f2018d6c16d1 2021-05-05 03:54:38 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore Remove .gitignore entries not relevant in the monorepo. 2021-04-07 12:25:02 -07:00
CMakeLists.txt [cmake] Configure policy CMP0116 2021-04-23 08:57:40 -07:00
CODE_OWNERS.TXT [M68k][CODE_OWNERS](0/8) Add code owner for the M68k target 2021-03-08 12:30:56 -08:00
configure
CREDITS.TXT Update personal info in CREDITS.TXT 2021-04-11 19:25:02 +08:00
LICENSE.TXT
llvm.spec.in
README.txt
RELEASE_TESTERS.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.