http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52555
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-11 09:00:50 UTC --- Thanks for working on this. I wonder why don't you store a struct target_optabs * filed directly into the optimization node, instead of using a hash table for it. Perhaps NULL could mean the default (&default_target_optabs), so that SWITCHABLE_TARGETS can still do something about it. init_all_optabs is pretty expensive, so if we have say two functions with __attribute__((__optimize__(3))), it would be better to just use the -O3 optabs the second time. And, I wouldn't compare the result of init_all_optabs against saved copy of this_target_optabs, but &default_target_optabs.