[PATCH] D12588: PeepholeOptimizer: Look through simple extracts of reg_sequence

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 22:26:07 PDT 2015


> On Sep 3, 2015, at 7:17 PM, Quentin Colombet via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> The thing is this peephole optimization is supposed to remove cross register bank copies, not reducing the width of registers.
> The rational is that the register coalescer is supposed to do the right thing with non-cross-register-file copies…
> Apparently this is not the case for you :).
> 
> That being said, we could reuse indeed the same logic for that and instead just have a different predicate (i.e., something different than shareSameRegisterFile). Maybe we can provide a target hook to tell the peephole optimizer what predicate it should satisfy. That should be pretty easy.
> 
> Could you look into that direction?

OK, I’ll try that

> 
> As an aside, does it really matter to have a smaller register when sub-register liveness is enabled?
> I thought this would fix this kind of problems.

That’s what I expected to happen, but the register coalescer apparently doesn’t try to eliminate the unused parts. It coalesces the write into the super register, and the unused components do get reallocated, but the dead instructions aren’t also eliminated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150903/ba574d79/attachment.html>


More information about the llvm-commits mailing list