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: AUTOMATON_STATE_ALTS not used, yet takes 60KB of insn-attrtab.c


Vladimir Makarov <vmakarov@redhat.com> writes:

> Zack Weinberg wrote:
>> 
>> I am tempted to take a chainsaw to all the AUTOMATON_STATE_ALTS code.
>> However, I can be persuaded to just figure out a way to put
>> insn_alts() under #if too.  Do you plan to have AUTOMATON_STATE_ALTS
>> be used for anything - even on just one platform - in GCC 3.4?
>
> Originally, it was used for Itanium scheduler heuristics.  Now ia64 port
> has a general (not heuristic) solution for this.  Generally speaking,
> this code could be used for improving scheduling for some processors.

I think the YAGNI principle applies here - that is, we should not keep
this code around just because it *could* be useful in the future.  If
no port has a near-term (i.e. 3.4 timeframe) actual need for the
feature, it should be taken out.

> Code of insn_alts is smaller than code for insn_state_alts.
> Therefore I did not wrap it up.

It is, however, the second largest function in insn-attrtab.o:

    3901 T result_ready_cost
   58820 T insn_default_latency
   60829 T insn_alts
   69693 T internal_dfa_insn_code

and the fourth largest function in the entire compiler:

   25228 T grokdeclarator
   31679 t recog_18
   31917 T sem_prag__analyze_pragma
   42608 t tree_transform
   52448 T gnat_to_gnu_entity
   58820 T insn_default_latency
   60829 T insn_alts
   69693 T internal_dfa_insn_code
   71953 T expand_expr
   78189 T fold

[that's all front ends mashed together]

All three of the largest functions in insn-attrtab.o have to do with
your scheduler, and are bigger by an order of magnitude than any other
function in that file.  insn_default_latency andinternal_dfa_insn_code 
are used, but I think we should explore ways of making them smaller;
you're the most familiar with this code; would you mind looking into that?

> I'll wrap up insn_alts code too (using new macro AUTOMATON_ALTS)
> because now it is not used.

Thank you.

zw


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