Xazax-hun wrote:

An alternative approach would be to do [hash 
consing](https://en.wikipedia.org/wiki/Hash_consing).  Since pointer values are 
completely determined by the pointee (for some definition of the pointee, e.g., 
we might have `void*` and `int*` pointers pointing to the same storage 
location), we could have a single representation for all of the equal pointer 
values and continue to rely on identity. This can also be beneficial for memory 
consumption, but we have to pay for that by making value creation a bit more 
expensive (and the pointer values needs to be immutable). 

That being said, this would be a bit of a departure from the current 
architecture, so I think even if we want to do this, it should be a separate 
PR.  

https://github.com/llvm/llvm-project/pull/75170
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to