On 10/8/26 1:24 AM, Eric Botcazou wrote:
I found this explanation confusing.
Likewise.

If I'm understanding things correctly, we can have multiple instances of
the same address on the addr_list.  It's just an address, not a full
MEM, so we don't have address space information.  Right?

Once we've found the right addr_list, we have to walk the values list
since that's the one that will carry the actual MEM expression where
we've got access to the address space?  For that second case we need to
check both the underlying address as well as the address space?
I don't understand why we need to re-check that the value is at the specified
address, since it is on the addr_list defined like this:

   /* If this value is used as an address, points to a list of values that
      use it as an address in a MEM.  */
   struct elt_list *addr_list;

Why was it put onto the list in the first place then?  Does the fix not belong
there instead of in cselib_lookup_mem?
I think what you're suggesting would require either multiple ADDR_LIST entries and we'd traverse the one appropriate for the address space we're interested in, or it would require the entries to carry address space information so that we could ignore them if the spaces don't match.

Jeff

Reply via email to