Patchwork [google] Improve locus information during if-conversion (issue4526101)

login
register
mail settings
Submitter Sharad Singhai
Date June 2, 2011, 1:03 a.m.
Message ID <20110602010346.35A3D15C1BE@nabu.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/98309/
State New
Headers show

Comments

Sharad Singhai - June 2, 2011, 1:03 a.m.
This patch improves locus information during the if-conversion. Okay for google/main?

Thanks,
Sharad

2011-06-01  Sharad Singhai  <singhai@google.com>

	Google Ref 39994
	* ifcvt.c (noce_try_cmove_arith): Use the locus information
	from the if-statment rather than the then path.


--
This patch is available for review at http://codereview.appspot.com/4526101
Diego Novillo - June 2, 2011, 11:46 a.m.
On Wed, Jun 1, 2011 at 21:03, Sharad Singhai <singhai@google.com> wrote:

> 2011-06-01  Sharad Singhai  <singhai@google.com>
>
>        Google Ref 39994
>        * ifcvt.c (noce_try_cmove_arith): Use the locus information
>        from the if-statment rather than the then path.

Could you elaborate how it improves locus information?  Is there a
test case you can add to the testsuite?  Or an example code fragment
that shows how is the locus better now?

OK for google/main.


Diego.
Steven Bosscher - June 2, 2011, 12:46 p.m.
On Thu, Jun 2, 2011 at 1:46 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Wed, Jun 1, 2011 at 21:03, Sharad Singhai <singhai@google.com> wrote:
>
>> 2011-06-01  Sharad Singhai  <singhai@google.com>
>>
>>        Google Ref 39994
>>        * ifcvt.c (noce_try_cmove_arith): Use the locus information
>>        from the if-statment rather than the then path.
>
> Could you elaborate how it improves locus information?  Is there a
> test case you can add to the testsuite?  Or an example code fragment
> that shows how is the locus better now?
>
> OK for google/main.

Why can't this patch just go onto the trunk?
(Idem for some other google/main patches -- is there a merge plan??)

Ciao!
Steven
Diego Novillo - June 2, 2011, 12:54 p.m.
On Thu, Jun 2, 2011 at 08:46, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Thu, Jun 2, 2011 at 1:46 PM, Diego Novillo <dnovillo@google.com> wrote:
>> On Wed, Jun 1, 2011 at 21:03, Sharad Singhai <singhai@google.com> wrote:
>>
>>> 2011-06-01  Sharad Singhai  <singhai@google.com>
>>>
>>>        Google Ref 39994
>>>        * ifcvt.c (noce_try_cmove_arith): Use the locus information
>>>        from the if-statment rather than the then path.
>>
>> Could you elaborate how it improves locus information?  Is there a
>> test case you can add to the testsuite?  Or an example code fragment
>> that shows how is the locus better now?
>>
>> OK for google/main.
>
> Why can't this patch just go onto the trunk?

Yes.  Every patch submitted for google/main also applies to trunk.  I
generally try to avoid approving patches that are not inside my
maintenance areas for trunk (unless the patch is obvious).

Sharad simply forgot to request trunk approval for this patch and I
forgot to remind him.  Sharad, could you mark future patches?

> (Idem for some other google/main patches -- is there a merge plan??)

The merge plan is to submit patches to trunk.  They are quickly moved
in google/main for scheduling reasons, but everything going to
google/main is automatically assumed to apply to trunk as well.

The only patches that we don't necessarily mean to apply to trunk are
the ones we put in google/integration (though some patches have
already been moved or approved for trunk).


Diego.
Sharad Singhai - June 2, 2011, 4:45 p.m.
This patch improves precision of the line number information during
coverage mode. Yes, I need to add an example/test case. I was planning
to do that before I propose this patch for trunk as well.

Thanks,
Sharad

On Thu, Jun 2, 2011 at 4:46 AM, Diego Novillo <dnovillo@google.com> wrote:
>
> On Wed, Jun 1, 2011 at 21:03, Sharad Singhai <singhai@google.com> wrote:
>
> > 2011-06-01  Sharad Singhai  <singhai@google.com>
> >
> >        Google Ref 39994
> >        * ifcvt.c (noce_try_cmove_arith): Use the locus information
> >        from the if-statment rather than the then path.
>
> Could you elaborate how it improves locus information?  Is there a
> test case you can add to the testsuite?  Or an example code fragment
> that shows how is the locus better now?
>
> OK for google/main.
>
>
> Diego.

Patch

Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 174547)
+++ ifcvt.c	(working copy)
@@ -1670,7 +1670,7 @@ 
   if (!tmp)
     return FALSE;
 
-  emit_insn_before_setloc (tmp, if_info->jump, INSN_LOCATOR (if_info->insn_a));
+  emit_insn_before_setloc (tmp, if_info->jump, INSN_LOCATOR (if_info->jump));
   return TRUE;
 
  end_seq_and_fail: