public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>
To: Jeff Law <law@redhat.com>, Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Vinod Kathail <vinodk@xilinx.com>,
	Shail Aditya Gupta <shailadi@xilinx.com>,
	Vidhumouli Hunsigida	<vidhum@xilinx.com>,
	Nagaraju Mekala <nmekala@xilinx.com>
Subject: RE: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation
Date: Thu, 27 Aug 2015 06:00:00 -0000	[thread overview]
Message-ID: <37378DC5BCD0EE48BA4B082E0B55DFAA4297133F@XAP-PVEXMBX02.xlnx.xilinx.com> (raw)
In-Reply-To: <55D5F6E1.3090500@redhat.com>



-----Original Message-----
From: Jeff Law [mailto:law@redhat.com] 
Sent: Thursday, August 20, 2015 9:19 PM
To: Ajit Kumar Agarwal; Richard Biener
Cc: GCC Patches; Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

On 08/20/2015 09:38 AM, Ajit Kumar Agarwal wrote:

>>
>> Bootstrapping with i386 and Microblaze target works fine. No 
>> regression is seen in Deja GNU tests for Microblaze. There are lesser 
>> failures. Mibench/EEMBC benchmarks were run for Microblaze target and 
>> the gain of 9.3% is seen in rgbcmy_lite the EEMBC benchmarks.
>>> What do you mean by there are "lesser failures"?  Are you saying there are cases where path splitting generates incorrect code, or cases where path >>splitting produces code that is less efficient, or something else?
>
> I meant there are more Deja GNU testcases passes with the path splitting changes.
>>Ah, in that case, that's definitely good news!

Thanks. The following testcase testsuite/gcc.dg/tree-ssa/ifc-5.c

void
dct_unquantize_h263_inter_c (short *block, int n, int qscale, int nCoeffs)
{
  int i, level, qmul, qadd;

  qadd = (qscale - 1) | 1;
  qmul = qscale << 1;

  for (i = 0; i <= nCoeffs; i++)
    {
      level = block[i];
      if (level < 0)
        level = level * qmul - qadd;
      else
        level = level * qmul + qadd;
      block[i] = level;
    }
}

The above Loop is a candidate of path splitting as the IF block merges at the latch of the Loop and the path splitting duplicates
The latch of the loop which is the statement block[i] = level into the predecessors THEN and ELSE block.

Due to above path splitting,  the IF conversion is disabled and the above IF-THEN-ELSE is not IF-converted and the test case fails.

There were following review comments from the above patch.

