greater than NUM_VOP_FREE_BUCKETS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120933
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-01-18 Jan Hubicka <jh@suse.cz>
+
+ * tree-ssa-operands.c (vop_free_bucket_size): Never return value
+ greater than NUM_VOP_FREE_BUCKETS.
+
2007-01-18 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c: Update comments.
static inline int
vop_free_bucket_index (int num)
{
- gcc_assert (num > 0);
+ gcc_assert (num > 0 && NUM_VOP_FREE_BUCKETS > 16);
/* Sizes 1 through 16 use buckets 0-15. */
if (num <= 16)
return num - 1;
- /* Buckets 16 - 45 represent 17 through 256 in 8 unit chunks. */
- if (num < 256)
- return 14 + (num - 1) / 8;
- return -1;
+ /* Buckets 16 - NUM_VOP_FREE_BUCKETS represent 8 unit chunks. */
+ num = 14 + (num - 1) / 8;
+ if (num >= NUM_VOP_FREE_BUCKETS)
+ return -1;
+ else
+ return num;
}