On 04/04/2016 01:08 PM, Patrick Palka wrote:
+ tree *slot = &cv_cache->get_or_insert (t, NULL); + if (*slot == NULL_TREE) + *slot = maybe_constant_value_1 (t, decl);
...
- fold_cache.put (org_x, x); + *slot = x;
This pattern isn't safe; the slot might move due to hash table resizing between the get_or_insert and the store to *slot. Just use get/put.
Jason