mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
Rename DtoAggrCopy/ZeroInit() to DtoMemCpy/SetZero() overloads
And replace some obvious load->store combos by a memcpy.
This commit is contained in:
parent
740a21eb8f
commit
ddfaac10b3
10 changed files with 53 additions and 51 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue