From 6619190ba5830d8822ab0b10d0fcce30b876eb43 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Thu, 28 May 2009 00:07:21 +0200 Subject: [PATCH] * Add -functionattrs to default pass list so -dgc2stack is more effective when callees aren't inlined. This should also improve various standard LLVM optimizations. * Comment out some verbose logging. --- gen/optimizer.cpp | 1 + gen/tocall.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gen/optimizer.cpp b/gen/optimizer.cpp index 889ad828..f25354b6 100644 --- a/gen/optimizer.cpp +++ b/gen/optimizer.cpp @@ -119,6 +119,7 @@ static void addPassesForOptLevel(PassManager& pm) { addPass(pm, createInstructionCombiningPass()); addPass(pm, createCFGSimplificationPass()); addPass(pm, createPruneEHPass()); + addPass(pm, createFunctionAttrsPass()); #ifdef USE_METADATA if (!disableLangSpecificPasses && !disableGCToStack) diff --git a/gen/tocall.cpp b/gen/tocall.cpp index 0a0a5029..fea5e91a 100644 --- a/gen/tocall.cpp +++ b/gen/tocall.cpp @@ -416,7 +416,7 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions* } Logger::undent(); Logger::cout() << "Function type: " << tf->toChars() << '\n'; - Logger::cout() << "LLVM functype: " << *callable->getType() << '\n'; + //Logger::cout() << "LLVM functype: " << *callable->getType() << '\n'; } size_t n = Argument::dim(tf->parameters);