> > > /* High branch cost, expand as the bitwise OR of the conditions. > > Do the same if the RHS has side effects, because we're effectively > > turning a TRUTH_OR_EXPR into a TRUTH_ORIF_EXPR. */ > >! if (BRANCH_COST (!optimize_size, false)>= 4 > >! || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1))) > > What does BRANCH_COST (!optimize_save, ...) mean?
This leaked here from older version of patch. I updated it to ! if (BRANCH_COST (cfun->function_frequency > FUNCTION_FREQUENCY_NORMAL, ! false) >= 4 ! like it is handled in other cases. Once we will get hotness info available during expansion, we will simply pass it here. > > Related -- could you define auxiliary macros for BRANCH_COST (foo, false)? But I can also hide the cfun->function_frequency trick in DEFAULT_BRANCH_COST macro if it seems to help. (in longer term I hope they will all go away as expansion needs to be aware of hotness info anyway) Honza > > Thanks! > > Paolo