This is an archive of the discontinued LLVM Phabricator instance.

MachineCopyPropagation: Add full copy propagation mode
Needs ReviewPublic

Authored by MatzeB on Jun 16 2016, 6:00 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Disclaimer: This turned out to be pretty much a copy of Jonas Paulsons patch http://reviews.llvm.org/D20531 just with a different motivation / comments... Uploading for reference.

By default MachineCopyPropagation only removes copies between values
that are identical anyway. This patch adds support for the classical
variant of copy propagation which transforms uses of a register:

%x = COPY %y
   use %x

is transformed to:

%x = COPY %y
   use %y

The transformation improves dependencies and gives the post register
allocation scheduler more freedom. It may also be better for out of
order execution engines that do not track copies.

The mode is opt-in because some targets have additional rules making
some register renames invalid.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 61053.Jun 16 2016, 6:00 PM
MatzeB retitled this revision from to MachineCopyPropagation: Add full copy propagation mode.
MatzeB updated this object.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added subscribers: llvm-commits, jonpa.
MatzeB updated this revision to Diff 61055.Jun 16 2016, 6:05 PM

(Realized I had a type in the cl::opt name)