- User Since
- May 15 2019, 8:43 PM (17 w, 5 d)
Added test case that copy has side effect.
Updated the patch. Currently we don't handle non-trivial copy which has more than 2 operands(Cuz I notice current copy forward propagation algorithm considers copy's implicit operands).
Sun, Sep 15
Thu, Sep 12
Pre-committed machine-backward-cp.mir, including edge cases as far as I can imagine. Some test cases remain unchanged, reviewers might have to read whole diff of machine-backward-cp.mir to see unchanged cases.
Tue, Sep 10
Mon, Sep 9
@gribozavr Please let me know if the latest patch resolves the issue.
When replacing copy's src with copy's def, I missed a point that copy's def is clobbered by selected SrcMI and Tracker should be informed.
Hi @gribozavr , thanks for the affirmative action. Could you provide me your command to generate the executable and the target platform you compile to?
Sun, Sep 8
Check if SrcOp is tied or an implicit-def.
Sat, Sep 7
Fri, Sep 6
Added reserved register check on SrcOp.getReg().
Hi @craig.topper , would you mind having a look at changes of X86 test cases?
Wed, Sep 4
Tue, Sep 3
Added comment for bool MachineCopyPropagation::eraseIfRedundant(MachineInstr &Copy).
Rebased and updated tests.
Mon, Sep 2
Thu, Aug 29
Thu, Aug 22
Mon, Aug 19
Since this patch has long been not updated, I'll close it and plan another patch that also works for PowerPC.
Hi @RKSimon , currently I'm not working on it. I should have abandoned this patch. I might have another patch which also works for PowerPC.
Sun, Aug 18
Aug 18 2019
Updated the patch and summary.
Aug 14 2019
Updated patch to remove redundant copies by implementing backward copy propagation in machine-cp.
Aug 13 2019
// $reg0 = OP .... // ... // $reg1 = COPY $reg0
If we can be sure that $reg0 is renamable, and no use of $reg0 or $reg1 in between (and of course there might be other restrictions, like ReservedReg etc),
we should be able to remove the COPY here.// `$reg1` = OP .. // ...
One concern here, there might be uses of $reg0 in succ BBs. To overcome it, we might constraint this opt in terminal BBs considering current machine-cp working on single BB. To summarize, without complex uses and defs(thus we don't need to do complex replace-uses-with after RA), in a terminal BB we should have
$reg0 = OP ... ... <<< No uses of $reg0 and $reg1 $reg1 = COPY $reg0 <<< $reg0 is killed ... <RET>
Aug 12 2019
Aug 8 2019
Aug 6 2019
Aug 1 2019
Updated patch to use llvm::Register::isVirtualRegister.
Jul 31 2019
Jul 25 2019
FYI, I should have make getDefMIPostRA public. So I committed another NFC patch to make getDefMIPostRA public. https://reviews.llvm.org/rG985e52a4c1c6
Jul 22 2019
Jul 21 2019
Jul 20 2019
Jul 19 2019
Jul 18 2019
Use hasMinSize to check if optimized for size.
Jul 17 2019
Updated patch following @dmgreen 's suggestion.
Jul 15 2019
Jul 12 2019
Address @jsji 's comments and added new test.
Jul 11 2019
Jul 10 2019
Jul 9 2019
Updated the patch, using MachineBlockFrequency as metric to check if CMBB is appropriate to hoist into.
@hfinkel , thanks for review.