This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Hoist reciprocal invariant out of loop
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 07 Apr 2005 22:00:32 -0400
- Subject: Re: [PATCH] Hoist reciprocal invariant out of loop
- References: <20050404055533.GA7986@atrey.karlin.mff.cuni.cz>
I ran SPEC CPU2000 on powerpc-darwin with four different
combinations: no generation of reciprocal, RTL reciprocal (current
behavior), both Tree-SSA reciprocal (patch) and RTL, and Tree-SSA
reciprocal. The results for the benchmarks that changed are:
no recip rtl-only rtl+tree tree-only
300.twolf -2% 0 0 0
168.wupwise -1% 0 0 0
179.art -1% 0 -0.5% -1%
187.facerec 0 0 +1% 0
189.lucas -1% 0 0 0
200.sixtrack +1% 0 +2% 0
301.apsi -3% 0 0 -0.7%
Based on the degradation without any optimization (except for
200.sixtrack), the mostly similar performance benefit from the Tree-SSA
version, and the previously discussed problems with the current RTL
implementation in expand_expr_real(), I plan to commit the approved patch
shortly. We then can begin discussing the removal of the RTL reciprocal
functionality.
The question of outermost_invariant_loop() versus
outermost_invariant_loop_expr() remains unresolved. I would appreciate
some further explanation of "gimple rhs operands only" versus "arbitrary
expressions".
Thanks, David