+/* This function performs the feasibility tests for path splitting
> +   to perform. Return false if the feasibility for path splitting
> +   is not done and returns true if the feasibility for path splitting
> +   is done. Following feasibility tests are performed.
> +
> +   1. Return false if the join block has rhs casting for assign
> +      gimple statements.

Comments from Jeff:

>>These seem totally arbitrary.  What's the reason behind each of these 
>>restrictions?  None should be a correctness requirement AFAICT.  

In the above patch I have made a check given in point 1. in the loop latch and the Path splitting is disabled and the IF-conversion
happens and the test case passes.

I have incorporated the above review comments of not doing the above feasibility check of the point 1 and the above testcases goes
For path splitting and due to path splitting the if-cvt is not happening and the test case fails (expecting the pattern Applying if conversion 
To be present). With the above patch given for review and the Feasibility check of cast assign in the latch of the loop as given in point 1
 disables the path splitting  and if-cvt happens and the above test case passes.

Please let me know whether to keep the above feasibility check as given in point 1  or better appropriate changes required for the above 
Test case scenario of path splitting vs IF-conversion.

Thanks & Regards
Ajit


jeff


  reply	other threads:[~2015-08-27  5:29 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30  8:34 Ajit Kumar Agarwal
2015-06-30 10:38 ` Bernhard Reutner-Fischer
2015-06-30 10:43   ` Ajit Kumar Agarwal
2015-06-30 10:51     ` Bernhard Reutner-Fischer
2015-06-30 11:39 ` Richard Biener
2015-06-30 12:07   ` Ajit Kumar Agarwal
2015-07-04 12:40   ` Ajit Kumar Agarwal
2015-07-07  8:50     ` Richard Biener
2015-07-07 13:22       ` Ajit Kumar Agarwal
2015-07-16 11:20         ` Richard Biener
2015-07-29  7:44           ` Ajit Kumar Agarwal
2015-08-15 23:13             ` Ajit Kumar Agarwal
2015-08-19 19:47               ` Jeff Law
2015-08-20 15:40                 ` Ajit Kumar Agarwal
2015-08-20 15:49                   ` Jeff Law
2015-08-27  6:00                     ` Ajit Kumar Agarwal [this message]
2015-09-09 21:45                       ` Jeff Law
2015-09-12 12:05                         ` Ajit Kumar Agarwal
2015-10-20 16:05                           ` Ajit Kumar Agarwal
2015-11-11  7:01                           ` Jeff Law
2015-08-19 21:53               ` Jeff Law
2015-08-20 15:41                 ` Ajit Kumar Agarwal
2015-09-04 18:07                 ` Ajit Kumar Agarwal
2015-11-11 20:38                   ` Jeff Law
2015-11-12 10:58                     ` Richard Biener
2015-11-12 17:05                       ` Jeff Law
2015-11-12 18:33                         ` Jeff Law
2015-11-12 19:40                           ` Richard Biener
2015-11-12 19:52                             ` Jeff Law
2015-11-12 21:58                           ` Jeff Law
2015-11-13 10:13                             ` Richard Biener
2015-11-13 16:26                               ` Jeff Law
2015-11-13 18:09                                 ` Richard Biener
2015-11-13 20:23                                   ` Jeff Law
2015-11-13 23:36                                     ` Jeff Law
2015-11-18  7:44                                       ` Tom de Vries
2015-11-18 14:24                                         ` Ajit Kumar Agarwal
2015-12-03 14:38                                       ` Richard Biener
2015-12-03 14:45                                         ` Richard Biener
2015-12-10 20:12                                           ` Jeff Law
2015-12-03 15:46                                         ` Jeff Law
2015-12-10 20:08                                         ` Jeff Law
2015-12-11  9:11                                           ` Ajit Kumar Agarwal
2015-12-23  6:36                                             ` Jeff Law
2015-12-25  8:40                                               ` Ajit Kumar Agarwal
2016-01-02  7:32                                                 ` Jeff Law
2016-01-04 14:32                                               ` Ajit Kumar Agarwal
2016-01-13  8:10                                                 ` Jeff Law
     [not found]                                                   ` <56976289.3080203@redhat.com! >
2016-01-14  8:55                                                   ` Jeff Law
2016-01-15 23:02                                                     ` Jeff Law
2016-01-18 18:27                                                       ` Ajit Kumar Agarwal
2016-01-27  7:17                                                         ` Jeff Law
2016-01-27 17:21                                                           ` Ajit Kumar Agarwal
2016-01-15 22:38                                                   ` Jeff Law
2016-01-16  6:32                                                 ` Jeff Law
2016-01-18  9:13                                                   ` Ajit Kumar Agarwal
2016-01-27  7:13                                                     ` Jeff Law
2016-01-27  9:35                                                       ` Ajit Kumar Agarwal
2016-02-04  8:57                                                 ` Jeff Law
2015-12-11 10:06                                           ` Richard Biener
2015-12-15 23:50                                             ` Jeff Law
2015-12-16  7:44                                               ` Ajit Kumar Agarwal
2015-12-16  9:57                                                 ` Richard Biener
2015-12-16 10:13                                                   ` Ajit Kumar Agarwal
2015-12-17 10:38                                                     ` Ajit Kumar Agarwal
2015-12-17 23:41                                             ` Jeff Law
2015-12-18 15:43                                               ` Zamyatin, Igor
2015-11-13 13:19                             ` Ajit Kumar Agarwal
2015-06-30 12:39 ` Ajit Kumar Agarwal
2015-06-30 22:18 ` Joseph Myers
2015-07-02  3:52   ` Ajit Kumar Agarwal
2015-07-06 20:08     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37378DC5BCD0EE48BA4B082E0B55DFAA4297133F@XAP-PVEXMBX02.xlnx.xilinx.com \
    --to=ajit.kumar.agarwal@xilinx.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=nmekala@xilinx.com \
    --cc=richard.guenther@gmail.com \
    --cc=shailadi@xilinx.com \
    --cc=vidhum@xilinx.com \
    --cc=vinodk@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).