tree-optimization/38474 - improve PTA varinfo sorting
authorRichard Biener <rguenther@suse.de>
Tue, 16 Feb 2021 11:42:26 +0000 (12:42 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 16 Feb 2021 11:48:07 +0000 (12:48 +0100)
commit3f16a1678156035bbe73b217fbce4d9c27d1d559
treef8d21947d8f38f1e57586d6250bf1c5bb02f85e2
parent1531f39268c8973cf9478585fba5c5bbdb6e9c4c
tree-optimization/38474 - improve PTA varinfo sorting

This improves a previous heuristic to sort address-taken variables
first (because those appear in points-to bitmaps) by tracking which
variables appear in ADDRESSOF constraints (there's also
graph->address_taken but that's computed only later).

This shaves off 30s worth of compile-time for the full testcase in
PR38474 (which then still takes 965s to compile at -O2).

2021-02-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/38474
* tree-ssa-structalias.c (variable_info::address_taken): New.
(new_var_info): Initialize address_taken.
(process_constraint): Set address_taken.
(solve_constraints): Use the new address_taken flag rather
than is_reg_var for sorting variables.
(dump_constraint): Dump the variable number if the name
is just NULL.
gcc/tree-ssa-structalias.c