[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Mar 2 17:05:05 PST 2005
Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.225 -> 1.226
---
Log message:
Do not lower malloc's to pass "sizeof" expressions like this:
ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u]))));
Instead, just emit the literal constant, like this:
ltmp_0_7 = malloc(784u);
This works around a bug in ICC 8.1 compiling the CBE generated code. :-(
---
Diffs of the changes: (+1 -1)
Writer.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.225 llvm/lib/Target/CBackend/Writer.cpp:1.226
--- llvm/lib/Target/CBackend/Writer.cpp:1.225 Mon Feb 28 13:36:15 2005
+++ llvm/lib/Target/CBackend/Writer.cpp Wed Mar 2 19:04:50 2005
@@ -1720,7 +1720,7 @@
bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
PM.add(createLowerGCPass());
- PM.add(createLowerAllocationsPass());
+ PM.add(createLowerAllocationsPass(true));
PM.add(createLowerInvokePass());
PM.add(new CBackendNameAllUsedStructs());
PM.add(new CWriter(o, getIntrinsicLowering()));
More information about the llvm-commits
mailing list