diff options
Diffstat (limited to 'llvm.cpp')
-rw-r--r-- | llvm.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -286,6 +286,8 @@ AClosure::liftCall(CEnv& cenv, const AType& argsT) #ifdef EXPLICIT_STACK_FRAMES + IRBuilder<> builder = llengine(cenv)->builder; + // Scan out definitions for (size_t i = 0; i < size(); ++i) { ADefinition* def = at(i)->to<ADefinition*>(); @@ -298,15 +300,11 @@ AClosure::liftCall(CEnv& cenv, const AType& argsT) } // Create stack frame - StructType* frameT = StructType::get(types, false); - PointerType* framePtrT = PointerType::get(frameT, 0); - - Value* tag = ConstantInt::get(Type::Int8Ty, (uint8_t)GC::TAG_FRAME); - - Value* frameSize = ConstantInt::get(Type::Int32Ty, s / 8); - Value* frame = builder.CreateCall2(llVal(cenv.alloc), frameSize, tag, "frame"); - - Value* framePtr = builder.CreateBitCast(frame, framePtrT, "frameptr"); + StructType* frameT = StructType::get(types, false); + Value* tag = ConstantInt::get(Type::Int8Ty, GC::TAG_FRAME); + Value* frameSize = ConstantInt::get(Type::Int32Ty, s / 8); + Value* frame = builder.CreateCall2(llVal(cenv.alloc), frameSize, tag, "frame"); + Value* framePtr = builder.CreateBitCast(frame, PointerType::get(frameT, 0)); // Bind parameter values in stack frame i = 2; |