mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fix overly conservative inlining prediction.
A "statementsToo" flag was added to DMD, which disables inlining of pretty much any functions that actually return a value – set it to false for our purposes. The other parts of the diff are just cosmetic.
This commit is contained in:
@@ -1635,7 +1635,7 @@ bool mustDefineSymbol(Dsymbol* s)
|
||||
{
|
||||
// we can't (and probably shouldn't?) define functions
|
||||
// that weren't semantic3'ed
|
||||
if (fd->semanticRun < 4)
|
||||
if (fd->semanticRun < PASSsemantic3)
|
||||
return false;
|
||||
|
||||
if (fd->isArrayOp == 1)
|
||||
@@ -1659,7 +1659,7 @@ bool mustDefineSymbol(Dsymbol* s)
|
||||
if ( !fd->isStaticCtorDeclaration()
|
||||
&& !fd->isStaticDtorDeclaration()
|
||||
&& !fd->isUnitTestDeclaration()
|
||||
&& fd->canInline(true))
|
||||
&& fd->canInline(true, false, false))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user