Improve costing of speculative calls in ipa-fnsummary
This patch implements logic to estimate_edge_devirt_benefit to not account call
statement sizes of speculative calls in case we know the call we be turned to
direct call by inlining. I also noticed that estimate_edge_size_and_time fails
to accont code size savings by devirtualization when not asked to compute hints
(this is quite rare; only early inliner and inlining functions called once is
affected) and compensated for that in estimate_calls_size_and_time
gcc/ChangeLog:
* ipa-fnsummary.cc (estimate_edge_devirt_benefit): Handle speculative
edges correctly.
(estimate_edge_size_and_time): Even when not collecting hints,
devirtualization affects function size.
(estimate_calls_size_and_time): Do not use tables when devirtualization
is possible.