llvm-project/llvm
Ulrich Weigand b32f3656d2 [SystemZ] Do not use glue to represent condition code dependencies
Currently, an instruction setting the condition code is linked to
the instruction using the condition code via a "glue" link in the
SelectionDAG.  This has a number of drawbacks; in particular, it
means the same CC cannot be used by multiple users.  It also makes
it more difficult to efficiently implement SADDO et. al.

This patch changes the back-end to represent CC dependencies as
normal values during SelectionDAG matching, along the lines of
how this is handled in the X86 back-end already.

In addition to the core mechanics of updating all relevant patterns,
this requires a number of additional changes:

- We now need to be able to spill/restore a CC value into a GPR
  if necessary.  This means providing a copyPhysReg implementation
  for moves involving CC, and defining getCrossCopyRegClass.

- Since we still prefer to avoid such spills, we provide an override
  for IsProfitableToFold to avoid creating a merged LOAD / ICMP if
  this would result in multiple users of the CC.

- combineCCMask no longer requires a single CC user, and no longer
  need to be careful about preventing invalid glue/chain cycles.

- emitSelect needs to be more careful in marking CC live-in to
  the basic block it generates.  Also, we can now optimize the
  case of multiple subsequent selects with the same condition
  just like X86 does.

llvm-svn: 331202
2018-04-30 17:52:32 +00:00
..
bindings IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
cmake [cmake] Make linker detection take flags into account 2018-04-26 06:04:46 +00:00
docs NFC - Typo fixes lib/VMCore -> lib/IR 2018-04-30 10:18:11 +00:00
examples s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
include IWYU for llvm-config.h, removals. Also see r331184. 2018-04-30 15:26:01 +00:00
lib [SystemZ] Do not use glue to represent condition code dependencies 2018-04-30 17:52:32 +00:00
projects
resources
runtimes [CMake] Enable warnings for runtimes 2018-04-27 15:10:50 +00:00
test [SystemZ] Do not use glue to represent condition code dependencies 2018-04-30 17:52:32 +00:00
tools [llvm-mca] Correctly handle zero-latency stores that consume pipeline resources. 2018-04-30 15:55:04 +00:00
unittests IWYU for llvm-config.h, removals. Also see r331184. 2018-04-30 15:26:01 +00:00
utils IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Remove LLVM_INSTALL_CCTOOLS_SYMLINKS 2018-04-24 15:41:02 +00:00
CODE_OWNERS.TXT [CODE_OWNERS] Update my email address. 2018-04-23 19:09:49 +00:00
CREDITS.TXT Update my email address and description. 2018-04-29 01:13:57 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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.