diff options
author | David Robillard <d@drobilla.net> | 2009-06-20 18:21:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-20 18:21:12 +0000 |
commit | 2c8d949da599dacd7676ea49010e8a739845bac4 (patch) | |
tree | 17251fdf7632cca668ad91b99eafce39c6c92c53 | |
parent | ced439fb6918e8848882d0e3a65f11b72da92425 (diff) | |
download | resp-2c8d949da599dacd7676ea49010e8a739845bac4.tar.gz resp-2c8d949da599dacd7676ea49010e8a739845bac4.tar.bz2 resp-2c8d949da599dacd7676ea49010e8a739845bac4.zip |
Fix building with explicit stack frames.
Tidy.
git-svn-id: http://svn.drobilla.net/resp/tuplr@134 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-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; |