[llvm-dev] this ir code segfaults llvm in trunk
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 6 10:15:42 PST 2017
On 6 February 2017 at 09:50, Andrew Kelley <superjoe30 at gmail.com> wrote:
> The phrasing of "attempts", "often", and the fact that it provides hints to
> the inliner makes it sound like coldcc is:
> * useful for optimization purposes regardless of an ABI
> * not necessarily the same ABI on every target - and some ABI will be
> chosen even if it is just the c calling convention
Calling conventions are a bit patchy in LLVM. Some are
language-specific and won't be supported for targets unless someone
decides to port their language to that target. Others are
target-specific and will never be supported elsewhere.
It looks like "coldcc" is one of the former, since Clang never uses
it. Actually only two places even look at it: the inliner and the x86
backend. It was added way back in 2005 and I don't think anyone's done
much with it since.
An alternative "cold" function attribute seems to be slightly more
widely used (and ought to be supported everywhere since it can come
from Clang), though it doesn't change the ABI.
More information about the llvm-dev