Martin
fc6c340661
Optimize ABIRewrite system for lvalues
...
Allow ABIRewrites to return the D parameter's LL value directly.
Most rewrites store to memory anyway, so let the D parameter point
directly to that memory instead of a dedicated alloca bitcopy.
2016-05-28 21:03:56 +02:00
Dan Olson
98a608e925
First proof -of-concept for objc support
...
This at least shows a path forward. Pretty much a kludge to at this
point, but passes the tests.
2016-03-02 00:30:58 -08:00
Johan Engelen
70a6e73188
Cleanup runtime fwd decls and use ABI functiontype rewriting
2015-11-22 01:27:26 +01:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
52532985a9
IR source directory: use C++11 inline-initialization in headers
2015-11-01 19:30:04 +01:00
Martin
2d959ea540
Make use of C++11 range-based for
...
Should be available now that support for LLVM < 3.5 has been dropped.
2015-11-01 14:49:04 +01:00
Martin
80c677be46
Slightly refactor ABIRewrite interface for clarification
...
* put(): pass DValue alone, without explicit D type
* get(): pass LLValue instead of a faked DValue
2015-09-26 00:30:24 +02:00
David Nadlinger
ee50259dfd
C ABI: Do not pass empty structs as parameters at all
...
This is most visible on x86 (32-bit), where the stack
alignment is off otherwise.
This change is quite messy because many places assumed
that there was always exactly one LLVM parameter per
TypeFunction::parameters entry.
2015-08-22 23:41:56 +02:00
Martin
08c4c07cc4
Get rid of superfluous loads and stores when rewriting return values.
2015-02-23 22:52:11 +01:00
Martin
5a38f9d020
Eliminate dead code.
2015-02-23 22:52:11 +01:00
Martin
97dfd89127
SysV ABI: prevent varargs from being only partially passed in registers.
2015-02-23 22:52:11 +01:00
Martin
6bb2c30c05
SysV ABI: prevent structs from being only partially passed in registers.
...
Only for formal parameters for now, optional args still need to be fixed.
2015-02-23 22:52:11 +01:00
Martin
e7bfb78632
Refactor attributes system.
...
By introducing abstractions for attribute builder and set since they differ
greatly between LLVM 3.1-3.3.
2015-02-23 22:52:11 +01:00
Martin
9839cfb889
Experimental varargs fix
2015-02-23 22:52:10 +01:00
Kai Nacke
fe39da53e3
Merge of 2.065.0-b3.
...
The new visitor class is used for IR generation. This removes some modifications from DMD source.
2014-02-10 08:47:25 +01:00
kai
5aa06092cd
Fix issue #570 .
...
The use of std::vector<> is replaced by Array<> for MSVC only. This fixes
the error. But it is still unclear why std::vector<> fails.
2014-01-10 12:08:08 +01:00
Kai Nacke
731f2a8fdf
Merge branch 'master' into merge-2.064
...
Conflicts:
dmd2/root/rmem.c
2014-01-03 15:56:01 +01:00
Kai Nacke
b021a2930d
Remove MSVC crap.
...
The code was a work around and did not solve the underlying problem.
With 2.064 even the work around stops working.
2014-01-03 15:17:08 +01:00
Kai Nacke
9b4a70c367
Use caching in DtoVaFunctionType.
...
Remove now unused method IrFuncTy.reset().
2014-01-03 15:14:39 +01:00
Kai Nacke
a24b8b69b3
Merge branch 'master' into merge-2.064
2013-12-29 20:31:10 +01:00
Kai Nacke
192f3eb13d
Fix a typo in MSVC build.
2013-12-29 20:04:34 +01:00
Kai Nacke
c231ae0ad0
Merge remote-tracking branch 'origin/master' into merge-2.064
...
Conflicts:
gen/arrays.cpp
2013-12-19 21:27:53 +01:00
Kai Nacke
5f520fccf9
Cache result of DtoFunctionType.
2013-12-19 19:45:16 +01:00
David Nadlinger
cb341586e3
First merge of 2.064 beta.
...
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.
Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
1242be25d0
Remove unused, empty Ir type.
...
The codegen parameter was changed to IRState instead of
removing it to set the stage for an eventual eradication
of the gIR global.
2013-10-13 19:44:29 +02:00
David Nadlinger
c7c1c25f15
DValue: struct->class.
...
This is in line with an incoming upstream change making all
polymorphic structs classes, and also matches common coding
conventions.
2013-06-07 03:20:39 +02:00
David Nadlinger
beed5c3044
Get rid of empty IrBase class.
...
It isn't useful in any way now that the GC is out of the
picture, and the existance of a "dummy" toChars() method is
annoying when debugging.
2013-05-15 20:28:53 +02:00
kai
f806ec0ed5
Attribute holds no longer multiple values in LLVM 3.3.
...
The solution is to replace Attribute with AttrBuilder in IrFuncTyArg.
Then the argument attributes can be easily manipulated and transformed
into the final AttributeSet.
2013-02-03 15:09:36 +01:00
kai
272e7b7a55
Follow "The Great Renaming" in LLVM 3.3
...
This time VMCore was renamed to IR. Several top level include
files were moved to new subfolder IR.
2013-01-03 08:52:23 +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
59a4a02e49
Cleanup: Avoid signed/unsigned comparisons.
...
The ones ones left are for DMD-defined constants.
2012-12-20 01:21:09 +01:00
David Nadlinger
189115fa98
Cleanup: Move definitions for irfuncty.h to new irfuncty.cpp.
2012-12-20 01:03:01 +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
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
kai
b53544b389
Simplify code by using the right type.
...
Removes some comditional compiling by replacing unsigned with llvm::Attributes.
2012-07-29 18:18:36 +02:00
kai
e13b115583
More unification work.
2012-07-29 14:22:56 +02:00
Dan Sanduleac
2748cdaa88
Fix #49 : Static arrays that don't fit in a register should be passed using byval
2012-06-05 02:52:25 +01:00
Alexey Prokhin
15a903580b
Partial fix for #69 — LDC1 from master fails to build Tango.
...
Fixed regression that has been introduced in commit 9889067
.
2012-01-29 12:32:13 +04:00
kai
6726b5da13
Compile LDC2 with VS2010 64bit (LDC changes only).
...
Contains all changes necessary to LDC specific source to compile LDC2 with VS2010. See https://github.com/D-Programming-Language/dmd/pull/516 for necessary changes to DMDFE.
2012-01-11 07:49:21 +01:00
Alexey Prokhin
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Alexey Prokhin
9a9999854f
Named Return Value Optimization
2011-09-13 21:01:38 +04:00
Alexey Prokhin
7f0ecdf7b9
More X86_64 ABI
2011-03-26 19:30:17 +03:00
Alexey Prokhin
b1e5993873
Started work on phobos
2010-10-27 18:13:46 +04:00
Alexey Prokhin
4d7a6eda23
Different fixes for d2
2010-10-07 22:35:32 +04:00
Christian Kamm
ed9591d81f
Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
...
same LDC call.
2009-03-07 14:25:30 +01:00