mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 22:34:39 +00:00
Make the JIT zero out globals with memset instead of an element at a time. This
should speed it up a bit on a lot of programs llvm-svn: 11472
This commit is contained in:
parent
cd6a595db5
commit
2679a58a61
@ -406,6 +406,10 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
|
|||||||
GenericValue Val = getConstantValue(Init);
|
GenericValue Val = getConstantValue(Init);
|
||||||
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
|
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
|
||||||
return;
|
return;
|
||||||
|
} else if (isa<ConstantAggregateZero>(Init)) {
|
||||||
|
unsigned Size = getTargetData().getTypeSize(Init->getType());
|
||||||
|
memset(Addr, 0, Size);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Init->getType()->getPrimitiveID()) {
|
switch (Init->getType()->getPrimitiveID()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user