Don't waste an alloca for the nested context argument

And so get rid of all loads too; just use the untouched pointer argument
directly.
This commit is contained in:
Martin 2018-02-11 15:14:18 +01:00 committed by David Nadlinger
parent aa0b1b4e3a
commit c6132508b1
3 changed files with 8 additions and 17 deletions

View file

@ -1098,11 +1098,6 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
gIR->DBuilder.EmitLocalVariable(thismem, fd->vthis, nullptr, true);
}
// give the 'nestArg' parameter (an lvalue) storage
if (irFty.arg_nest) {
irFunc->nestArg = DtoAllocaDump(irFunc->nestArg, 0, "nestedFrame");
}
// define all explicit parameters
if (fd->parameters)
defineParameters(irFty, *fd->parameters);