Message ID | 20100625142043.GA25783@intel.com |
---|---|
State | New |
Headers | show |
On Fri, Jun 25, 2010 at 4:20 PM, H.J. Lu <hongjiu.lu@intel.com> wrote: > Hi, > > When searching removable zero extends, there is no need to exam debug > insns. Tested on Linux/x86-64. OK to install? INSN_P already icnludes DEBUG_INSNs, so I don't see how this patch makes sense. > Thanks. > > > H.J. > --- > 2010-06-25 H.J. Lu <hongjiu.lu@intel.com> > > PR rtl-optimization/44326 > * implicit-zee.c (find_removable_zero_extends): Replace > INSN_P with NONDEBUG_INSN_P. > > diff --git a/gcc/implicit-zee.c b/gcc/implicit-zee.c > index 3344d7f..46029cd 100644 > --- a/gcc/implicit-zee.c > +++ b/gcc/implicit-zee.c > @@ -858,7 +858,7 @@ find_removable_zero_extends (void) > { > FOR_BB_INSNS (curr_block, curr_insn) > { > - if (!INSN_P (curr_insn)) > + if (!NONDEBUG_INSN_P (curr_insn)) > continue; > > type = for_each_rtx (&PATTERN (curr_insn), >
On Fri, Jun 25, 2010 at 7:25 AM, Richard Guenther <richard.guenther@gmail.com> wrote: > On Fri, Jun 25, 2010 at 4:20 PM, H.J. Lu <hongjiu.lu@intel.com> wrote: >> Hi, >> >> When searching removable zero extends, there is no need to exam debug >> insns. Tested on Linux/x86-64. OK to install? > > INSN_P already icnludes DEBUG_INSNs, so I don't see how this > patch makes sense. if (!INSN_P (curr_insn)) won't match DEBUG_INSNs and we are examing DEBUG_INSNs for nothing. H.J. --- >> Thanks. >> >> >> H.J. >> --- >> 2010-06-25 H.J. Lu <hongjiu.lu@intel.com> >> >> PR rtl-optimization/44326 >> * implicit-zee.c (find_removable_zero_extends): Replace >> INSN_P with NONDEBUG_INSN_P. >> >> diff --git a/gcc/implicit-zee.c b/gcc/implicit-zee.c >> index 3344d7f..46029cd 100644 >> --- a/gcc/implicit-zee.c >> +++ b/gcc/implicit-zee.c >> @@ -858,7 +858,7 @@ find_removable_zero_extends (void) >> { >> FOR_BB_INSNS (curr_block, curr_insn) >> { >> - if (!INSN_P (curr_insn)) >> + if (!NONDEBUG_INSN_P (curr_insn)) >> continue; >> >> type = for_each_rtx (&PATTERN (curr_insn), >> >
On Fri, Jun 25, 2010 at 4:56 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > On Fri, Jun 25, 2010 at 7:25 AM, Richard Guenther > <richard.guenther@gmail.com> wrote: >> On Fri, Jun 25, 2010 at 4:20 PM, H.J. Lu <hongjiu.lu@intel.com> wrote: >>> Hi, >>> >>> When searching removable zero extends, there is no need to exam debug >>> insns. Tested on Linux/x86-64. OK to install? >> >> INSN_P already icnludes DEBUG_INSNs, so I don't see how this >> patch makes sense. > > if (!INSN_P (curr_insn)) won't match DEBUG_INSNs and > we are examing DEBUG_INSNs for nothing. I see I was confused. Pathc is ok. Richard. > > H.J. > --- >>> Thanks. >>> >>> >>> H.J. >>> --- >>> 2010-06-25 H.J. Lu <hongjiu.lu@intel.com> >>> >>> PR rtl-optimization/44326 >>> * implicit-zee.c (find_removable_zero_extends): Replace >>> INSN_P with NONDEBUG_INSN_P. >>> >>> diff --git a/gcc/implicit-zee.c b/gcc/implicit-zee.c >>> index 3344d7f..46029cd 100644 >>> --- a/gcc/implicit-zee.c >>> +++ b/gcc/implicit-zee.c >>> @@ -858,7 +858,7 @@ find_removable_zero_extends (void) >>> { >>> FOR_BB_INSNS (curr_block, curr_insn) >>> { >>> - if (!INSN_P (curr_insn)) >>> + if (!NONDEBUG_INSN_P (curr_insn)) >>> continue; >>> >>> type = for_each_rtx (&PATTERN (curr_insn), >>> >> > > > > -- > H.J. >
On Fri, Jun 25, 2010 at 04:58:02PM +0200, Richard Guenther wrote: > On Fri, Jun 25, 2010 at 4:56 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > > On Fri, Jun 25, 2010 at 7:25 AM, Richard Guenther > > <richard.guenther@gmail.com> wrote: > >> On Fri, Jun 25, 2010 at 4:20 PM, H.J. Lu <hongjiu.lu@intel.com> wrote: > >>> Hi, > >>> > >>> When searching removable zero extends, there is no need to exam debug > >>> insns. Tested on Linux/x86-64. OK to install? > >> > >> INSN_P already icnludes DEBUG_INSNs, so I don't see how this > >> patch makes sense. > > > > if (!INSN_P (curr_insn)) won't match DEBUG_INSNs and > > we are examing DEBUG_INSNs for nothing. > > I see I was confused. > > Pathc is ok. BTW, I wonder if for_each_rtx is the right thing to find sets, wouldn't note_stores be much better function for that? Jakub
> BTW, I wonder if for_each_rtx is the right thing to find sets, wouldn't > note_stores be much better function for that? Right, note_stores/note_uses is the correct way to find sets/uses. A patch to fix this is pre-approved.
diff --git a/gcc/implicit-zee.c b/gcc/implicit-zee.c index 3344d7f..46029cd 100644 --- a/gcc/implicit-zee.c +++ b/gcc/implicit-zee.c @@ -858,7 +858,7 @@ find_removable_zero_extends (void) { FOR_BB_INSNS (curr_block, curr_insn) { - if (!INSN_P (curr_insn)) + if (!NONDEBUG_INSN_P (curr_insn)) continue; type = for_each_rtx (&PATTERN (curr_insn),