summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLLVMCompiler.mm15
1 files 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