Re: [PATCH 2/2] analyzer: avoid use of fold_build2

2020-01-31 Thread Andrew Pinski
On Thu, Jan 30, 2020 at 5:19 PM David Malcolm wrote: > > Various places in the analyzer use fold_build2, test the result, then > discard it. It's more efficient to use fold_binary, which avoids > building and GC-ing a redundant tree for the cases where folding fails. If these are all true intege

Re: [PATCH 2/2] analyzer: avoid use of fold_build2

2020-01-31 Thread Jakub Jelinek
On Thu, Jan 30, 2020 at 08:19:18PM -0500, David Malcolm wrote: > gcc/analyzer/ChangeLog: > * constraint-manager.cc (range::constrained_to_single_element): > Replace fold_build2 with fold_binary. Remove unnecessary newline. > (constraint_manager::get_or_add_equiv_class): Replace f

[PATCH 2/2] analyzer: avoid use of fold_build2

2020-01-30 Thread David Malcolm
Various places in the analyzer use fold_build2, test the result, then discard it. It's more efficient to use fold_binary, which avoids building and GC-ing a redundant tree for the cases where folding fails. gcc/analyzer/ChangeLog: * constraint-manager.cc (range::constrained_to_single_elem