Rename DtoAggrCopy/ZeroInit() to DtoMemCpy/SetZero() overloads

And replace some obvious load->store combos by a memcpy.
This commit is contained in:
Martin 2015-11-22 14:39:51 +01:00
parent 740a21eb8f
commit ddfaac10b3
10 changed files with 53 additions and 51 deletions

View file

@ -28,7 +28,7 @@ static void storeVariable(VarDeclaration *vd, LLValue *dst) {
isaPointer(value->getType())) {
// Copy structs and static arrays
LLValue *mem = DtoGcMalloc(vd->loc, DtoType(vd->type), ".gc_mem");
DtoAggrCopy(mem, value);
DtoMemCpy(mem, value);
DtoAlignedStore(mem, dst);
} else {
// Store the address into the frame
@ -521,7 +521,7 @@ void DtoCreateNestedContext(FuncDeclaration *fd) {
// The parameter value is an alloca'd stack slot.
// Copy to the nesting frame and leave the alloca for
// the optimizers to clean up.
DtoStore(DtoLoad(parm->value), gep);
DtoMemCpy(gep, parm->value);
gep->takeName(parm->value);
parm->value = gep;
}