[PATCH] D31821: Remove redundant copy in recurrences

Taewook Oh via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 13:40:44 PDT 2017


The reason I chose this pass is that 1) what ‘isRevCopyChain’ does is mostly close with what this patch does, and 2) I didn’t realize that tied operand information can be used as a hint to how two address instructions will be generated. I wonder if there’s a pass that builds recurrence cycle after instruction selection.

From: Daniel Berlin <dberlin at dberlin.org>
Date: Friday, May 19, 2017 at 1:21 PM
To: "reviews+D31821+public+c2af05dc8d0e9460 at reviews.llvm.org" <reviews+D31821+public+c2af05dc8d0e9460 at reviews.llvm.org>, Taewook Oh via Phabricator <reviews at reviews.llvm.org>
Cc: Taewook Oh <twoh at fb.com>, Quentin Colombet <qcolombet at apple.com>, Matthias Braun <matze at braunis.de>, Wei Mi <wmi at google.com>, llvm-commits <llvm-commits at lists.llvm.org>
Subject: Re: [PATCH] D31821: Remove redundant copy in recurrences

The normal path to finding recurrences like this would be to follow def-use chains using an SCC algorithm, and then do something with the members of the component it comes up with.
I presume you are doing something else because it's difficult to get that info at this point in the compiler?


On Fri, May 19, 2017 at 1:14 PM, Taewook Oh via Phabricator via llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
twoh added a comment.

@wmi Thank you for your reply. I agree on you that we should consider tied operand group, and as @qcolombet mentioned in the previous comment, if tie operand information is already available before this pass, I'd like to discuss where would be the best place to implement this.

I'm afraid I couldn't understand your second point. In the example there is a recurrence cycle of vreg0-->vreg13-->vreg3-->vreg10-->vreg0 as well, and what this patch does is commuting (vreg0, vreg1) and (vreg2, vreg10) to remove the copy. Did I miss something?


https://reviews.llvm.org/D31821<https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D31821&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=kOsLCgQzH7N8ptZ7diJD9g&m=f0DRqqVS3FrUByhtpjTFwzMsMYlzLMlaZtdGgWQbqcA&s=RGxh4gMn7P80wd5i0rc1tg_EQ8iGVtj5DlhcFlH-OlQ&e=>



_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=kOsLCgQzH7N8ptZ7diJD9g&m=f0DRqqVS3FrUByhtpjTFwzMsMYlzLMlaZtdGgWQbqcA&s=sB6ABvAvSpI6MhSiHFFsiRjsBWWlwzB_f5dr4df_TC4&e=>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170519/acb3cd59/attachment.html>


More information about the llvm-commits mailing list