middle-end: On emergency dumps finish the graph generation.
commitec4bc86b4399e50a0c848472126dad776772ee1c
authorTamar Christina <tamar.christina@arm.com>
Thu, 9 Mar 2023 19:43:08 +0000 (9 19:43 +0000)
committerTamar Christina <tamar.christina@arm.com>
Thu, 9 Mar 2023 19:43:08 +0000 (9 19:43 +0000)
tree64ca50383f5d65a0ef11cb781fc5c062ad7106bd
parent8e26ac4749c5ddf827e18a846b1010b091f76fa2
middle-end: On emergency dumps finish the graph generation.

When doing an emergency dump the cfg output dumps are corrupted because the
ending "}" is missing.

Normally when the pass manager finishes it would call finish_graph_dump_file to
produce this.  This is called here because each pass can dump multiple digraphs.

However during an emergency dump we only dump the current function and so after
that is done we never go back to the pass manager.

As such, we need to manually call finish_graph_dump_file in order to properly
finish off graph generation.

With this -ftree-dump-*-graph works properly during a crash dump.

gcc/ChangeLog:

* passes.cc (emergency_dump_function): Finish graph generation.
gcc/passes.cc