middle-end/112785 - guard against last_clique overflow
commit0c2ea80a4ffbddc0bc29f5badaf2ae43e59483b2
authorRichard Biener <rguenther@suse.de>
Mon, 4 Dec 2023 13:50:59 +0000 (4 14:50 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 4 Dec 2023 14:33:58 +0000 (4 15:33 +0100)
tree3eea2dce78a72ebb27d6791572b485a8f6db7b82
parent82576a6e77e0a284975dda87efe4b2d5bc5b9b1c
middle-end/112785 - guard against last_clique overflow

The PR shows that we'll ICE eventually when last_clique wraps.  The
following avoids this by refusing to hand out new cliques after
exhausting them.  We then use zero (no clique) as conservative
fallback.

PR middle-end/112785
* function.h (get_new_clique): New inline function handling
last_clique overflow.
* cfgrtl.cc (duplicate_insn_chain): Use it.
* tree-cfg.cc (gimple_duplicate_bb): Likewise.
* tree-inline.cc (remap_dependence_clique): Likewise.
gcc/cfgrtl.cc
gcc/function.h
gcc/tree-cfg.cc
gcc/tree-inline.cc