On Mon, Feb 26, 2018 at 07:30:17PM -0800, Christopher Li wrote: > > It is possible that CSE is seeing same value of constant has > two different size might consider it as different pseudo. In those > case we want to close examine how do it get into this situation > in the first place. commit 16d44cca4a36a76af8ce548442b6d541fade5e68 diff --git a/linearize.c b/linearize.c index ba76397ea..2aa3acb2c 100644 --- a/linearize.c +++ b/linearize.c @@ -785,22 +785,25 @@ static pseudo_t symbol_pseudo(struct entrypoint *ep, struct symbol *sym) return pseudo; } -pseudo_t value_pseudo(long long val) +pseudo_t value_pseudo(struct symbol *type, long long val) { #define MAX_VAL_HASH 64 static struct pseudo_list *prev[MAX_VAL_HASH]; int hash = val & (MAX_VAL_HASH-1); struct pseudo_list **list = prev + hash; + int size = type ? type->bit_size : value_size(val); pseudo_t pseudo; + FOR_EACH_PTR(*list, pseudo) { - if (pseudo->value == val) + if (pseudo->value == val && pseudo->size == size) return pseudo; } END_FOR_EACH_PTR(pseudo); -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html