Martin
e711deac1b
Refactor basic block construction and revise BB order
2016-08-06 22:04:41 +02:00
Martin
039560bd83
Introduce DtoRVal/DtoLVal convenience functions
...
No functional changes intended.
2016-06-13 22:30:13 +02:00
Kai Nacke
eb394bf221
Merge remote-tracking branch 'origin/ltsmaster' into mastertest
2016-03-08 20:20:24 +01:00
Kai Nacke
56cf6b9d4f
Increment counter for output constraints.
...
This fixes issue #1292 .
2016-03-06 00:06:48 +01:00
Kai Nacke
24adf155ff
Revert "Revert "Merge branch 'ltsmaster'""
...
This reverts commit 1653911600
.
2016-03-03 21:12:53 +01:00
Kai Nacke
1653911600
Revert "Merge branch 'ltsmaster'"
...
This reverts commit dcb781004b
, reversing
changes made to 3c6f09faf0
.
2016-03-03 13:14:39 +01:00
Kai Nacke
dcb781004b
Merge branch 'ltsmaster'
2016-03-03 07:50:17 +01:00
Dan Olson
7cba1a45af
Fix non-x86 __traits compiles for dmd inline asm
...
Allow asm statement to be tested in a __traits compiles check without
fataling for those targets that don't support dmd style inline asm.
Without this, a compile could exit(1) without any messages.
Fixes compilable/test12979b.d and runnable/testsafe.d on ARM.
2016-02-25 19:52:23 +00:00
Johan Engelen
29ce4012af
dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
...
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +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
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
60d676e2a1
Drop support for LLVM < 3.5
...
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
Martin
9e194bfe2c
Refactor store-to-new-alloca code occurrences.
2015-09-25 17:12:42 +02:00
David Nadlinger
4bcae9731a
The big catch/finally rework, part 2
...
Now with *almost* working EH codegen. Does not compile Phobos yet
because we run into the "instruction does not dominate all uses"
issue when an r-value result of toElemDtor is used and we need to
run cleanups in between. Should easily be fixed by promoting those
values to allocas.
Most of the changes outside of ir/irfunction.{h, cpp} are just
because CreateCallOrInvoke moved locations. I took the
opportunity to also make use of the different arg count
overloads where possible.
2015-08-19 19:56:39 +02:00
David Nadlinger
4236ae9ce5
The big catch/finally rework, part 1
...
Never generates any landing pads or invoke instructions right now
for simplicity. The code for emitting them will be added back in
the next step.
The "after..." blocks without any precedessors remain for now, as
we need a clean way to suppress any codegen for that block (but
not new blocks, which might resolve labels) before tackling that
one.
Builds druntime/Phobos on OS X x86_64 (albeit without EH, of course).
2015-08-19 19:56:39 +02:00
David Nadlinger
bfc20df4c8
Remove IRScope::end
...
Specifying the basic block before which to insert the new one
is not mandatory when calling llvm::BasicBlock::Create. This
was the only use of the tracked "end" block. The concept was
phony anyway because there is no single "end" to a scope with
unwinding and so on.
For prettying up the IR, it is possible to change the order
of basic blocks using move{Before, After}().
2015-08-19 19:56:39 +02:00
Kai Nacke
45ec6a0512
Merge branch 'master' into merge-2.067
2015-06-04 19:07:28 +02:00
Kai Nacke
0f86de548c
DebugInfo: EmitStopPoint() now has a Loc parameter.
2015-06-04 19:04:23 +02:00
Kai Nacke
1036edc266
Merge branch 'master' into merge-2.067
2015-05-17 13:06:46 +02:00
Kai Nacke
76f543d0a7
Fix another sprintf warning
2015-05-16 18:56:38 +02:00
Kai Nacke
79699c3261
CompoundAsmStatement checks for @safe.
...
Fixes failure in fail_compilation/deprecate12979.d
2015-04-10 13:16:15 +02:00
kai
0551f613e4
Remove last traces of AsmBlockStatement
2015-03-01 17:33:08 +01:00
kai
f61327c149
Replace AsmBlockStatement with CompoundAsmStatement.
2015-03-01 16:40:44 +01:00
kai
a65f001356
Remove now unused function DtoAggrPairSwap().
...
The function was only used in the old ABI implementation.
2015-02-25 07:52:06 +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
ac2524d129
Remove old unused declarations
2014-10-05 16:55:23 +04:00
Alexey Prokhin
a0b9f95869
There is no real need in FuncDeclaration::labmap
2014-10-05 16:08:35 +04:00
Alexey Prokhin
d9189acbc4
Move toElem/toConstElem to visitors
2014-08-27 16:22:02 +04:00
Alexey Prokhin
76dec46df5
WIP: merge dmdfe 2.066
2014-08-22 16:01:28 +04:00
Alexey Prokhin
e0b9048998
Rename 'enclosingFinally' to the original 'tf' to minimize differences with mainstream
2014-07-11 18:06:58 +02: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
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
c28c7fb134
Introduce a debug info builder.
...
Moves all code from todebug into a new class.
Also caches the compilation unit in order to fix a LLVM 3.4 compile error.
2013-07-29 00:04:08 +02:00
David Nadlinger
292caa1438
Merge the 2.063 frontend.
2013-06-12 20:16:37 +02:00
David Nadlinger
5b5ad8e0f7
Add some no-op virtual destructors to silence GCC warning.
2013-06-12 20:16:05 +02:00
David Nadlinger
5742a0219c
Fix inline asm labels in template functions.
...
This is a giant kludge to avoid a redesign of the inline asm
handling code. I'd be glad if somebody came up with a better
solution.
GitHub: Fixes #340 .
2013-05-11 21:01:24 +02:00
David Nadlinger
8b9deecf34
Remove dead code.
2013-05-11 20:12:25 +02:00
David Nadlinger
bc09ceae18
Remove useless log delimiters, we do have log scopes.
2013-03-17 02:00:42 +01:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +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
Martin
62cb04f6f6
Merged x86 and x86_64 assembly parsers.
2013-01-27 15:31:26 +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
89809fdde3
Cleanup: Silence another "maybe-undefined" warning.
...
Also makes the assert in line 775 actually work.
2012-12-20 02:10:32 +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
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
940d6e907f
Take advantage of Triple and TargetData.
...
A lot of system specific knowledge is already present in LLVM. This is used to populate several fields in global.params instead of hard coded values in main(). Ensures that the frontend and LLVM have always the same values.
2012-09-16 19:50:21 +02:00
David Nadlinger
6fea7358dc
Fixed several asm-related error message formats.
2012-09-07 03:51:32 +02:00