1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib
Jonas Paulsson 0f000465c2 [SystemZ, RegAlloc] Favor 3-address instructions during instruction selection.
This patch aims to reduce spilling and register moves by using the 3-address
versions of instructions per default instead of the 2-address equivalent
ones. It seems that both spilling and register moves are improved noticeably
generally.

Regalloc hints are passed to increase conversions to 2-address instructions
which are done in SystemZShortenInst.cpp (after regalloc).

Since the SystemZ reg/mem instructions are 2-address (dst and lhs regs are
the same), foldMemoryOperandImpl() can no longer trivially fold a spilled
source register since the reg/reg instruction is now 3-address. In order to
remedy this, new 3-address pseudo memory instructions are used to perform the
folding only when the dst and lhs virtual registers are known to be allocated
to the same physreg. In order to not let MachineCopyPropagation run and
change registers on these transformed instructions (making it 3-address), a
new target pass called SystemZPostRewrite.cpp is run just after
VirtRegRewriter, that immediately lowers the pseudo to a target instruction.

If it would have been possibe to insert a COPY instruction and change a
register operand (convert to 2-address) in foldMemoryOperandImpl() while
trusting that the caller (e.g. InlineSpiller) would update/repair the
involved LiveIntervals, the solution involving pseudo instructions would not
have been needed. This is perhaps a potential improvement (see Phabricator
post).

Common code changes:

* A new hook TargetPassConfig::addPostRewrite() is utilized to be able to run a
target pass immediately before MachineCopyPropagation.

* VirtRegMap is passed as an argument to foldMemoryOperand().

Review: Ulrich Weigand, Quentin Colombet
https://reviews.llvm.org/D60888

llvm-svn: 362868
2019-06-08 06:19:15 +00:00
..
Analysis [Analysis] simplify code for getSplatValue(); NFC 2019-06-07 16:09:54 +00:00
AsmParser Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
BinaryFormat [XCOFF] Add functionality for parsing AIX XCOFF object file headers 2019-04-04 00:53:21 +00:00
Bitcode IR: make getParamByValType Just Work. NFC. 2019-06-05 20:37:47 +00:00
CodeGen [SystemZ, RegAlloc] Favor 3-address instructions during instruction selection. 2019-06-08 06:19:15 +00:00
DebugInfo Extend the DWARFExpression address handling to support 16-bit addresses 2019-06-01 09:18:26 +00:00
Demangle llvm-undname: Correctly demangle vararg parameters 2019-06-04 19:10:08 +00:00
ExecutionEngine [ORC] Update symbol lookup to use a single callback with a required symbol state 2019-06-07 19:33:51 +00:00
Fuzzer
FuzzMutate [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
IR IR: make getParamByValType Just Work. NFC. 2019-06-05 20:37:47 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LineEditor
Linker Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
LTO [Attributor] Pass infrastructure and fixpoint framework 2019-06-05 03:02:24 +00:00
MC [MC][ELF] Don't create relocations with section symbols for STB_LOCAL ifunc 2019-06-07 03:47:22 +00:00
MCA [MCA][Scheduler] Change how memory instructions are dispatched to the pending set. NFCI 2019-06-01 15:22:37 +00:00
Object [MACHO] Replaced calls to getStruct with getStructOrErr in functions returning Error or Expected or similar 2019-06-04 16:55:30 +00:00
ObjectYAML [llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support DT_PPC_GOT and DT_PPC_OPT 2019-06-05 01:36:48 +00:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes [Attributor] Pass infrastructure and fixpoint framework 2019-06-05 03:02:24 +00:00
ProfileData Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef> 2019-05-16 13:24:04 +00:00
Remarks [Remarks] Fix usage of enum class 2019-05-30 22:01:56 +00:00
Support [APFloat] APFloat::Storage::Storage - refix use after move 2019-06-07 19:51:22 +00:00
TableGen TableGen: Handle nontrivial foreach range bounds 2019-05-22 21:28:20 +00:00
Target [SystemZ, RegAlloc] Favor 3-address instructions during instruction selection. 2019-06-08 06:19:15 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI [TextAPI] Fix Symbol::dump which was failing to append the SymbolKind string. 2019-04-29 18:25:04 +00:00
ToolDrivers llvm-lib: Disallow mixing object files with different machine types 2019-06-07 13:24:34 +00:00
Transforms [GVN] non-functional code movement 2019-06-07 23:08:38 +00:00
WindowsManifest
XRay Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef> 2019-05-16 13:24:04 +00:00
CMakeLists.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00
LLVMBuild.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00