[PATCH] D15157: CodeGen peephole: fold redundant phys reg copies

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 09:40:14 PST 2015


qcolombet added a subscriber: qcolombet.
qcolombet requested changes to this revision.
qcolombet added a reviewer: qcolombet.
qcolombet added a comment.
This revision now requires changes to proceed.

Hi,

We purposely don’t remove such copies because it over constrains the coloring later on.
The idea is that if the coalescing is possible, then the register allocator should prefer it. However, I reckon that in your motivating example that’s not going to happen since this is a cross register bank copy.

Anyway, the peephole optimizer happens too early IMO for this to be a reasonable solution. I would instead encourage you to look at fixing this into the CopyPropagation pass.

Cheers,
-Quentin


http://reviews.llvm.org/D15157





More information about the llvm-commits mailing list