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] Speedup DOM and tree-cfg a lot (partial of PR 15524)


In message <D962329B-A93C-11D8-A4A1-000393A6D2F2@physics.uc.edu>, Andrew Pinski
 writes:
 >On May 18, 2004, at 22:19, Diego Novillo wrote:
 >
 >> On Tue, 2004-05-18 at 22:12, Eric Christopher wrote:
 >>
 >>> I don't see how this can be much faster if at all. I've talked to 
 >>> Andrew
 >>> about it and he's doing a timing. If it does turn out to be noticeably
 >>> faster then perhaps we'll want to comment it with something like:
 >>>
 >> Didn't Andrew say that he had timed this and found it faster?  The 
 >> patch
 >> was innocent enough otherwise.
 >
 >Sorry about that.
 >
 >>> /* Compare for equal using tree_int_cst_compare since these
 >>>    are only ever INTEGER_CST.  */
 >>>
 >>> or something?
 >>>
 >> Ah, good point.
 >
 >Well I just found that it actually slowed it down and I so I decided
 >to look for an equal instead and there is one: tree_int_cst_equal.
 >OK if faster and bootstraps and tests fine?
 >
 >	* tree-cfg.c (find_case_label_for_value): Replace call to
 >	simple_cst_equal with tree_int_cst_equal.
This is fine.  I've done similar things within DOM itself, I don't recall
if the improvement was measurable or not, but tree_int_cst_equal is
clearly simpler and ought to be more efficient than simple_cst_equal.

jeff


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