summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-03 01:04:50 +0000
committerChris Lattner <sabre@nondot.org>2005-03-03 01:04:50 +0000
commit1a678c67c9e5208a9ea3aacd35fcf520bb81cd3b (patch)
treed4380c834d21dabe94ae2feee43c41f0f52e8ece
parentef1e989e4f91bb8a414786e91bef52587953448d (diff)
downloadbcm5719-llvm-1a678c67c9e5208a9ea3aacd35fcf520bb81cd3b.tar.gz
bcm5719-llvm-1a678c67c9e5208a9ea3aacd35fcf520bb81cd3b.zip
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. :-( llvm-svn: 20415
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index dfd06a73e71..8505917a44e 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/lib/Target/CBackend/Writer.cpp
@@ -1720,7 +1720,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
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()));
OpenPOWER on IntegriCloud