Martin Kinkelin
c9ac30c236
Adapt to free-standing size(Type*)
function
2024-07-16 16:22:35 +02:00
Nicholas Wilson
66c436d83f
Use typed GEP in complex.cpp
( #4074 )
2022-08-29 08:17:32 +08:00
Nicholas Wilson
c9b902e670
Use typed GEP in DtoComplexSet
( #4069 )
2022-08-28 21:18:25 +08:00
Martin Kinkelin
4bd8dcd91b
Adapt to new TOK and EXP enum classes
2022-02-16 20:52:07 +01:00
Martin Kinkelin
369cfd13ce
Adapt to TY enum class
2021-09-07 16:51:19 +02:00
Martin Kinkelin
a9aafac862
Glue layer: Make all mutable Loc &
params const
2020-12-13 15:01:19 +01:00
Martin Kinkelin
8fd69da8fb
Make all DtoGEP helpers use implicit inbounds
...
Single functional change: always emit inbounds when computing the base
pointer of a SliceExp.
2019-09-10 22:36:25 +02:00
Martin Kinkelin
e52199469f
Upgrade front-end & libs to v2.087.0-beta.1
2019-06-21 15:39:45 +02:00
Martin Kinkelin
e5f207d137
Fix identity comparisons of complex numbers ( #2993 )
...
Obviously *both* real and imaginary parts need to be identical.
Fixes #2918 .
2019-02-04 21:30:05 +01:00
Martin Kinkelin
4a23399236
Aim for consistent #includes (order + dir prefix)
...
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin
2616261fd2
Revise all LDC-specific errors/warnings/deprecs and insert backticks
...
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +02:00
Martin
0e71a760ae
Limited support for arbitrary target reals
...
While parsing of floating-point literals and CTFE still operate with the
host LDC's real type, compile-time reals can in principle be emitted in
arbitrary precision via LLVM software conversion, therefore paving the way
for cross-compilation to all targets.
The representable constants are still limited by the compile-time real_t
precision. E.g., LDC on Windows with its 64-bit reals can't hold and emit
an 80-bit `real.max` when cross-compiling to a non-Windows x86(_64)
target; the compile-time value will silently overflow to infinity and
later be emitted as 80-bit infinity.
LDC on AArch64 with its 128-bit quad-precision reals on the other hand can
hold and emit reals for all targets, making it a universal cross-compiler
with quad-precision compile-time reals in hardware.
We don't use the strange 2x64-bit PPC double-double format (see
`getRealType()` in `ir/irtype.cpp`), but would more or less support it
(the type properties (max, min_normal...) still need to be determined;
LLVM isn't sure about those either...).
2017-02-11 14:24:46 +01:00
Martin
df34beb59b
Refactor binops and binassigns
2016-07-16 16:42:23 +02:00
Martin
a3adb403de
Fix evaluation/load order of binary operators
...
Fixes issue #1327 by loading immediately from lvalues resulting from
left- and right-hand sides.
2016-06-26 21:19:06 +02:00
Martin
de9149f1b6
Remove getLVal() from DValue and add DtoL/RVal() overloads
2016-06-13 22:30:16 +02:00
Martin
0c0c1ecaf5
Rename DVarValue to DLValue
2016-06-13 22:30:15 +02:00
Martin
e3e2f4b2e9
DValue: Remove method getType()
...
Use the existing public field directly instead.
It's shorter and different than LLValue's getType() (making it easier
to discriminate DValues and LLValues for experienced LDC devs imho).
2016-06-13 22:30:13 +02:00
Martin
956061c3c7
Revise DtoGEP() helpers and mark most GEPs inbounds
2015-12-14 00:18:15 +01:00
Martin
2dfa5e8569
Some more cosmetic fixes
...
Found by searching for lines > 80 chars.
2015-11-05 19:12:32 +01:00
David Nadlinger
05d45350aa
clang-tidy: Add readability-else-after-return
2015-11-02 11:30:40 +02: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
kai
7fdaae450a
[WIP] Set real == double on Win64 MSVC.
...
The MS C Runtime does not support 80bit reals. Drop support in D, too.
2014-10-16 07:23:02 +02:00
Andreas Hollandt
6db62ee8a9
remove all the "tmp" IR names
2014-10-02 14:36:51 +02:00
kai
93c4cf3ea5
Replace more occurances of std::vector with an array.
2013-03-17 00:50:05 +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
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
kai
e684d10ac7
Cleanup of complex type handling.
...
- replace if .. else cascades with swicth
- replace assert(0) with llvm_unreachable as default case
- add some whitespaces in parameter lists
2012-12-30 14:56:53 +01:00
kai
fd0021c6c2
Cleanup: 2 more clang warning fixes.
2012-12-22 16:59:20 +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
48f8ffeb0b
Further changes to compile using MSVC.
2012-05-23 17:36:26 +02:00
Alexey Prokhin
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Alexey Prokhin
fb77c05dfd
DMD Issue 3632 - modify float is float to do a bitwise compare
2011-09-15 13:56:22 +04:00
David Nadlinger
7a24e12736
Cleanup: Remove unused code in backend, silence some warnings.
...
This removed quite some clutter that has presumably piled up because LDC is seldom built with a lot of warnings enabled due to DMDFE.
2011-04-24 12:21:33 +02:00
Alexey Prokhin
9aad1ca6d1
Fixed casting of the complex types to the imaginary types
2010-12-30 14:04:40 +03:00
Alexey Prokhin
c47bfbcc32
Implemented mod operator for complex numbers
2010-12-15 20:30:38 +03:00
Moritz Warning
c151d37365
fixes #434 :: add llvm 2.8 support
2010-10-23 13:38:26 +02:00
Christian Kamm
64a8e47ad6
Fix several 'reaches end of function' warnings by making fatal noreturn.
...
The warnings also pointed out a few genuine bugs. Replace some tabs with
spaces.
2009-11-06 21:51:41 +01:00
Benjamin Kramer
c220dcac05
IntegerType is now contextifed.
...
Requires llvm >= 78969. resistor says this will be the last context API change :)
2009-08-14 00:39:18 +02:00
Benjamin Kramer
977fa551ee
Push the context through StructType::get.
...
Requires LLVM >= 78258. Also remove old #if's.
2009-08-06 01:47:39 +02:00
Benjamin Kramer
4c5457ba61
getNullValue is in Constant again
...
Requires LLVM >= r77721
2009-07-31 23:01:29 +02:00
Benjamin Kramer
0ee2f34611
Don't use llvm::getGlobalContext() anymore
2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1
Build fix for the latest LLVMContext changes (LLVM r75445)
...
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Christian Kamm
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +02:00
Christian Kamm
7dbe9baa37
Made is and !is use the same numeric comparison as == and !=, fixes #328
...
Factored out common code from EqualExp and IdentityExp into
DtoBinNumericEquals in binexp.cpp.
2009-06-16 23:00:27 +02:00
Christian Kamm
e03a897bad
Make sure complex -> integral casts are not used when casting to bool.
...
Error instead of assert on unimplemented cast.
2009-05-28 21:45:14 +02:00