Commit Graph

57 Commits

Author SHA1 Message Date
Alex Crichton
be7ebdd512 Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
Henri Sivonen
0fb8414f14 Change llvm.neon.* to llvm.arm.neon.* in the mapping for platform intrinsics
This avoids linker errors when using platform intrinsics on 32-bit ARM with
NEON.

Fixes rust-lang-nursery/simd#10.
2017-06-07 11:23:10 +03:00
Alex Crichton
ab54f4b226 rustc: Remove #![unstable] annotation
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-11 16:03:05 -07:00
Michael Wu
cc4efd1370 Add support for Hexagon v60 HVX intrinsics 2017-05-07 15:07:36 -04:00
bors
61b93bd811 Auto merge of #38561 - nagisa:rdrandseed, r=alexcrichton
Add intrinsics & target features for rd{rand,seed}

One question is whether or not we want to map feature name `rdrnd` to `rdrand` instead.

EDIT: as for use case, I would like to port my rdrand crate from inline assembly to these intrinsics.
2017-02-14 01:26:10 +00:00
bors
7ac9d337dc Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrc
Remove not(stage0) from deny(warnings)

Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2017-01-08 08:22:06 +00:00
Alex Crichton
9b0b5b45db Remove not(stage0) from deny(warnings)
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2016-12-29 21:07:20 -08:00
Jorge Aparicio
18d49288d5 PTX support
- `--emit=asm --target=nvptx64-nvidia-cuda` can be used to turn a crate
  into a PTX module (a `.s` file).

- intrinsics like `__syncthreads` and `blockIdx.x` are exposed as
  `"platform-intrinsics"`.

- "cabi" has been implemented for the nvptx and nvptx64 architectures.
  i.e. `extern "C"` works.

- a new ABI, `"ptx-kernel"`. That can be used to generate "global"
  functions. Example: `extern "ptx-kernel" fn kernel() { .. }`. All
  other functions are "device" functions.
2016-12-26 21:06:23 -05:00
Simonas Kazlauskas
b2cf6df875 Add intrinsics & target features for rd{rand,seed} 2016-12-22 23:53:30 +02:00
gnzlbg
10cbc37cdd Add intrinsics for x86 bit manipulation instruction sets: BMI 1.0, BMI 2.0, and TBM. 2016-06-22 16:34:10 +02:00
Eduard Burtescu
0abd3139db rustc_platform_intrinsics: remove unused rustc dependency. 2016-03-29 19:36:01 +03:00
Eduard Burtescu
352b44d1fa Remove unnecessary dependencies on rustc_llvm. 2016-03-29 19:36:01 +03:00
Eduard Burtescu
5efdde0de1 rustc: move cfg, infer, traits and ty from middle to top-level. 2016-03-27 01:05:54 +02:00
Alex Crichton
87ede2da54 rustc: Improve compile time of platform intrinsics
This commit improves the compile time of `rustc_platform_intrinsics` from 23s to
3.6s if compiling with `-O` and from 77s to 17s if compiling with `-O -g`. The
compiled rlib size also drops from 3.1M to 1.2M.

The wins here were gained by removing the destructors associated with `Type` by
removing the internal `Box` and `Vec` indirections. These destructors meant that
a lot of landing pads and extra code were generated to manage the runtime
representations. Instead everything can basically be statically computed and
shoved into rodata, so all we need is a giant string compare to lookup what's
what.

Closes #28273
2016-03-15 17:32:34 -07:00
Ruud van Asseldonk
a394d50490 Regenerate x86 platform intrinsics
The exact command used was:

    $ cd src/etc/platform-intrinsics/x86
    $ python2 ../generator.py --format compiler-defs -i info.json   \
      sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \
      avx.json avx2.json fma.json                                   \
      > ../../../librustc_platform_intrinsics/x86.rs
2016-03-13 15:09:46 +01:00
Ruud van Asseldonk
c306853eda Regenerate x86 platform intrinsics
The exact command used was:

    $ cd src/etc/platform-intrinsics/x86
    $ python2 ../generator.py --format compiler-defs -i info.json   \
      sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \
      avx.json avx2.json fma.json                                   \
      > ../../../librustc_platform_intrinsics/x86.rs
2016-03-09 01:18:46 +01:00
Ruud van Asseldonk
a409076df4 Regenerate x86 platform intrinsics
The exact command used was:

    $ cd src/etc/platform-intrinsics/x86
    $ python2 ../generator.py --format compiler-defs -i info.json   \
      sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \
      avx.json avx2.json fma.json                                   \
      > ../../../librustc_platform_intrinsics/x86.rs
