forked from M-Labs/artiq
1
0
Fork 0

llvm_ir_generator: recognize inline and forceinline flags.

This commit is contained in:
whitequark 2017-01-25 10:25:00 +00:00
parent 7b6de36d1d
commit 57f54dbd12
1 changed files with 4 additions and 0 deletions

View File

@ -532,6 +532,10 @@ class LLVMIRGenerator:
if func.is_cold: if func.is_cold:
self.llfunction.attributes.add('cold') self.llfunction.attributes.add('cold')
self.llfunction.attributes.add('noinline') self.llfunction.attributes.add('noinline')
if 'inline' in func.flags:
self.llfunction.attributes.add('inlinehint')
if 'forceinline' in func.flags:
self.llfunction.attributes.add('alwaysinline')
self.llfunction.attributes.add('uwtable') self.llfunction.attributes.add('uwtable')
self.llfunction.attributes.personality = self.llbuiltin("__artiq_personality") self.llfunction.attributes.personality = self.llbuiltin("__artiq_personality")