[llvm-dev] this ir code segfaults llvm in trunk

Andrew Kelley via llvm-dev
Mon, 06 Feb 2017 17:50:10 -0000

On Mon, Feb 6, 2017 at 12:36 PM, Tim Northover <t.p.northover at
gmail.com>
wrote:

> On 5 February 2017 at 23:41, Andrew Kelley via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Target: armv7
>
> On a debug compiler it looks like only x86 supports "coldcc" so
you
> need to either implement ARM support or stop using that.
>

Thanks Tim and apologies for my sloppy bug report.

Here is the text from the language reference
<http://llvm.org/docs/LangRef.html#calling-conventions>:

“coldcc” - The cold calling convention
This calling convention attempts to make code in the caller as efficient as
possible under the assumption that the call is not commonly executed. As
such, these calls often preserve all registers so that the call does not
break any live ranges in the caller side. This calling convention does not
support varargs and requires the prototype of all callees to exactly match
the prototype of the function definition. Furthermore the inliner doesn’t
consider such function calls for inlining.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20170206/de5b7a0e/attachment.html>