]> git.ipfire.org Git - thirdparty/gcc.git/commit
cse.c: Change encoding of quantity numbers to avoid undefined pointer arithmetic...
authorRoger Sayle <roger@eyesopen.com>
Mon, 25 Oct 2004 17:23:15 +0000 (17:23 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 25 Oct 2004 17:23:15 +0000 (17:23 +0000)
commit08a692679fb8ff32f7d63932fd97a90b2aef4c0c
tree497f93ba2711bdc721a726c414ea95d4abf630bd
parent4cd26879f7580e057368bf872d2417764814f2ce
cse.c: Change encoding of quantity numbers to avoid undefined pointer arithmetic on...

* cse.c: Change encoding of quantity numbers to avoid undefined
pointer arithmetic on qty_table.
(REGNO_QTY_VALID_P): A quantity is now valid if it isn't negative.
(get_cse_reg_info): Initialize reg_qty to a unique negative value.
(new_basic_block): Assign "real" quantity numbers from zero.
(delete_reg_equiv): Do nothing if quantity is invalid.  Reset the
REG_QTY to its unique negative value.
(merge_equiv_classes): Calculate need_rehash if quantity is valid.
(cse_main): Don't include max_reg when determining max_qty.
(cse_basic_block): Avoid subtracting a large offset from qty_table,
which causes undefined C99 behaviour.  Only allocate needed memory.

Co-Authored-By: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
From-SVN: r89543
gcc/ChangeLog
gcc/cse.c