Commit graph

314 commits

Author SHA1 Message Date
kai
e5655c5e05 Add command line option for the thread model.
On Linux/PPC, just ignore the provided model. Only local-exec is supported.
2013-07-10 07:52:48 +02:00
David Nadlinger
1215ffacd3 Complete IrStruct->IrAggr rename. 2013-06-17 13:14:15 +02:00
David Nadlinger
0206269230 Ignore StaticAssert in DtoDeclarationExp.
Fixes DMD testcase 'testrightthis'.
2013-06-16 21:17:46 +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
0305d3bce2 Never make external variables something else than external.
Fixes crash in DMD testcase 'mangle'.
2013-06-15 23:22:34 +02:00
David Nadlinger
86563a2ee1 Allow casting AAs to bool.
Fixed DMD testcase 'nulltype'.
2013-06-14 16:01:09 +02:00
David Nadlinger
95b34c3625 zext bool to i8 in makeLValue. 2013-06-12 20:39:34 +02:00
David Nadlinger
ab7ffa9988 Removed obsolete importprot members. 2013-06-12 20:16:37 +02:00
David Nadlinger
4d3f9333c6 Never make functions without body available_externally. 2013-06-12 20:16:37 +02:00
David Nadlinger
292caa1438 Merge the 2.063 frontend. 2013-06-12 20:16:37 +02:00
David Nadlinger
978c2c1b6a Re-enable SymOffExp and remove associated LLVM-only modifications. 2013-06-11 00:40:48 +02:00
David Nadlinger
848dee32d4 Store bools as i8.
I really hope we can refactor this to use a less leaky
abstraction later – it should at least be possible to merge
voidToI8 and i1ToI8.
2013-06-07 03:20:54 +02:00
David Nadlinger
7e92984ebe Downgraded accepts-invalid workaround error to assertion.
Bug 9268 was fixed in 2.062.
2013-06-07 03:20:39 +02:00
David Nadlinger
1c883c5071 Do not generate invalid memcpy() for struct self assignment.
This catches only the most trivial case, need to investigate
this further.

See GitHub #385.
2013-06-07 02:23:00 +02:00
David Nadlinger
3b38d34698 Fix up botched merge in 005f993. 2013-06-02 22:02:09 +02:00
David Nadlinger
005f993982 Merge branch 'release-0.11.0'.
Conflicts:
	gen/llvmhelpers.cpp
2013-06-02 21:53:41 +02:00
David Nadlinger
c89d4809d6 Be more lenient with initializer type mismatch; zext as necessary.
The integer initializer width mismatch issue should really be
fixed in the frontend, but is related to forward referencing
and thus hard to track down.

Also fixes an unlisted regression since the 2.061 merge, where
there would be a const(char*) vs. immutable(char*) mismatch
reported for some string constants.

