http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29442

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-07 
12:36:21 UTC ---
(In reply to comment #18)
> (In reply to comment #15)
> Meanwhile Jakub implemented a different mean which doesn't call the get_attr_
> functions dynamically more often (which my approach potentially does), but
> which as result isn't nearly as effective in reducing size and compile and
> generation time.

For reducing compile time (but not size/generation), we could just use the
cache vars with some magic unset value (probably the cache vars would need to
be int
instead of enum for that).  Then if genattrtab finds out that there is no
dominating call to the get_attr_* function, but still potentially for one insn
the same get_attr_* might be called more than once in certain code path, then
for that code path it could just use (cache_FOO != -1 ? (enum ...) cache_FOO :
(cache_FOO = get_attr_FOO (...))).

Reply via email to