[PATCH] D40755: [WIP][shrink-wrap]Sink COPYs to CSR from entry to successors

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 02:59:24 PST 2017


thegameg added a reviewer: MatzeB.
thegameg added a comment.

Thanks for working on this!

A few things I am wondering about:

- What if we can sink through but in the end it's not useful for shrink-wrapping (something else is blocking) ? We should be able to revert, or anticipate this in the first place.
- I liked the idea that shrink-wrapping is only analyzing and not modifying the code until PEI, is there any other pass where this would fit better?
- Would a post-RA MachineSink pass make sense here ? (in a way that's what shrink-wrapping really is)
- I wonder how much extra work the register allocator would do if we sink (during pre-RA MachineSink) the `%vreg = COPY %arg` into the successor and add %arg as a live-in.



================
Comment at: test/CodeGen/AArch64/sink-copy-for-shrink-wrap.ll:1
+; RUN: llc -mtriple=aarch64-linux-gnu -o - %s | FileCheck %s
+
----------------
I think a MIR test would show the use case of this patch much better here.


https://reviews.llvm.org/D40755





More information about the llvm-commits mailing list