1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00
Go to file
Daniel Sanders f380a26222 [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate
Summary:
This allows us to register it with the MachineFunction delegate and be
notified automatically about erasure and creation of instructions. However,
we still need explicit notification for modifications such as those caused
by setReg() or replaceRegWith().

There is a catch with this though. The notification for creation is
delivered before any operands can be added. While appropriate for
scheduling combiner work. This is unfortunate for debug output since an
opcode by itself doesn't provide sufficient information on what happened.
As a result, the work list remembers the instructions (when debug output is
requested) and emits a more complete dump later.

Another nit is that the MachineFunction::Delegate provides const pointers
which is inconvenient since we want to use it to schedule future
modification. To resolve this GISelWorkList now has an optional pointer to
the MachineFunction which describes the scope of the work it is permitted
to schedule. If a given MachineInstr* is in this function then it is
permitted to schedule work to be performed on the MachineInstr's. An
alternative to this would be to remove the const from the
MachineFunction::Delegate interface, however delegates are not permitted
to modify the MachineInstr's they receive.

In addition to this, the observer has three interface changes.
* erasedInstr() is now erasingInstr() to indicate it is about to be erased
  but still exists at the moment.
* changingInstr() and changedInstr() have been added to report changes
  before and after they are made. This allows us to trace the changes
  in the debug output.
* As a convenience changingAllUsesOfReg() and
  finishedChangingAllUsesOfReg() will report changingInstr() and
  changedInstr() for each use of a given register. This is primarily useful
  for changes caused by MachineRegisterInfo::replaceRegWith()

With this in place, both combine rules have been updated to report their
changes to the observer.

Finally, make some cosmetic changes to the debug output and make Combiner
and CombinerHelp

Reviewers: aditya_nandakumar, bogner, volkan, rtereshin, javed.absar

Reviewed By: aditya_nandakumar

Subscribers: mgorny, rovka, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D52947

llvm-svn: 349167
2018-12-14 17:50:14 +00:00
benchmarks Pull google/benchmark library to the LLVM tree 2018-08-28 09:42:41 +00:00
bindings [bindings/go] Add Go bindings to LLVMGetIndices 2018-11-08 04:04:04 +00:00
cmake [CMake] llvm_codesign workaround for Xcode double-signing errors 2018-12-13 18:51:19 +00:00
docs [docs] Use correct ending quotes. 2018-12-12 17:59:01 +00:00
examples Fix build break from r347239 2018-11-19 18:51:11 +00:00
include [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate 2018-12-14 17:50:14 +00:00
lib [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate 2018-12-14 17:50:14 +00:00
projects [projects] Use directory name for add_llvm_external_projects 2018-12-04 00:12:03 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
runtimes Revert "[CMake] Pass Clang defaults to runtimes builds" 2018-07-13 20:01:55 +00:00
test [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate 2018-12-14 17:50:14 +00:00
tools Revert rL349136: [llvm-exegesis] Optimize ToProcess in dbScan 2018-12-14 09:25:08 +00:00
unittests [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate 2018-12-14 17:50:14 +00:00
utils [TableGen:AsmWriter] Cope with consecutive tied operands. 2018-12-14 11:39:55 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore [git/svn] Ignore Visual Studio's CMakeSettings.json. 2018-10-29 14:51:02 +00:00
CMakeLists.txt [LLVM] Allow modulemap installation 2018-11-21 20:46:50 +00:00
CODE_OWNERS.TXT [CODE_OWNERS] Add myself as code owner for MinGW 2018-11-29 10:58:15 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT add Kang Zhang(shkzhang@cn.ibm.com) to the CREDITS.TXT 2018-11-25 02:56:49 +00:00
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt
README.txt Test commit. 2018-09-22 01:01:03 +00:00
RELEASE_TESTERS.TXT Adding Yvan as release test backup for Diana 2018-11-08 11:51:27 +00:00

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.