mizvekov wrote:

I agree that if we can't guarantee it will be tail-called, this must be an 
error.

must_tail is not an optimization.

In fact, LLVM by itself will already perform tail call optimizations, and 
remove them when it would not be profitable in terms of execution cost.

The point of must_tail is to support cases where the tail call is required for 
correctness, otherwise by ignoring it will lead to UB.

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

Reply via email to