For the outermost function needing a context frame, use the address of that

frame as the nest argument instead of the address of a single-element list
containing only that frame address.
This saves some stack space and reduces memory accesses.
This commit is contained in:
Frits van Bommel
2009-04-13 04:09:08 +02:00
parent cc492ecc82
commit 5a04c4e9a1
3 changed files with 87 additions and 29 deletions

View File

@@ -46,6 +46,7 @@ struct IrFunction : IrBase
llvm::Value* nestedVar; // nested var alloca
const llvm::StructType* framesType; // type of nested context (not for -nested-ctx=array)
bool elidedCtxList; // whether the nested context is a raw frame instead of a list of frames (-nested-ctx=hybrid only)
llvm::Value* _arguments;
llvm::Value* _argptr;