From 8d9be8bd39dc08996c1e8de8d8f7517913287dc7 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 23 Aug 2008 18:49:20 +0200 Subject: LLVM compiler: Add support for function inlining. --- MLKLLVMCompiler.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 898ece2..f2d1d6e 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -40,6 +40,7 @@ #include #include #include +#include // InlineFunction #include #include @@ -520,6 +521,14 @@ static Constant args.end(), [MLKPrintToString(_head) UTF8String]); + // XXX + if (NO && [_context functionInline:_head]) + { + InlineFunction (call); + } + + //[_compiler insertTrace:[NSString stringWithFormat:@"%@ done.", MLKPrintToString(_head)]]; + return call; } @end -- cgit v1.2.3