[tree-ssa] Remove useless null pointer checks
Jeff Sturm
jsturm@one-point.com
Thu Jul 31 04:50:00 GMT 2003
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
More information about the Gcc-patches
mailing list