Commit graph

30 commits

Author SHA1 Message Date
Martin Kinkelin
2cd14c59dd Drop support for LLVM 14
Mainly because opaque IR pointers appear buggy in LLVM 14 (LLVM
crashes when compiling druntime).
2024-05-19 14:18:32 +02:00
Johan Engelen
2153c76631
Fix gccbuiltins_*.di generation for LLVM >= 15. (#4350)
Fix gccbuiltins_*.di generation for LLVM >= 15.
Adds simple testcase to test that generation of intrinsics import files is indeed happening. This uncovered missing vector type aliases for MIPS, fixed that too.
Resolves issue #4347
2023-03-15 15:49:00 +01:00
bcarneal
f1f702af36 accept i1 types as dlang bool 2021-03-13 16:44:09 -08:00
Martin Kinkelin
96b9cde428 Add support for LLVM 11
One major change is the removal of llvm::CallSite, which I've replaced
by llvm::CallBase*.
2020-09-26 01:04:50 +02:00
Martin Kinkelin
370d57b5ea gccbuiltins: Lift 256-bit vector limit, adding 174 builtins for x86 with LLVM 10
Among which:

pragma(LDC_intrinsic, "llvm.x86.avx512.pshuf.b.512")
    byte64 __builtin_ia32_pshufb512(byte64, byte64) pure @safe;

and thus fixing #3405.
2020-04-15 15:42:08 +02:00
Fangrui Song
91aeb0e674 CMake: Fix LLVM_INTRINSIC_TD_PATH and LDC_INSTALL_PREFIX expansion (#3223)
In -std=gnu* mode, `linux` is a macro that expands to 1. If
LLVM_INTRINSIC_TD_PATH (bare string) contains `linux` (e.g.
x86_64-linux-gnu), LLVM_INTRINSIC_TD_PATH in gen_gccbuiltins.cpp will be
expanded and the whole string will get corrupted.

Fix it by switching from bare strings to C++ raw string literals
(preserving Windows backslashes).
2019-11-11 20:54:56 +01:00
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Martin
1fb269f940 Drop support for LLVM < 3.7 2017-07-16 02:18:00 +02:00
Kai Nacke
cb0f2e7e6a Fix space handling for different paths.
E.g. on my machine LLVM is installed in folder C:\My Program Files\LLVM.

Fixes part of issue #1465. (PR 1466 is required for complete fix.)
2016-05-16 00:12:27 +02:00
Rainer Schuetze
0d08bb1d7a "Properties" has been renamed "IntrProperties" in LLVM 3.9 2016-02-21 10:33:35 +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
60d676e2a1 Drop support for LLVM < 3.5
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
Marco Leise
ca8019dcc6 Make GCC intrinsics usable with @nogc and const *
Modifies gen_gccbuiltins.cpp to add the relatively new @nogc to each compiler intrinsic. Also adds 'const' to void* arguments of intrinsics with "IntrRead*Mem" set.
2015-09-18 00:55:11 +02:00
Kai Nacke
67dd76faf7 LLVM 3.7: ListInit.getSize() was renamed to ListInit.size().
This is in TableGen only and affects the gen_gccbuiltins utility.
2015-06-04 14:04:50 +02:00
kai
901f98572a Fix gen_gccbuiltins utility for LLVM 3.6
The used type is private but using auto helps here.
2014-09-13 19:44:01 +02:00
kai
b58f4e7173 First try at fixing gen_gccbuiltins for LLVM 3.6.
The referenced type is private therefore a LLVM change is required, too.
2014-09-05 16:31:15 +02:00
Jernej Krempuš
77c0192c06 Added a check for vector size to gen_gccbuiltins.cpp.
Previously, gen_gccbuiltins was emitting intrinsics
that used vector types larger than 256 bits and those
are not defined in core.simd.
2014-01-06 01:30:34 +01:00
kai
bb37ef656b Replace llvm::sys::Path with llvm::SmallString in gen_gccbuiltins.cpp. 2013-06-29 15:25:34 +02: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
5616753768 Consistently use quotes for LLVM includes. 2013-02-07 21:20:54 +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
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
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
jerro
bd98f8b106 Use LDC_intrinsic in gen_gccbuiltins
Pragma intrinsic is deprecated, so the gccbuiltins_x86.di must use LDC_intrinsic instead.
2012-12-09 05:20:55 +01:00
Jernej Krempuš
021f067963 Added pure, safe and nothrow to gccbuiltins. 2012-10-25 02:17:06 +02:00
kai
add8e91653 Locate Intrinsics.td in CMakeLists.txt.
The LLVM_INCLUDE_DIR is not always defined (e.g. missing in Windows). We simply locate the file and pass the folder path to the tool.
2012-10-18 07:12:13 +02:00
kai
0ebceb4e16 Make gen_gccbuiltins compilable with LLVM 3.2. 2012-10-14 21:42:17 +02:00
David Nadlinger
95121115d3 gen_gccbuiltins cleanup. 2012-10-14 05:09:15 +02:00
David Nadlinger
b0878bf8ef Fixed gccbuiltins module declaration. 2012-10-14 05:05:48 +02:00
Jernej Krempuš
f6cd185701 Generate gccbuiltins.di at build time.
Bug fixes.

Moved gen_gccbuiltins.cpp to util and renamed gccbuiltins.di to gccbuiltins_x86.di

Trying to fix Travis build.

Removed cstrVec.
2012-10-13 13:01:03 +02:00