https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63766
Ilya Enkovich <enkovich.gnu at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |enkovich.gnu at gmail dot com --- Comment #4 from Ilya Enkovich <enkovich.gnu at gmail dot com> --- (In reply to Richard Biener from comment #3) > > That's quadratic in the number of nodes and thus a no-go. Why not delay > removing of unreachable nodes instead? If you go with the above then > you need to change that data-structure used. > Delaying removal of unreachable nodes would mean we perform all early optimization passes for node we will later remove. It should be much more expensive then having a hook iterating over nodes vector. I also may add order_idx field into cgraph_node structure or create a local hash to map nodes to indexes.