llvm-project/llvm
Anton Afanasyev 623d9ba068 [MIR] Add simple PRE pass to MachineCSE
This is the second part of the commit fixing PR38917 (hoisting
partitially redundant machine instruction). Most of PRE (partitial
redundancy elimination) and CSE work is done on LLVM IR, but some of
redundancy arises during DAG legalization. Machine CSE is not enough
to deal with it. This simple PRE implementation works a little bit
intricately: it passes before CSE, looking for partitial redundancy
and transforming it to fully redundancy, anticipating that the next
CSE step will eliminate this created redundancy. If CSE doesn't
eliminate this, than created instruction will remain dead and eliminated
later by Remove Dead Machine Instructions pass.

The third part of the commit is supposed to refactor MachineCSE,
to make it more clear and to merge MachinePRE with MachineCSE,
so one need no rely on further Remove Dead pass to clear instrs
not eliminated by CSE.

First step: https://reviews.llvm.org/D54839

Fixes llvm.org/PR38917

This is fixed recommit of r361356 after PowerPC64 multistage build failure.

llvm-svn: 362901
2019-06-09 12:15:47 +00:00
..
benchmarks
bindings [bindings/go] Add wrappers for atomic operations. 2019-06-09 10:06:35 +00:00
cmake Build with _XOPEN_SOURCE defined on AIX 2019-06-07 15:45:25 +00:00
docs [llvm-lipo] Add docs for llvm-lipo 2019-06-07 22:03:02 +00:00
examples Add a HowToUseLLJIT example project. 2019-05-22 21:38:41 +00:00
include [SystemZ, RegAlloc] Favor 3-address instructions during instruction selection. 2019-06-08 06:19:15 +00:00
lib [MIR] Add simple PRE pass to MachineCSE 2019-06-09 12:15:47 +00:00
projects
resources
runtimes [CMake] Use libtool for runtimes when building for Apple platform 2019-06-02 02:05:01 +00:00
test [MIR] Add simple PRE pass to MachineCSE 2019-06-09 12:15:47 +00:00
tools fix a typo unavaliable=>unavailable 2019-06-08 15:07:55 +00:00
unittests [ADT] Enable set_difference() to be used on StringSet 2019-06-07 20:23:03 +00:00
utils gn build: Merge r362857 2019-06-08 01:27:47 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Build with _XOPEN_SOURCE defined on AIX 2019-06-07 15:45:25 +00:00
CODE_OWNERS.TXT
CREDITS.TXT [test commit] Add my name to the CREDITS.TXT 2019-05-27 07:48:28 +00:00
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.