http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56524
--- Comment #8 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2013-03-07 18:40:59 UTC --- (In reply to comment #6) > I don't like the patch too much. Why are you removing the cfun->optabs stuff? Because Aldy says, it's getting confusing having all these optabs flying around. > set_cfun is called pretty often, e.g. during IPA switching to various > functions > and back, when you remove cfun->optabs, it will constantly need to recompute > the optabs (quite expensive operation) if switching between mips16 vs. > non-mips16 functions with different optimization attributes. I don't think that's true, is it? It would only recompute the flags if switching between mips16 and nomips16 functions that have the _same non-default_ optimisation flags. TBH I think that's so rare that it's not worth worrying about for 4.8. I think this optabs stuff is only a stopgap. As I said in the thread on list, and as you said in the original PR, I think we should seriously consider switching the full target_globals structure instead. We can see how things look then as to whether it's worth caching in both cfun and the optimisation node. Richard