From 57f54dbd125d25eae15616614a5baba1306da2b6 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 25 Jan 2017 10:25:00 +0000 Subject: [PATCH] llvm_ir_generator: recognize inline and forceinline flags. --- artiq/compiler/transforms/llvm_ir_generator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 09e62aab8..71e61e58b 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -532,6 +532,10 @@ class LLVMIRGenerator: if func.is_cold: self.llfunction.attributes.add('cold') 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.personality = self.llbuiltin("__artiq_personality")