This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Remove useless null pointer checks
- From: Jeff Sturm <jsturm at one-point dot com>
- To: law at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 31 Jul 2003 00:50:34 -0400 (EDT)
- Subject: Re: [tree-ssa] Remove useless null pointer checks
On Wed, 30 Jul 2003 law@redhat.com wrote:
> >Somehow the RTL optimizers never caught on to this.
> Odd. We've got a pass do do this at the RTL level and from the structure
> of your code I'd expect it to remove the useless check. Very odd.
Because delete_null_pointer_checks_1 can't cope with a COMPONENT_REF,
perhaps? The test for loads:
if (GET_CODE (SET_SRC (set)) == MEM
&& GET_CODE ((reg = XEXP (SET_SRC (set), 0))) == REG
won't match:
(set (reg:SI 61)
(mem/s:SI (plus:SI (reg/v/f:SI 59 [ a ])
(const_int 8 [0x8])) [7 <variable>.i+0 S4 A32]))
Jeff