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]

[PATCH] Speedup/remove uses of is_gimple_reg (PHI_RESULT)


I noticed that a huge amount of time was being spent in is_gimple_reg.
We were calling it on the result of a PHI_NODE to figure out if it was
a virtual PHI node or not.  This patch "steals" the static bit to
indicate if the PHI node is a virtual node.  This speeds up the compiler
but I did not measure how much.  The is_gimple_reg on a profile using
Shark goes down to below the 25th top function on the profile.

OK? Bootstrapped and tested on powerpc-darwin.

Thanks,
Andrew Pinski

ChangeLog:
	* tree.h (PHI_VIRTUAL): New macro, stealing static_flag for it.
	* tree-phinodes.c (make_phi_node): Set PHI_VIRTUAL.
	* tree-dfa.c (compute_immediate_uses): Use PHI_VIRTUAL.
	* tree-if-conv.c (if_convertable_phi_p): Likewise.
	* tree-into-ssa.c (rewrite_virtual_phi_arguments): Likewise.
	* tree-outof-ssa.c (eliminate_virtual_phis): Likewise.
	* tree-ssa-dce.c (find_obviously_necessary_stmts): Likewise.
	(mark_really_necessary_kill_operand_phis): Likewise.
	* tree-ssa-dse.c (dse_record_phis): Likewise.
	* tree-ssa-pre.c (compute_avail): Likewise.
	* tree-vectorizer.c (vect_update_ivs_after_vectorizer): Likewise.
	(vect_analyze_scalar_cycles): Likewise.
	(vect_analyze_loop_with_symbolic_num_of_iters): Likewise.
	

Patch:

Attachment: temp.diff.txt
Description: Text document


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