------- Comment #31 from rguenth at gcc dot gnu dot org 2008-01-08 12:55 ------- Another hot assert is
static inline tree memory_partition (tree sym) { tree tag; /* MPTs belong to their own partition. */ if (TREE_CODE (sym) == MEMORY_PARTITION_TAG) return sym; gcc_assert (!is_gimple_reg (sym)); and is_gimple_reg isn't cheap either. For this testcase two thirds of the calls are attributed to add_vars_for_offset (through add_v{use,def}): 0.50 0.01 135234172/199610365 add_vars_for_offset [27] [114] 1.1 0.74 0.01 199610365 is_gimple_reg [114] and it really isn't cheap: CPU: AMD64 processors, speed 2000 MHz (estimated) Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000 samples % symbol name 545326 36.8318 ggc_alloc_stat 310838 20.9943 add_vars_for_offset 85655 5.7852 add_virtual_operand 69156 4.6709 finalize_ssa_stmt_operands 57057 3.8537 bitmap_set_bit 36755 2.4825 htab_find_with_hash 35915 2.4257 get_expr_operands 28207 1.9051 is_gimple_reg 23340 1.5764 referenced_var_lookup wrapping the assert inside ENABLE_CHECKING buys us 2s or 2.5%. But this is too much micro-optimizing for me ;) I'd rather have the quadratic SSA rewriting in the unroller fixed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34683