xbolva00 added a subscriber: jacobsa.
xbolva00 added a comment.

>> Could we instead encode the platform specific tail-call rules in Sema? We 
>> definitely have attributes that differ in behavior between platforms, and 
>> this seems like a perfect candidate.

But then you break promise of musttail that code with musttail will work on any 
target supported by LLVM.

Plus, while we can relax frontend checks (based on target info), it is true 
that current LLVM LangRef says that there must be a  match between prototypes.

>> Higher-level question: are we sure there's enough evidence this will be used 
>> in practice to warrant adding it to Clang?

Originally mentioned as request for CTRE project, I have use cases as well, 
@jacobsa (Github issue) mentioned it:

> Personally I would like the semantics "give me an error if this can't be a 
> tail call on this target", not the semantics "give me an error if this can't 
> be a tail call on all targets clang supports". I suspect most people would be 
> looking for the former, since most people care about nearly none of the 
> supported targets by volume.

I agree with that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147714/new/

https://reviews.llvm.org/D147714

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to