summaryrefslogtreecommitdiff
path: root/MLKLLVMCompiler.mm
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-16 13:46:35 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-16 15:41:53 +0200
commit9464d1a63f4d2d30b1db08ffbcc4a4994ca16f22 (patch)
tree7e4c96e405133f86585bb95dd3a4dea38e759615 /MLKLLVMCompiler.mm
parent95c1ccd0b1d863e8a7f3643b025dc80000af5aa8 (diff)
MLKLLVMCompiler: Cleanups.
Diffstat (limited to 'MLKLLVMCompiler.mm')
-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