1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test
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
..
Analysis [CostModel][X86] Don't count 2 shuffles on the last level of a pairwise arithmetic or min/max reduction 2018-12-13 19:08:10 +00:00
Assembler [IR] Don't assume all functions are 4 byte aligned 2018-12-07 08:34:59 +00:00
Bindings [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
Bitcode [ThinLTO] Compute synthetic function entry count 2018-12-13 19:54:27 +00:00
BugPoint [bugpoint] Find 'opt', etc., in bugpoint directory 2018-12-10 00:56:13 +00:00
CodeGen [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate 2018-12-14 17:50:14 +00:00
DebugInfo [codeview] Look through typedefs in getCompleteTypeIndex 2018-12-11 23:07:39 +00:00
Demangle
Examples
ExecutionEngine Implement IMAGE_REL_AMD64_SECREL for RuntimeDyldCOFFX86_64 2018-12-12 00:04:06 +00:00
Feature
FileCheck
Instrumentation Revert "[hwasan] Android: Switch from TLS_SLOT_TSAN(8) to TLS_SLOT_SANITIZER(6)" 2018-12-13 23:47:50 +00:00
Integer
JitListener
Linker Implement -frecord-command-line (-frecord-gcc-switches) 2018-12-14 15:38:15 +00:00
LTO LTO: Don't internalize available_externally globals. 2018-12-05 00:09:36 +00:00
MC [macho] save the SDK version stored in module metadata into the version min and 2018-12-14 01:14:10 +00:00
Object
ObjectYAML [WebAssembly] Update dylink section parsing 2018-12-12 23:40:58 +00:00
Other [Unroll/UnrollAndJam/Vectorizer/Distribute] Add followup loop attributes. 2018-12-12 17:32:52 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [TableGen] Preserve order of output operands in DAGISelMatcherGen 2018-12-05 00:47:59 +00:00
ThinLTO/X86 [ThinLTO] Fix test added in rL349076 2018-12-14 08:21:08 +00:00
tools [llvm-xray] Support for PIE 2018-12-14 01:37:56 +00:00
Transforms [SampleFDO] handle ProfileSampleAccurate when initializing function entry count 2018-12-13 21:51:42 +00:00
Unit
Verifier Implement -frecord-command-line (-frecord-gcc-switches) 2018-12-14 15:38:15 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py [lit]Add llvm-readelf to tool substitutions 2018-12-12 10:34:01 +00:00
lit.site.cfg.py.in
TestRunner.sh