llvm_ir_generator: do not use 'coldcc' calling convention.

First, this calling convention doesn't actually exist in OR1K
and trying to use it in Asserts build causes an UNREACHABLE.

Second, I tried to introduce it and it does not appear to produce
any measurable benefit: not only OR1K has a ton of CSRs but also
it is quite hard, if not realistically impossible, to produce
the kind of register pressure that would be relieved by sparing
a few more CSRs for our exception raising function calls, since
temporaries don't have to be preserved before a noreturn call
and spilling over ten registers across an exceptional edge
is not something that the code we care about would do.

Third, it produces measurable drawbacks: it inflates code size
of check:* functions by adding spills. Of course, this could be
alleviated by making __artiq_raise coldcc as well, but what's
the point anyway?
This commit is contained in:
whitequark 2016-03-29 15:19:46 +00:00 committed by Sebastien Bourdeauducq
parent e416246e78
commit f59fd8faec
1 changed files with 0 additions and 7 deletions

View File

@ -569,7 +569,6 @@ class LLVMIRGenerator:
if func.is_internal:
self.llfunction.linkage = 'private'
if func.is_cold:
self.llfunction.calling_convention = 'coldcc'
self.llfunction.attributes.add('cold')
self.llfunction.attributes.add('noinline')
@ -1322,9 +1321,6 @@ class LLVMIRGenerator:
if types.is_c_function(functiontyp) and 'nowrite' in functiontyp.flags:
llcall.metadata['tbaa'] = self.tbaa_nowrite_call
if insn.is_cold:
llcall.cconv = 'coldcc'
return llresult
def process_Invoke(self, insn):
@ -1358,9 +1354,6 @@ class LLVMIRGenerator:
if types.is_c_function(functiontyp) and 'nowrite' in functiontyp.flags:
llcall.metadata['tbaa'] = self.tbaa_nowrite_call
if insn.is_cold:
llcall.cconv = 'coldcc'
return llcall
def _quote(self, value, typ, path):