On Thu, Jan 9, 2014 at 11:24 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, Jan 09, 2014 at 09:02:28AM +0000, Richard Sandiford wrote: >> It looks like a correct fix, but the memcpy is going to be pretty >> expensive, since in most cases there will be no difference. > > Perhaps we should add another tree code, which would represent the > combination of TARGET_OPTION_NODE and OPTIMIZATION_NODE, FUNCTION_DECL > would then refer to this combo node only and that new tree would > refer to both TARGET_OPTION_NODE and OPTIMIZATION_NODE. > That way we could stick the saved optabs into the new node rather than > having default opt cached target optabs, non-default opt with default > target optabs cached too, but for non-default target non-default opt we > don't cache anything and always recompute. > > Or perhaps just merge both TARGET_OPTION_NODE and OPTIMIZATION_NODE > into one and let both target and optimize attributes adjust it?
Yeah - I fail to see why we have two different tree nodes here anyway. Richard. > Jakub