Commit Graph
107 Commits
Author SHA1 Message Date
David Nadlinger e86a87ab6d Complete switch to extern(D) _d_invariant. 2013-06-17 00:03:52 +02:00
David Nadlinger acd508945a Allow multiple declarations to share the same mangled name/LLVM global.
This is necessary to enable aliasing compiler-generated
symbols with pragma(mangle, …).

Note that globals for internal use are still directly
created.
2013-06-16 00:28:02 +02:00
David Nadlinger bc910004a4 Adapt codegen to removal of old _d_invariant from druntime.
We should think about using symbolic constants for runtime function
names though, this is not maintainable in the long run.
2013-06-12 20:34:50 +02:00
David Nadlinger 0a376b9c71 Avoid unnecessary memset when allocating array literals.
This completes the merge of pull request #294. Thanks a lot to
Chris Holdsworth who originally wrote the patch!

GitHub: Fixes #294.
GitHub: Fixes #141.
2013-05-04 21:20:09 +02:00
kai 1e4a8fffc2 Remove DMDV1 and DMDV2. 2013-03-06 10:20:24 +01:00
David Nadlinger 0a96aea868 Sort includes according to style guidelines:
1. Main include corresponding to .cpp file, if any.
 2. DMD and LDC includes.
 3. LLVM includes.
 4. System includes.

Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger 8ff3a8060a Use llvm_unreachable instead of assert(0).
Also removed some unused functions.
2013-02-07 03:38:15 +01:00
kai 69d5576141 Merge branch 'master' into merge-2.061-2
Conflicts:
	gen/runtime.cpp
2013-01-28 06:58:26 +01:00
kai 145978bb51 Replace vector/SmallVector with C array for parameter lists.
This has several advantages:
- the code is shorter
- no need to specify number of elements
- only ArrayRef object is created
2013-01-27 23:12:37 +01:00
kai a3fcdafd1f Merge branch 'master' into merge-2.061-2
Conflicts:
	gen/runtime.cpp
2013-01-27 00:20:21 +01:00
kai ed5ede3fda Replace std::vector with llvm::SmallVector in gen/runtime.cpp.
The vector arrays for the parameter lists are a perfect fit for
llvm::SmallVector: the vector size is small and known in advance.
2013-01-26 21:01:33 +01:00
kai bc182ab901 Merge branch 'master' into merge-2.061-2 2013-01-24 07:35:58 +01:00
kai b4aca21422 More LLVM 3.3 changes.
There is ongoing rework on the AttributeSet class. Also the constructor
of APFloat changed.
2013-01-23 18:22:45 +01:00
David Nadlinger 30caa4bfe6 Merge branch 'master' into merge-2.061-2 2013-01-12 01:27:02 +01:00
kai a11459bc31 "The Great Renaming" continues.
More changes to match the renamed files of LLVM 3.3.
2013-01-06 17:17:30 +01:00
David Nadlinger 5c518a16ec Merged 2.061 frontend. 2013-01-04 06:22:53 +01:00
kai 5f37ae30cf LLVM 3.3: class Attributes is renamed to Attribute.
Some other renamings took place in "llvm/Attributes.h" but only this causes
compile errors in LDC.
Also uses new location of "llvm/IRBuilder.h".
2012-12-21 17:32:17 +01:00
David Nadlinger 4804cbcdbb Cleanup: Removed unused variable. 2012-12-20 03:29:06 +01:00
David Nadlinger 4118cddd1f Cleanup: GCC warning fixes. 2012-12-20 01:21:10 +01:00
David Nadlinger ab357a41c7 Removed useless debug log messages. 2012-12-20 01:21:10 +01:00
David Nadlinger 0cd78dd579 Cleanup: Clang warning fixes.
No warnings left on a '-Wall' build except for a single tautological
compare in gen/asm-x86-32.h, which indeed seems like a bug.
2012-12-20 01:00:55 +01:00
David Nadlinger 9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
kai 1a06130cfa AttrListPtr is renamed to AttributeSet in LLVM 3.3. 2012-12-09 19:48:39 +01:00
kai fde625b33d More changes to the Attributes class in LLVM 3.2. 2012-10-20 17:22:55 +02:00
kai 657fc42221 And still more changes for LLVM 3.2
There were additional changes to the Attributes class.
2012-10-15 18:31:18 +02:00
kai fb108eed12 More LLVM 3.2 changes. 2012-10-14 18:45:31 +02:00
kai a7c7b514c0 Add changes for LLVM 3.2
- The Attributes class was changed again
- TargetData was renamed to DataLayout

