mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-25 09:03:14 +01:00
Merge branch 'master' into merge-2.062.
This commit is contained in:
@@ -11,6 +11,7 @@ env:
|
||||
script:
|
||||
- cmake -DD_VERSION=$DVER -DLLVM_CONFIG=/usr/bin/llvm-config-$LLVM_VERSION
|
||||
- make
|
||||
- bin/ldc2 -version # For environment info.
|
||||
- ctest --output-on-failure -R $TESTSUITE_FILTER
|
||||
|
||||
notifications:
|
||||
|
||||
10
README
10
README
@@ -4,8 +4,9 @@ LDC – the LLVM D Compiler
|
||||
The LDC project aims to provide a portable D programming language
|
||||
compiler with modern optimization and code generation capabilities.
|
||||
|
||||
The compiler uses the official DMD frontends to support both D1 and D2,
|
||||
and relies on the LLVM Core libraries for code generation.
|
||||
The compiler uses the official DMD frontends to support the latest
|
||||
version of D2, and relies on the LLVM Core libraries for code
|
||||
generation.
|
||||
|
||||
LDC is fully Open Source; the parts of the code not taken/adapted from
|
||||
other projects are BSD-licensed (see the LICENSE file for details).
|
||||
@@ -13,6 +14,9 @@ other projects are BSD-licensed (see the LICENSE file for details).
|
||||
Please consult the D wiki for further information:
|
||||
http://wiki.dlang.org/LDC
|
||||
|
||||
D1 is no longer available; see the 'd1' Git branch for the last
|
||||
version supporting it.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
@@ -36,7 +40,7 @@ For the impatient, a quick guide for building on *nix systems:
|
||||
|
||||
3) Build and install LDC:
|
||||
$ mkdir build && cd build # Out-of-source builds are recommended.
|
||||
$ cmake .. # Use -DD_VERSION=1 to build the D1 compiler.
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ make install # Or run LDC directly from the bin/ directory.
|
||||
|
||||
|
||||
@@ -941,9 +941,12 @@ struct FuncDeclaration : Declaration
|
||||
// Functions that wouldn't have gotten semantic3'ed if we weren't inlining set this flag.
|
||||
bool availableExternally;
|
||||
|
||||
// true if overridden with the pragma(allow_inline); stmt
|
||||
// true if overridden with the pragma(LDC_allow_inline); stmt
|
||||
bool allowInlining;
|
||||
|
||||
// true if set with the pragma(LDC_never_inline); stmt
|
||||
bool neverInline;
|
||||
|
||||
// true if has inline assembler
|
||||
bool inlineAsm;
|
||||
#endif
|
||||
|
||||
@@ -99,6 +99,7 @@ FuncDeclaration::FuncDeclaration(Loc loc, Loc endloc, Identifier *id, StorageCla
|
||||
// LDC
|
||||
isArrayOp = false;
|
||||
allowInlining = false;
|
||||
neverInline = false;
|
||||
availableExternally = true; // assume this unless proven otherwise
|
||||
|
||||
// function types in ldc don't merge if the context parameter differs
|
||||
|
||||
@@ -277,6 +277,7 @@ Msgtable msgtable[] =
|
||||
{ "LDC_va_arg" },
|
||||
{ "LDC_verbose" },
|
||||
{ "LDC_allow_inline" },
|
||||
{ "LDC_never_inline" },
|
||||
{ "LDC_inline_asm" },
|
||||
{ "LDC_inline_ir" },
|
||||
{ "LDC_fence" },
|
||||
|
||||
@@ -3135,6 +3135,10 @@ Statement *PragmaStatement::semantic(Scope *sc)
|
||||
{
|
||||
sc->func->allowInlining = true;
|
||||
}
|
||||
else if (ident == Id::LDC_never_inline)
|
||||
{
|
||||
sc->func->neverInline = true;
|
||||
}
|
||||
#endif
|
||||
#if DMDV2
|
||||
else if (ident == Id::startaddress)
|
||||
|
||||
@@ -815,6 +815,11 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
|
||||
}
|
||||
}
|
||||
|
||||
if (fdecl->neverInline)
|
||||
{
|
||||
fdecl->ir.irFunc->setNeverInline();
|
||||
}
|
||||
|
||||
if (fdecl->llvmInternal == LLVMglobal_crt_ctor || fdecl->llvmInternal == LLVMglobal_crt_dtor)
|
||||
{
|
||||
AppendFunctionToLLVMGlobalCtorsDtors(func, fdecl->priority, fdecl->llvmInternal == LLVMglobal_crt_ctor);
|
||||
|
||||
@@ -599,7 +599,16 @@ function(add_tests module_files)
|
||||
endfunction()
|
||||
|
||||
testcase(debug "-g;-d-debug")
|
||||
testcase(release "-O3;-release")
|
||||
|
||||
# Building the std.exception tests on x86_64 triggers an infinite
|
||||
# recursion in scalar evolution on LLVM 3.1 (only), see the list of
|
||||
# known LLVM bugs for details.
|
||||
if(${LDC_LLVM_VER} EQUAL 301 AND ${HOST_BITNESS} EQUAL 64 AND
|
||||
"${testroot}" STREQUAL "phobos_std_exception")
|
||||
testcase(release "-O1;-release")
|
||||
else()
|
||||
testcase(release "-O3;-release")
|
||||
endif()
|
||||
|
||||
# On 64 bit multilib builds, run the tests in 32 bit mode as well.
|
||||
if(MULTILIB AND ${HOST_BITNESS} EQUAL 64)
|
||||
|
||||
Reference in New Issue
Block a user