efriedma-quic wrote:

The two issues are sort of tied together: if the intrinsic isn't IntrNoMem, I 
suspect the assumption cache stops cooperating.

But anyway, I guess the question is really whether we want these constructs 
represented explicitly in IR, to try to leverage the AssumptionCache, or if we 
want to instead add a TTI hook for transform passes to query for the 
information in question.  My default is not to use assumptions; llvm.assume 
calls still cause issues for optimizations, and they're not really necessary 
here.  (I think the situation around llvm.assume has improved to some extent, 
but it's still a bit problematic.)

Even if we do decide we want assumptions, we likely want to add them in an IR 
pass, instead of in clang, so that other frontends don't need to duplicate this 
code.

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

Reply via email to