diff options
| author | Geoff Berry <gberry@codeaurora.org> | 2018-02-01 18:54:01 +0000 |
|---|---|---|
| committer | Geoff Berry <gberry@codeaurora.org> | 2018-02-01 18:54:01 +0000 |
| commit | 94503c7bc3d70f51ab03c03b2067db3e973efa19 (patch) | |
| tree | 8db2d28d7793aa60b2cde1e630798f3e3c3fd6e7 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
| parent | a95bd9f72414a7d26f21a4ee5a0f40ff1d0c951a (diff) | |
| download | bcm5719-llvm-94503c7bc3d70f51ab03c03b2067db3e973efa19.tar.gz bcm5719-llvm-94503c7bc3d70f51ab03c03b2067db3e973efa19.zip | |
[MachineCopyPropagation] Extend pass to do COPY source forwarding
Summary:
This change extends MachineCopyPropagation to do COPY source forwarding
and adds an additional run of the pass to the default pass pipeline just
after register allocation.
This version of this patch uses the newly added
MachineOperand::isRenamable bit to avoid forwarding registers is such a
way as to violate constraints that aren't captured in the
Machine IR (e.g. ABI or ISA constraints).
This change is a continuation of the work started in D30751.
Reviewers: qcolombet, javed.absar, MatzeB, jonpa, tstellar
Subscribers: tpr, mgorny, mcrosier, nhaehnle, nemanjai, jyknight, hfinkel, arsenm, inouehrs, eraman, sdardis, guyblank, fedor.sergeev, aheejin, dschuff, jfb, myatsina, llvm-commits
Differential Revision: https://reviews.llvm.org/D41835
llvm-svn: 323991
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 374bb7a38fe..43fec69495b 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -1081,6 +1081,10 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) { // kill markers. addPass(&StackSlotColoringID); + // Copy propagate to forward register uses and try to eliminate COPYs that + // were not coalesced. + addPass(&MachineCopyPropagationID); + // Run post-ra machine LICM to hoist reloads / remats. // // FIXME: can this move into MachineLateOptimization? |

