Commit graph

41 commits

Author SHA1 Message Date
Johan Engelen
fa59564e9f Fix naming in testcase. 2016-07-10 11:00:36 +02:00
Johan Engelen
57b21d10d4 Fix github issue 1611 2016-07-10 00:42:00 +02:00
David Nadlinger
75e1573cb2 Merge pull request #1577 from JohanEngelen/inlining
Implement cross-module inlining
2016-07-04 21:32:28 +01:00
Martin
12ff7ef803 Let special __result variable be an alias for sret
So for functions using sret and featuring an out contract, we save an
additional alloca + memcpy by using the sret pointer as storage.
2016-07-04 19:47:55 +02:00
Johan Engelen
3502eb8ddb Remove whitespace 2016-07-03 21:53:16 +02:00
Martin
ed70c12b06 Enable in-place construction for static array literals 2016-07-03 00:23:08 +02:00
Martin
08fa2f093c Enable in-place construction for struct literals 2016-07-03 00:23:03 +02:00
Johan Engelen
7919805eb4 Disable cross-module inlining for LLVM < 3.7. 2016-07-02 17:08:48 +02:00
Johan Engelen
ed7399a694 Add tests for inlining with static variables involved. 2016-07-02 17:08:48 +02:00
Johan Engelen
4169efad45 Fix inlining tests on Windows 2016-07-02 17:08:48 +02:00
Johan Engelen
7ed5a09dc3 Fixes and improvements to cross-module inlining code. 2016-07-02 17:08:48 +02:00
Johan Engelen
a3f0678283 Fix inlining problem: reverse order in which module array is codegenned. 2016-07-02 17:08:48 +02:00
Johan Engelen
2e9b196c09 Force codegen for templated functions with pragma(inline, true) 2016-07-02 17:08:47 +02:00
Johan Engelen
0eb8689006 Implement cross-module inlining (with and without pragma). 2016-07-02 17:08:47 +02:00
Johan Engelen
b8048be6e4 Implement same-module pragma(inline, {true|false}). 2016-07-02 17:08:47 +02:00
Martin
879fb97d56 Rename retvar to sretPointer 2016-07-02 12:52:21 +02:00
Martin
fa3ea1c4a9 Add IR test for optimized array (in)equality with null 2016-06-18 17:42:02 +02:00
Johan Engelen
d7ed918766 Fix codegen for static initialization with typeid(A). Resolves issue 1540. 2016-06-08 10:40:00 +02:00
Johan Engelen
72d20ce21c Fix LDC ICE for https://issues.dlang.org/show_bug.cgi?id=16022.
Added additional test case with enum structs.
2016-06-02 10:30:27 +02:00
Johan Engelen
04b89e642c Windows: Move the prepending of 0x1 to C++ mangled functions from frontend to the backend.
Windows x64 ABI: remove unnecessary \01 from mangled symbol name.

This removes the 0x1 byte from `.mangleof` accessible from user code.
Resolves issue #1519

Also let mangleForLLVM take a std::string, to enable C++11's moves.
2016-05-30 10:18:39 +02:00
David Nadlinger
fd53009f87 Merge pull request #1526 from JohanEngelen/simdunaligned
SIMD: Fix loadUnaligned for newer LLVM types and add storeUnaligned.
2016-05-28 15:44:45 +01:00
Johan Engelen
2e6740842f SIMD: Fix loadUnaligned for newer LLVM types and add storeUnaligned.
Resolves issue #1518. Combines druntime patches from Martin Novak and Ilya Yaroshenko.
2016-05-28 01:01:48 +02:00
Johan Engelen
e50f15af7f Tests: use -mtriple= instead of without equals sign. 2016-05-27 23:49:56 +02:00
Johan Engelen
0a765ade47 Mark alignment test as expected failure on Windows x86, due to issue #1356. 2016-05-24 22:13:53 +02:00
Johan Engelen
aeac3d5e9c Fix name hashing tests for Windows x86. 2016-05-24 21:23:10 +02:00
Johan Engelen
776e32d801 Add experimental -hash-threshold option to hash very long symbol names. 2016-05-24 11:39:08 +02:00
Johan Engelen
108acee6b7 Add @fastmath and @llvmFMF LDC magic attributes to enable aggressive math optimizations. 2016-05-22 20:06:57 +02:00
Johan Engelen
91d308fa00 Apply "unsafe-fp-math"="false" per default on all functions.
This is needed because of: see comment in applyDefaultMathAttributes.
2016-05-22 19:56:57 +02:00
Rainer Schuetze
03ba4e9824 add testcase for issue 1481 2016-05-14 08:30:04 +02:00
Johan Engelen
7b8f5d375e [LIT] Add features for the targets that LLVM can target.
Examples: target_X86, target_ARM.
Apart from future need, this is currently needed for a few tests that specifically test X86 capabilities.
2016-05-11 23:08:27 +02:00
Kai Nacke
e55823fd09 Merge remote-tracking branch 'origin/ltsmaster' 2016-04-23 11:19:20 +02:00
Johan Engelen
9955d8e4e4 For LDC_inline_ir functions: instantiate a new "alwaysinline" function for each call, which is the current behavior for inline ASM too.
When certain attributes are applied to the calling function, like "unsafe-fp-math", the inlined inlineIR function has to have the same attributes otherwise the calling function attribute will be reset to the safe merge of the two: "false". Because the same inlineIR function can be called in different functions using an alias definition, a new function (with possibly different attributes) has to be instantiated upon every call.

Related GH issue #1438
2016-04-21 10:16:33 +02:00
Johan Engelen
4b108025ef Add @ldc.attributes.llvmAttr.
Partly resolves #1438
2016-04-18 13:50:03 +02:00
Johan Engelen
3f4a7b03e6 Move @weak test cases to the correct folder. 2016-03-29 18:05:31 +02:00
Johan Engelen
823a9efe26 Merge branch 'ltsmaster'
Solved merge conflicts in:
	gen/abi.cpp
	gen/toir.cpp
	runtime/druntime
	tests/d2/dmd-testsuite
	tests/lit.site.cfg.in
2016-03-29 11:40:20 +02:00
Kai Nacke
88f3de8bea Merge branch 'ltsmaster' 2016-03-22 19:05:07 +01:00
Martin
1693e7a4e7 Lit tests: Fix alignment checks wrt. sret for 32-bit x86
We substitute the `sret` attribute by `inreg` for that ABI to make sure
the pointer is passed in a register.
2016-03-16 19:45:38 +01:00
Martin
4ecfadbc1c MSVC: Re-enable alignment attribute for sret params
Seems to be working with recent LLVM - at least for x64.
2016-03-16 19:45:37 +01:00
Martin
bbb9b7a479 Lit tests: Allow for extra calling conventions and name mangling
Required by 32-bit MSVC.
2016-03-16 19:45:37 +01:00
Johan Engelen
bbe6373e25 Desensitize alignment codegen test to LLVM variable numbering. [NFC] 2016-03-04 19:40:54 +01:00
Johan Engelen
8ac39a4f2d Relocate the Lit-based testsuite to /tests (from /tests/ir).
The plan is to have subdirs for grouping tests. For example, for PGO we could create the /tests/pgo folder. Lit automatically picks up on subdirs.
2016-02-29 00:34:37 +01:00