From 4a6444c3207c01238484785dbbca44257fde6370 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 12 Jan 2013 14:23:42 +0100 Subject: [PATCH] Revert "Fix overly conservative inlining prediction". The commit itself should be fine, but the more aggressive inlining being done on the GC code (due to the gcbits functions being in available in gc.gcx) seems to have uncovered a misoptimization bug in LLVM (at least in 3.2) on x86, leading to various unit tests failing in relase mode. This reverts part of commit f02e4b1925f17186aed5b543e3b02a857da7b14b. --- gen/llvmhelpers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index e70ecf375e..12db0688f8 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1659,7 +1659,10 @@ bool mustDefineSymbol(Dsymbol* s) if ( !fd->isStaticCtorDeclaration() && !fd->isStaticDtorDeclaration() && !fd->isUnitTestDeclaration() - && fd->canInline(true, false, false)) + // FIXME: Should be canInline(true, false, false), but this + // causes a misoptimization in druntime on x86, likely due to + // an LLVM bug. + && fd->canInline(true)) { return true; }