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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 16:16:54 PDT 2022


efriedma added a comment.

Not sure how much I like the rule about "externally visible functions"... I mean, I guess restricting the checking to external functions avoids triggering on a bunch of cases that would be difficult to handle, but it doesn't really seem self-consistent.

How about this: we introduce NoExt, but in LangRef we just say "If an integer argument to a function is not marked signext/zeroext/noext, the kind of extension is used is target-specific. Some targets may generate less efficient code if the kind of extension is not explicitly specified."  This is basically what you're doing now: follow the attribute, and sign-extend in the caller if there's no attribute.  But there isn't an implication that generating calls without any extension attributes is invalid on all targets.

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").


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

https://reviews.llvm.org/D112942



More information about the llvm-commits mailing list