Compiles again with LLVm 3.0, 3.1 and trunk(3.2).
2012-10-13 18:54:42 +02:00
Alexey Prokhin fa361ed598 DMD Issue 4523 - [tdpl] .remove method for Associative Arrays returns void in all cases 2012-02-15 13:23:23 +04:00
David Nadlinger 2c7f77eabd Fixed leftover llvm::Type const qualifier. 2011-11-12 20:17:29 +01:00
David Nadlinger ffe37c4a62 Merge remote-tracking branch 'upstream/llvm3.0' 2011-11-12 19:51:30 +01:00
Alexey Prokhin 22d0f00027 Rewritten DtoArrayInit().
It does not create calls to runtime functions and generates a faster code, especially if optimizations are on.
2011-11-01 14:31:00 +04:00
Alexey Prokhin 629f13929e WIP: port to llvm 3.0 2011-10-25 15:43:39 +04:00
Alexey Prokhin 0caba6672d Call postblit on a struct when appending it to an array. Use _d_arraycatnT to concatenate multiple arrays.
Before, _d_arraycatT was used to concatenate multiple arrays. That caused an issue when postblit
was called on a struct multiple times. The next code asserted due to the issue:

void main()
{
    static struct S
    {
        int x;
        int pad;
        this(this)
        {
            ++x;
        }
    }

    auto sarr = new S[1];
    auto sarr2 = sarr ~ sarr ~ sarr;
    assert(sarr2[0].x == 1);
    assert(sarr2[1].x == 1);
    assert(sarr2[2].x == 1);
    assert(sarr[0].x == 0);
}
2011-09-10 13:22:05 +04:00
Alexey Prokhin 375dcb095c Fix array comparison 2011-03-26 17:58:08 +03:00
Alexey Prokhin 6d89bfa961 Use _d_assocarrayliteralTX to initialize associative arrays. Replace depricated _d_arrayappendcT() by _d_arrayappendcTX(). Make sure that a l-value of a binassign expressions is only evaluated once (reapllied 1784 but only for D2) 2011-02-20 19:00:45 +03:00
Alexey Prokhin c5e9784863 Updated to dmdfe 2.051 2011-01-05 18:21:40 +03:00
Alexey Prokhin a86f414bc1 Fixed calling of _d_array_bounds and _d_switch_error. 2011-01-02 17:43:02 +03:00
Alexey Prokhin 6b6ba75139 Call _d_hidden_func() instead of hidden functions. 2010-12-31 13:29:01 +03:00
Alexey Prokhin 023b55a772 Run postblit constructors for elements of an array. 2010-12-30 14:04:24 +03:00
Alexey Prokhin 44593f6220 Call d_delarray_t() instead of _d_delarray() 2010-12-19 15:51:00 +03:00
Alexey Prokhin 7e6807b0df Fixed calling of _d_delmemory() and _d_delinterface() 2010-12-17 12:55:28 +03:00
Alexey Prokhin 71f653f19b Fixes for closures 2010-12-15 17:05:16 +03:00
Alexey Prokhin 0cc3dc369a Fixed signature of _d_delarray() 2010-11-02 20:30:06 +03:00
Alexey Prokhin 87485d6649 Fixed signature of _aaEqual for D2 2010-11-02 18:40:58 +03:00
Alexey Prokhin 2fe6817294 Fixed a druntime crash in _d_delclass 2010-10-31 12:23:35 +03:00
Alexey Prokhin e4c3179d43 Different fixes: phobos compiles now 2010-10-28 14:53:01 +04:00
Alexey Prokhin b1e5993873 Started work on phobos 2010-10-27 18:13:46 +04:00
Alexey Prokhin eb68fc3d8c Fixed building of LDC1. Work on arrays 2010-10-08 15:58:10 +04:00
Alexey Prokhin 41a66cf437 Use druntime functions for array operations 2010-10-08 15:10:56 +04:00
Alexey Prokhin 4d7a6eda23 Different fixes for d2 2010-10-07 22:35:32 +04:00