[PATCH] D29295: Move core RDF files from lib/Target/Hexagon to CodeGen

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 12:20:39 PST 2017


kparzysz created this revision.
Herald added subscribers: mgorny, aemerson.

The RDF now supports regmasks, which was the major missing feature preventing it from being used on other targets besides Hexagon.

This move includes the data-flow graph construction and recalculation of block live-ins.  I have tested 3 targets: ARM, PowerPC and X86 using this scaffold, usually placed in post-RA pseudo-instruction expansion:

1. Construct the DFG.
2. Recalculate the block live-ins using the DFG.
3. Replace the existing live-ins with the calculated ones.
4. Carry on with the rest of the pass.

Then I checked each target via `make check-llvm-codegen-<target>`.

All tests on ARM and PowerPC pass, the X86 backend has 14 failures.  At the first glance, about half of them are caused by the issue with EAX and AX having the same set of register units (in general E_X and _X). The remaining half seems to be caused by (as of yet) undetermined issues related to exception handling on Windows.

This patch does not introduce any functional changes, the only changes are in the locations of the files.  Putting the files in CodeGen will make it easier to further test it and enable any potentially interested users to try it out.

There are two more RDF files in lib/Target/Hexagon: those with copy propagation and dead code elimination. I have not tested them in any capacity yet. I have no strong opinion as to whether they should be moved at this point or not.


Repository:
  rL LLVM

https://reviews.llvm.org/D29295

Files:
  include/llvm/CodeGen/RDFGraph.h
  include/llvm/CodeGen/RDFLiveness.h
  include/llvm/CodeGen/RDFRegisters.h
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/RDFGraph.cpp
  lib/CodeGen/RDFLiveness.cpp
  lib/CodeGen/RDFRegisters.cpp
  lib/Target/Hexagon/CMakeLists.txt
  lib/Target/Hexagon/HexagonOptAddrMode.cpp
  lib/Target/Hexagon/HexagonRDFOpt.cpp
  lib/Target/Hexagon/RDFCopy.cpp
  lib/Target/Hexagon/RDFCopy.h
  lib/Target/Hexagon/RDFDeadCode.cpp
  lib/Target/Hexagon/RDFDeadCode.h
  lib/Target/Hexagon/RDFGraph.cpp
  lib/Target/Hexagon/RDFGraph.h
  lib/Target/Hexagon/RDFLiveness.cpp
  lib/Target/Hexagon/RDFLiveness.h
  lib/Target/Hexagon/RDFRegisters.cpp
  lib/Target/Hexagon/RDFRegisters.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29295.86323.patch
Type: text/x-patch
Size: 318071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170130/0c74de35/attachment-0001.bin>


More information about the llvm-commits mailing list