[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Feb 14 23:55:01 PST 2004
Changes in directory llvm/lib/ExecutionEngine:
ExecutionEngine.cpp updated: 1.47 -> 1.48
---
Log message:
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
---
Diffs of the changes: (+4 -0)
Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.47 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.48
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.47 Sun Feb 8 13:33:23 2004
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Sat Feb 14 23:54:06 2004
@@ -406,6 +406,10 @@
GenericValue Val = getConstantValue(Init);
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
return;
+ } else if (isa<ConstantAggregateZero>(Init)) {
+ unsigned Size = getTargetData().getTypeSize(Init->getType());
+ memset(Addr, 0, Size);
+ return;
}
switch (Init->getType()->getPrimitiveID()) {
More information about the llvm-commits
mailing list