Kai Nacke
7159aa5392
Merge branch 'master' into merge-2.067
2015-04-16 07:27:09 +02:00
Johan Engelen
8396fc941b
Modify stripModifiers
to optionally work transitively.
...
Strip modifiers transitively when testing whether to repaint return type.
2015-04-14 22:06:44 +02:00
Martin
95dfcf74f7
Don't attempt to return "ref void" as lvalue.
...
The 2.067 front-end doesn't rewrite "ref void" to "void" anymore.
2015-03-22 15:39:09 +01:00
Martin
c3f2e19c53
Fix AttrSet struct for LLVM 3.1 and 3.2.
...
Use a map instead of a vector as the attribute index may get as
high as 0xFFFFFFFF (LLVM 3.1), apparently for function attributes.
2015-02-23 22:53:09 +01:00
Martin
08c4c07cc4
Get rid of superfluous loads and stores when rewriting return values.
2015-02-23 22:52:11 +01:00
Martin
b81f6ab688
varargs fix: don't pass small structs by reference
...
This block is pretty hacky.
2015-02-23 22:52:11 +01:00
Martin
76d65d45b5
Never rewrite varargs passed by value.
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
b4a481976d
Refactor/simplify DtoCallFunction().
...
* No need to keep the argiter iterator up-to-date, simply make use of
args.size().
* Simplify signature of addTypeinfoArrayArgumentForDVarArg().
* Don't perform casts to void* for arguments to vararg intrinsics here.
TargetABI now takes care of this.
* Simplify handling of reversed parameter order by allocating all
elements first and then simply indexing.
2015-02-23 22:52:11 +01:00
Martin
c19550ad39
Fix va_arg intrinsic.
2015-02-23 22:52:11 +01:00
Martin
e5deefb1dd
Re-implement __va_list struct allocation for System V AMD64 varargs ABI.
2015-02-23 22:52:11 +01:00
Martin
9839cfb889
Experimental varargs fix
2015-02-23 22:52:10 +01:00
kai
024b14cd7f
Fix some warnings.
...
These are easy to solve and reduce the noise in the Travis build.
2014-12-26 15:59:23 +01:00
David Nadlinger
e4aa92deb3
Get rid of more superfluous casts with DMD arrays.
...
There are still a few more left.
2014-11-16 08:00:17 +01:00
Alexey Prokhin
4e2d45a409
Move irFty fields to backend ir classes
2014-10-05 16:55:22 +04:00
Alexey Prokhin
0f7a3b64c5
Make FuncDeclaration::isIntrinsic and FuncDeclaration::isVaIntrinsic free functions
2014-10-05 16:08:58 +04:00
Andreas Hollandt
afcd0aad41
add a few IR names
2014-10-02 14:36:51 +02:00
Andreas Hollandt
6db62ee8a9
remove all the "tmp" IR names
2014-10-02 14:36:51 +02:00
Kai Nacke
58ff4f1807
More support for PPC64le target.
2014-09-27 20:44:07 -04:00
Alexey Prokhin
d9189acbc4
Move toElem/toConstElem to visitors
2014-08-27 16:22:02 +04:00
Alexey Prokhin
a6f358c59b
Remove LINKintrisic
2014-07-10 18:10:46 +04:00
kai
45fca1f3b5
Add line number to error message of -nogc switch.
...
This was suggested by bearophile in the news group.
It also changes all Loc objects to be passed by reference.
2014-07-04 07:15:05 +02:00
Alexey Prokhin
61979387fd
Fix DMD Issue 11394 - NRVO should work for object field initialization in constructor
2014-06-27 14:47:10 +04:00
kai
2b6dbb03f4
Add IF_LOG to more logging statements.
...
Evaluating arguments which call toChars() or toPrettyChars() are much more expensive then checking Logger::enabled().
2014-06-26 06:54:38 +02: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
Alexey Prokhin
b819975c84
Eliminate the need for TypeFunction::funcdecl
2013-10-05 19:03:03 +04:00
David Nadlinger
349305cd1d
Fix array op argument evaluation order regression.
...
Fixes DMD testcase 'arrayop'.
2013-06-14 17:02:58 +02:00
David Nadlinger
292caa1438
Merge the 2.063 frontend.
2013-06-12 20:16:37 +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
kai
971dc95c74
Do not emit warning about vararg for PPC64
2013-03-30 14:11:44 +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
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
David Nadlinger
3392f70a4e
Move calling convention conversion into TargetABI.
...
The code is tightly coupled to TargetABI (the transformations
there only make sense knowing that the right CC is selected).
2013-02-26 00:20:45 +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
d4b391249d
Removed redundant global.params.os field.
...
I hope I have untangled the checks for "native" Windows (Triple::Win32)
vs. Windows/MinGW/Cygwin (Triple::isOSWindows) correctly.
MinGW needs some default libraries as well, has to be fixed later.
2013-02-07 21:20:54 +01:00
David Nadlinger
5f3ba41574
Removed redundant global.params.cpu field.
...
Now that we have global.params.targetTriple, the information
is only duplicated.
2013-02-07 17:36:54 +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
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
fffb23f7ce
Replace AttributeWithIndex for LLVM 3.3.
...
The helper class AttribteWithIndex is gone in LLVM 3.3. Instead a
combination of AttrBuilder and AttributeSet must be used.
2013-02-02 22:04:19 +01:00
kai
145e1b5b24
AttributeSet::get(... AttributeWithIndex ...) is now private.
...
AttributeWithIndex is really going away in LLVM 3.3. This is a
horrible hack to keep everything compiling. Attribute handling
needs some rework.
2013-01-28 19:20:57 +01:00
David Nadlinger
1caf4c9c26
Handle plain AA type <-> AA struct return type mismatch.
...
GitHub: Fixes #214 .
2012-12-31 12:10:46 +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
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
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
David Nadlinger
19f570bcb9
AttrListPtr also requires the context arg in LLVM 3.2 now.
2012-11-24 12:40:12 +01:00
kai
2fec23b84e
AttrlistPtr::get() now requires context as first argument.
...
This is the first LLVM 3.3 related change.
2012-11-21 22:10:26 +01:00