Re: [PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree

2021-07-06 Thread Liren Wei
On 7/7/21 8:34 AM, Richard Henderson wrote: On 7/4/21 7:31 AM, Liren Wei wrote: -static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp) +static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp, gpointer _) Using _ here as the variable name isn't ideal.  I guess if this were c++ we would a

Re: [PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree

2021-07-06 Thread Richard Henderson
On 7/4/21 7:31 AM, Liren Wei wrote: -static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp) +static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp, gpointer _) Using _ here as the variable name isn't ideal. I guess if this were c++ we would actually omit the name, which is kinda the sam

[PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree

2021-07-04 Thread Liren Wei
The function is called only at tcg_gen_code() when duplicated TBs are translated by different threads, and when the tcg_region_tree is reset. Bake it into the underlying GTree as its value destroy function to unite these situations. Also remove tcg_region_tree_traverse() which now becomes useless.