This is the mail archive of the gcc@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: GCC gprof statistics



On Sunday, Jun 29, 2003, at 06:46 US/Eastern, ishikawa@yk.rim.or.jp wrote:

For example, I looked at how for_each_rtx, worst offender in terms of time spent in flat profile, is called so many times. It was not so evident how possibly to reduce the calls.

Using Shark from the CHUD tools, sampling for 30 seconds, here are the top 3 functions which call expr_equiv_p:
8.2% ldst_entry cc1
3.1% expr_equiv_p cc1 <--- itself (already lowered)
2.1% trim_ld_motion_mems cc1



Note this version of gcc which I tested includes a patch which optimize the common case of "ee" for the rtl/rtx:
3.6% 1906 if ( GET_RTX_LENGTH (code) == 2 && fmt[0] == 'e' && fmt[1] == 'e')
1907 {
0.2% 1908 if (! expr_equiv_p (XEXP (x, 1), XEXP (y, 1)))
1909 return 0; !Invariant
1910 return expr_equiv_p (XEXP (x, 0), XEXP (y, 0));
1911 }


which causes expr_equiv_p to be able changed into a loop for that case.
This patch has also been applied (for me) to for_each_rtx.

I also have a patch which causes the number of calls to expr_equiv_p to be lowered by switching around
(in find_rtx_in_ldst) the left hand with the right in the "and".



Thanks, Andrew Pinski


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