This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] cse.c: Speed up delete_trivially_dead_insns - Part 2


On Thu, 2005-02-24 at 17:45 -0500, Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to speed up delete_trivially_dead_insns.
> 
> When delete_trivially_dead_insns scans the insn chain *backward*, it
> keeps track of whether the current insn being scanned is a part of a
> libcall or not.  Specifically, it calls for each insn
> 
>   find_reg_note (insn, REG_RETVAL, NULL_RTX)
> 
> and
> 
>   find_reg_note (insn, REG_LIBCALL, NULL_RTX)
> 
> to maintain local variable IN_LIBCALL.  Of these two calls, the latter
> obviously isn't needed if we are not in a libcall.
> 
> The patch simply avoids the latter if we are not in a libcall.
> 
> Here is a timing in seconds for five runs of ./cc1 -quiet -O2
> -fomit-frame-pointer -o /dev/null.
> 
>                original patched   diff%
> c-common.i       17.940  17.894 -0.256%
> combine.i        16.435  16.394 -0.249%
> fold-const.i     36.947  36.775 -0.465%
> reload1.i        12.879  12.864 -0.116%
> reload.i         11.878  11.863 -0.126%
> insn-attrtab.i  173.949 173.554 -0.227%
> 
> Tested on i686-pc-linux-gnu.  OK to apply?
> 
> Kazu Hirata
> 
> 2005-02-24  Kazu Hirata  <kazu@cs.umass.edu>
> 
> 	* cse.c (delete_trivially_dead_insns): Speed up by minimizing
> 	calls to find_reg_note.
This is fine.  

Thanks,
Jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]