GitHub: Fixes #378.
2013-06-02 21:05:33 +02:00
David Nadlinger
ae48a19251 Refactoring-only part of DtoConstExpInit fix. 2013-06-02 21:05:33 +02:00
David Nadlinger
d9ce9ce67b Removed TODO-riddled DtoInitializer only used in DtoVarDeclaration. 2013-06-02 21:05:33 +02:00
David Nadlinger
0a7eec400f Removed dead global initializer code. 2013-06-02 21:05:33 +02:00
David Nadlinger
c02b38fe9a Removed LLVM 3.0 compatibility code.
There might be still some pieces left here and there, and
there is certainly code that could be rewritten in a nicer
way with the 3.0 requirement out of the picture.
2013-05-31 20:48:38 +02:00
David Nadlinger
41e580a79f Get rid of now-obsolete DtoConstInitializerType. 2013-05-19 20:25:16 +02:00
David Nadlinger
15fd67be03 Remove code for unimplemented goto-into-asm check.
The check was never fully implemented. We need to look into
this again, as currently we fail with a fairly unintellegible
LLVM ICE (added as GitHub #).
2013-05-11 20:18:34 +02:00
David Nadlinger
2bf0789364 Fixed vector global initialization for > 1 byte elements. 2013-05-04 06:29:34 +02:00
David Nadlinger
b8cdfad8c0 global.params.useAvailableExternally -> global.inExtraInliningSemantic.
This will hopefully make the associated code a bit easier
to read.
2013-04-01 21:17:13 +02:00
kai
b13f3d3164 Merge branch 'master' into merge-2.062
Conflicts:
	runtime/druntime
2013-03-24 19:39:39 +01:00
kai
7d65a311b1 More changes to std::vector usage.
Replace with std::vector with static array, llvm::SmallVector or
add code to reserve space.
2013-03-17 23:58:30 +01:00
David Nadlinger
82ba7fe548 Fix casting typeof(null) to bool.
Covered by the DMD testsuite.
2013-03-16 09:35:29 +01:00
David Nadlinger
a303622074 Allow casting AAs to void*.
GitHub: Fixes #302.
2013-03-07 23:18:08 +01:00
kai
1e4a8fffc2 Remove DMDV1 and DMDV2. 2013-03-06 10:20:24 +01:00
sgraf812
db9edaf053 Fix #265: Use declared struct type in initexpr. 2013-02-11 04:20:59 +01:00
David Nadlinger
d49e1529ed Revert "Revert "Fix overly conservative inlining prediction".",
The previous failures were caused by the issue in
callWithStackShell(), which is fixed now.

This reverts commit 4a6444c320.
2013-02-09 10:42:52 +01:00
David Nadlinger
d13a997bd0 Added back NULL returns accidentally removed in 8ff3a8060.
No functionality change, as the return value wasn't used
anywhere.
2013-02-08 16:37:52 +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
David Nadlinger
7974c33c61 Merge branch 'master' into merge-2.061-2. 2013-01-12 14:31:54 +01:00
David Nadlinger
4a6444c320 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 f02e4b1925.
2013-01-12 14:30:59 +01:00
David Nadlinger
30caa4bfe6 Merge branch 'master' into merge-2.061-2 2013-01-12 01:27:02 +01:00
David Nadlinger
f02e4b1925 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.
2013-01-12 01:23:55 +01:00
David Nadlinger
859177fe3d Do not unnecessarily call postblit after rvalue array initializers.
Fixes DMD testcases 'sdtor' and 'structlit'.
2013-01-04 16:48:10 +01:00
David Nadlinger
55fb4798a7 Added workaround for DMD accepts-invalid regression 9268. 2013-01-04 06:22:57 +01:00
David Nadlinger
08708917bc D1 build fix.
The workaround could later be merged to D1 if the same problem
starts to appear there as well.
2012-12-31 06:27:11 +01:00
David Nadlinger
39e3e3a678 Replace template symbol module fix with more localized hack.
This reverts commit c4adbedcc, which would have fixed the
problem at its roots, but caused strange template function
attribute inference failures in D-YAML, presumably due to
the different order of semantic3 execution on the templates.
2012-12-31 05:46:29 +01:00
kai
2898e5cac3 Add support for PPC 128bit doubledouble type.
On a PowerPC target the datatype real is mapped to PPC 128bit doubledouble type.
Please note that this yet does not work if you cross compile from a different
architecture.
2012-12-30 17:18:36 +01:00
David Nadlinger
33093a7403 Factor out TOK to icmp predicate conversion into helper method. 2012-12-28 18:08:49 +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
2988bc46e0 Removed long obsolete (and broken) LLVM IR annotation code.
If someone wants to redo this properly, an idea that actually works
would be to use a custom llvm::AssemblyAnnotationWriter.
2012-12-19 01:50:48 +01:00
David Nadlinger
1bb14c45d2 Removed trailing whitespace. 2012-12-16 17:19:15 +01:00
David Nadlinger
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01: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