jdoerfert wrote:

> IIUC, the query 1) you were referring to was `Type::canLosslesslyBitCastTo`. 
> If that's the case, it does nothing for AS cast.

I don't know what I was thinking of, the above or `CastInst::castIsValid`, 
neither is very helpful.

I am personally not opposed to the DL solution, but I guess it's a big change 
that feels too much for me to approve. I'm also worried the "flat" concept is a 
special case of something more generic and we should instead define that. E.g., 
- Does flat imply all AS can cast to it? If so, what happens if that is not 
true anymore in the future. If it's not implied, how do we query what's allowed 
and what is not?
- What about other AS casts that do not involve flat, we can't restrict them 
even if we introduce the flat idea in the DL, right?
- Is there a value in not defining 0 as flat? It's what we basically assume 
everywhere already, isn't it?


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

Reply via email to