nikic wrote:

The *effect* this has is certainly desirable, but I'm not sure this is the way 
to implement it. There was a recent PR 
(https://github.com/llvm/llvm-project/pull/211804) that excluded signature 
changes from optnone. In there, I was arguing that we should really be treating 
optnone the same as noipa in the first place (i.e. basically as an interposable 
function).

We do have this wording in LangRef for optnone:

> This function attribute indicates that most optimization passes will skip 
> this function, with the exception of interprocedural optimization passes. 
> Interprocedural passes may still analyze this function, transform its body, 
> and refine its attributes, but they will not rewrite its signature.

But I don't really see any circumstance under which this would actually be 
desirable behavior, and I think this is more us documenting the way things have 
happened to work until now, because we just did not have the mechanism to 
enforce that optnone is actually optnone.

I'd rather make optnone effectively imply noipa than require a separate 
annotation.

https://github.com/llvm/llvm-project/pull/218782
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to