2016-03-05 16:37:11 +01:00
Jeffrey Seyfried
37ba66a66e Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
Alex Crichton
2581b14147 bootstrap: Add a bunch of Cargo.toml files
These describe the structure of all our crate dependencies.
2016-02-11 11:12:32 -08:00
Alex Crichton
2273b52023 mk: Move from -D warnings to #![deny(warnings)]
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
2016-01-24 20:35:55 -08:00
Alex Crichton
cd1848a1a6 Register new snapshots
Lots of cruft to remove!
2015-12-21 09:26:21 -08:00
Vadim Petrochenkov
be8ace8cac Remove all uses of #[staged_api] 2015-11-25 21:55:26 +03:00
Andrew Paseltiner
269b59fe69 Remove executable permission from .rs files 2015-11-09 09:28:51 -05:00
Andrea Canciani
9aa1289a67 Add a comment to explain the #[inline(never)] annotation
and regenerate the platform intrinsics source files.
2015-09-12 17:05:29 +02:00
Björn Steinbrink
9104a902c0 Avoid triggering a pathological case in the LLVM inliner
When the inliner has to decided if it wants to inline a function A into an
internal function B, it first checks whether it would be more profitable
to inline B into its callees instead. This means that it has to analyze
B, which involves checking the assumption cache. Building the assumption
cache requires scanning the whole function, and because inlining
currently clears the assumption cache, this scan happens again and
again, getting even slower as the function grows from inlining.

As inlining the huge find functions isn't really useful anyway, we can
mark them as noinline, which skips the cost analysis and reduces compile
times by as much as 70%.

cc #28273
2015-09-11 16:43:05 +02:00
Huon Wilson
67aa4c775a Add some fancier AArch64 load/store instructions. 2015-09-04 09:14:13 -07:00
Huon Wilson
c19e7b629b Add various pointer & void-using x86 intrinsics. 2015-09-04 09:14:13 -07:00
Huon Wilson
2b45a9ab54 Support bitcasts in platform intrinsic generator. 2015-09-04 09:14:13 -07:00
Huon Wilson
62e346af4b Support void in platform intrinsic generator. 2015-09-04 09:14:13 -07:00
Huon Wilson
d12135a70d Add support for pointers to generator.py. 2015-09-04 09:14:12 -07:00
Huon Wilson
787a21fe7c Fix some typos in SSE-AVX intrinsics.
I believe everything that doesn't take a constant integer up to SSE4.2
should now be correct (I don't have any reason to believe that those
that do take constant integers are wrong; they're just more complicated
and I just haven't tested them in detail).
2015-08-31 18:33:55 -07:00
Huon Wilson
14f9c97356 Delete unused macros from rustc_platform_intrinsics. 2015-08-31 13:42:09 -07:00
Huon Wilson
29dcff3aa2 Support different scalar integer widths in Rust v. LLVM.
Some x86 C intrinsics are declared to take `int ...` (i.e. exposed in
Rust as `i32`), but LLVM implements them by taking `i8` instead.
2015-08-29 20:11:23 -07:00
Huon Wilson
daf8bdca57 Fix typos in some x86 and arm intrinsics. 2015-08-29 20:11:23 -07:00
Huon Wilson
24416a2151 Autogenerate most x86 platform intrinsics. 2015-08-29 15:36:17 -07:00
Huon Wilson
5a167bdb4c Allow unused imports in the generator. 2015-08-29 15:36:17 -07:00
Huon Wilson
083f613044 Autogenerate most ARM platform intrinsics. 2015-08-29 15:36:16 -07:00
Huon Wilson
3ef610b627 Autogenerate most AArch64 platform intrinsics. 2015-08-29 15:36:16 -07:00
Huon Wilson
72382d247a Avoid eagerly stripping the common platform prefix.
This works better with the code generation approach.
2015-08-29 15:36:16 -07:00
Huon Wilson
ee2de27996 Add support for aggregates in platform intrinsics.
This adds support for flattened intrinsics, which are called in Rust
with tuples but in LLVM without them (e.g. `foo((a, b))` becomes `foo(a,
b)`). Unflattened ones could be supported, but are not yet.
2015-08-29 15:36:16 -07:00
Huon Wilson
b03ca7f805 Separate integers into signed and unsigned.
This is necessary to reflect the ARM APIs accurately, since some
functions explicitly take an unsigned parameter and a signed one, of the
same integer shape, so the no-duplicates check will fail unless we
distinguish.
2015-08-29 15:36:16 -07:00
Huon Wilson
f578735750 Tweak aarch64 SIMD intrinsics.
The definitions of the rsqrte and recpe had typos, and vqtbl1q is useful
for a benchmark (fannkuch-redux).
2015-08-19 14:21:21 -07:00
Huon Wilson
02e97342c1 Add AArch64 vrecpeq_... intrinsic (necessary for minimal API). 2015-08-17 14:48:44 -07:00
Huon Wilson
2115468f33 Add most ARM intrinsics. 2015-08-17 14:41:40 -07:00
Huon Wilson
d598bddc98 Reorganise ARM intrinsic definitions. 2015-08-17 14:41:40 -07:00
Huon Wilson
2a408ef6ee Add most AVX2 intrinsics. 2015-08-17 14:41:39 -07:00
Huon Wilson
29b79aabd8 Add most AVX intrinsics. 2015-08-17 14:41:39 -07:00
Huon Wilson
67d56db16f Rearrange x86 intrinsics to prepare for AVX. 2015-08-17 14:41:39 -07:00
Huon Wilson
627784b186 Add most SSE4.1 intrinsics. 2015-08-17 14:41:39 -07:00
Huon Wilson
f6275b760c Add most SSSE3 intrinsics. 2015-08-17 14:41:39 -07:00