]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/function-tests.cc
Apply TLC to control dependence compute
authorRichard Biener <rguenther@suse.de>
Wed, 10 Nov 2021 11:15:20 +0000 (12:15 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 11 Nov 2021 08:19:49 +0000 (09:19 +0100)
commita11afa7af8ae496a403be9f6dac9e72a27d59466
tree52bb7be98e95276ddcb557d53eb051ebe15bfca8
parenta97fdde627e64202940112009d45d17f85e4cc61
Apply TLC to control dependence compute

This makes the control dependence compute avoid a find_edge
and optimizes allocation by embedding the bitmap head into the
vector of control dependences instead of allocating all of them.
It also uses a local bitmap obstack.

The bitmap changes make it necessary to shuffle some includes.

2021-11-10  Richard Biener  <rguenther@suse.de>

* cfganal.h (control_dependences::control_dependence_map):
Embed bitmap_head.
(control_dependences::m_bitmaps): New.
* cfganal.c (control_dependences::set_control_dependence_map_bit):
Adjust.
(control_dependences::clear_control_dependence_bitmap):
Likewise.
(control_dependences::find_control_dependence): Do not
find_edge for the abnormal edge test.
(control_dependences::control_dependences): Instead do not
add abnormal edges to the edge list.  Adjust.
(control_dependences::~control_dependences): Likewise.
(control_dependences::get_edges_dependent_on): Likewise.
* function-tests.c: Include bitmap.h.

gcc/analyzer/
* supergraph.cc: Include bitmap.h.

gcc/c/
* gimple-parser.c: Shuffle bitmap.h include.
gcc/analyzer/supergraph.cc
gcc/c/gimple-parser.c
gcc/cfganal.c
gcc/cfganal.h
gcc/function-tests.c