[vmkit-commits] [vmkit] r81643 - /vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat Sep 12 15:42:52 PDT 2009
Author: geoffray
Date: Sat Sep 12 17:42:51 2009
New Revision: 81643
URL: http://llvm.org/viewvc/llvm-project?rev=81643&view=rev
Log:
Put gc alloca at the beginning of a native function.
Modified:
vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp
Modified: vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp?rev=81643&r1=81642&r2=81643&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp Sat Sep 12 17:42:51 2009
@@ -356,8 +356,8 @@
currentBlock = NotZero;
- Value* temp = new AllocaInst(module->JavaObjectType, "",
- currentBlock);
+ Instruction* temp = new AllocaInst(module->JavaObjectType, "",
+ func->begin()->begin());
Value* GCArgs[2] = {
new BitCastInst(temp, module->ptrPtrType, "", currentBlock),
module->constantPtrNull
@@ -365,7 +365,7 @@
if (TheCompiler->useCooperativeGC()) {
CallInst::Create(module->llvm_gc_gcroot, GCArgs, GCArgs + 2, "",
- currentBlock);
+ temp);
}
new StoreInst(i, temp, false, currentBlock);
More information about the vmkit-commits
mailing list