From 9464d1a63f4d2d30b1db08ffbcc4a4994ca16f22 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 16 Aug 2008 13:46:35 +0200 Subject: MLKLLVMCompiler: Cleanups. --- MLKLLVMCompiler.mm | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 72b1c3d..93c0640 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -80,6 +80,7 @@ static Constant module_provider = new ExistingModuleProvider (module); fpm = new FunctionPassManager (module_provider); fpm->add (new TargetData (*execution_engine->getTargetData())); + //fpm->add (new TargetData (module)); fpm->add (createInstructionCombiningPass()); fpm->add (createReassociatePass()); fpm->add (createGVNPass()); @@ -119,7 +120,7 @@ static Constant inContext:context forCompiler:self]]; - [self insertTrace:@"Bla.\n"]; + [self insertTrace:@"Bla."]; builder.CreateRet (v); verifyFunction (*function); @@ -275,12 +276,6 @@ static Constant NULL); builder.CreateCall (function, createGlobalStringPtr ([message UTF8String])); - - Constant *function2 = - module->getOrInsertFunction ("fflush", - Type::Int32Ty, - PointerTy, - NULL); } @end @@ -525,10 +520,6 @@ static Constant Value *closure_data = ConstantPointerNull::get (PointerTy); argv[0] = function; - // argv[0] = (builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, - // (uint64_t)function_code, - // false), - // PointerTy)); argv.push_back (closure_data); argv.push_back (builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, 0, @@ -541,6 +532,8 @@ static Constant onObject:mlkcompiledclosure withArgumentVector:&argv]; + //function->viewCFG(); + return closure; } @end -- cgit v1.2.3