[PATCH] D112942: target ABI: improve call parameters extensions handling

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 14:12:39 PDT 2022


efriedma added a comment.

In D112942#3531179 <https://reviews.llvm.org/D112942#3531179>, @jonpa wrote:

> How about:
> "If an integer argument to a function is not marked signext/zeroext/noext, the kind of extension used is target-specific. Some targets depend for correctness the kind of extension to be explicitly specified."

I guess that's sufficient.

>> For the lint in the backend, instead of checking whether the callee is an external symbol, maybe check whether the calling convention is "C" (as opposed to "fast").
>
> Do all externally visible functions always have the "C" calling convention?

Unless you're using some attribute to modify the calling convention, everything in clang defaults to "C".  Some targets, like x86 Windows, frequently use alternate calling conventions, but I assume SystemZ doesn't.

> Should the VerifyIntegerArg() and CheckNarrowIntegerArgs() remain in SystemZ or should I move them somewhere and let any target use them as desired? I think the default extension could be done if desired entirely in the target backend, or?

I think I'm okay leaving it in target-specific code; unifying anything related to calls is hard.


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

https://reviews.llvm.org/D112942



More information about the llvm-commits mailing list