Home | History | Annotate | Download | only in gcc

Lines Matching refs:tab

259 /* Return TRUE if VERSION is to be replaced by an expression in TAB.  */
262 version_to_be_replaced_p (temp_expr_table *tab, int version)
264 if (!tab->replaceable_expressions)
266 return bitmap_bit_p (tab->replaceable_expressions, version);
270 /* Add partition P to the list if partitions VERSION is dependent on. TAB is
274 make_dependent_on_partition (temp_expr_table *tab, int version, int p)
276 if (!tab->partition_dependencies[version])
277 tab->partition_dependencies[version] = BITMAP_ALLOC (&ter_bitmap_obstack);
279 bitmap_set_bit (tab->partition_dependencies[version], p);
283 /* Add VER to the kill list for P. TAB is the expression table */
286 add_to_partition_kill_list (temp_expr_table *tab, int p, int ver)
288 if (!tab->kill_list[p])
290 tab->kill_list[p] = BITMAP_ALLOC (&ter_bitmap_obstack);
291 bitmap_set_bit (tab->partition_in_use, p);
293 bitmap_set_bit (tab->kill_list[p], ver);
297 /* Remove VER from the partition kill list for P. TAB is the expression
301 remove_from_partition_kill_list (temp_expr_table *tab, int p, int version)
303 gcc_checking_assert (tab->kill_list[p]);
304 bitmap_clear_bit (tab->kill_list[p], version);
305 if (bitmap_empty_p (tab->kill_list[p]))
307 bitmap_clear_bit (tab->partition_in_use, p);
308 BITMAP_FREE (tab->kill_list[p]);
315 expression. These are contained in the new_replaceable list. TAB is the
319 add_dependence (temp_expr_table *tab, int version, tree var)
326 if (version_to_be_replaced_p (tab, i))
328 if (!bitmap_empty_p (tab->new_replaceable_dependencies))
332 EXECUTE_IF_SET_IN_BITMAP (tab->new_replaceable_dependencies, 0, x, bi)
333 add_to_partition_kill_list (tab, x, version);
337 if (!tab->partition_dependencies[version])
338 tab->partition_dependencies[version] =
340 bitmap_ior_into (tab->partition_dependencies[version],
341 tab->new_replaceable_dependencies);
342 bitmap_ior_into (tab->partition_in_use,
343 tab->new_replaceable_dependencies);
345 bitmap_clear (tab->new_replaceable_dependencies);
350 i = var_to_partition (tab->map, var);
352 gcc_checking_assert (tab->num_in_part[i] != 0);
356 if (tab->num_in_part[i] > 1)
358 add_to_partition_kill_list (tab, i, version);
359 make_dependent_on_partition (tab, version, i);
366 consideration in table TAB. If FREE_EXPR is true, then remove the
370 finished_with_expr (temp_expr_table *tab, int version, bool free_expr)
377 if (tab->partition_dependencies[version])
379 EXECUTE_IF_SET_IN_BITMAP (tab->partition_dependencies[version], 0, i, bi)
380 remove_from_partition_kill_list (tab, i, version);
381 BITMAP_FREE (tab->partition_dependencies[version]);
384 BITMAP_FREE (tab->expr_decl_uids[version]);
442 process_replaceable (temp_expr_table *tab, gimple *stmt, int call_cnt,
465 use_vars = tab->expr_decl_uids[var_version];
466 add_dependence (tab, version, var);
470 BITMAP_FREE (tab->expr_decl_uids[var_version]);
475 tab->expr_decl_uids[version] = def_vars;
480 make_dependent_on_partition (tab, version, VIRTUAL_PARTITION (tab));
481 add_to_partition_kill_list (tab, VIRTUAL_PARTITION (tab), version);
484 tab->call_cnt[version] = call_cnt;
485 tab->reg_vars_cnt[version] = reg_vars_cnt;
489 /* This function removes any expression in TAB which is dependent on PARTITION
493 kill_expr (temp_expr_table *tab, int partition)
499 while (tab->kill_list[partition])
501 version = bitmap_first_set_bit (tab->kill_list[partition]);
502 finished_with_expr (tab, version, true);
505 gcc_checking_assert (!tab->kill_list[partition]);
509 /* This function kills all expressions in TAB which are dependent on virtual
513 kill_virtual_exprs (temp_expr_table *tab)
515 kill_expr (tab, VIRTUAL_PARTITION (tab));
520 the defining stmt into the partition_dependencies table TAB. If
524 mark_replaceable (temp_expr_table *tab, tree var, bool more_replacing)
529 if (more_replacing && tab->partition_dependencies[version])
530 bitmap_ior_into (tab->new_replaceable_dependencies,
531 tab->partition_dependencies[version]);
533 finished_with_expr (tab, version, !more_replacing);
538 if (!tab->replaceable_expressions)
539 tab->replaceable_expressions = BITMAP_ALLOC (NULL);
540 bitmap_set_bit (tab->replaceable_expressions, version);
569 be replaced by their expressions. Results are stored in the table TAB. */
572 find_replaceable_in_bb (temp_expr_table *tab, basic_block bb)
578 var_map map = tab->map;
599 if (tab->expr_decl_uids[ver])
603 bitmap vars = tab->expr_decl_uids[ver];
665 || (tab->call_cnt[ver] != cur_call_cnt
670 || tab->reg_vars_cnt[ver] != cur_reg_vars_cnt)
671 finished_with_expr (tab, ver, true);
673 mark_replaceable (tab, use, stmt_replaceable);
681 if (partition != NO_PARTITION && tab->kill_list[partition])
682 kill_expr (tab, partition);
702 process_replaceable (tab, stmt, cur_call_cnt, cur_reg_vars_cnt);
705 bitmap_clear (tab->new_replaceable_dependencies);
710 kill_virtual_exprs (tab);