about summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2016-06-22Add intrinsics for x86 bit manipulation instruction sets: BMI 1.0, BMI 2.0, ↵gnzlbg-0/+53
and TBM.
2016-06-22Allow different instruction set prefixes within the same architecturegnzlbg-13/+37
2016-06-22Add usage examples to the documentation of etc/platform-intrinsics/generator.pygnzlbg-0/+21
2016-06-21Convert makefiles to build LLVM/compiler-rt with CMakeBrian Anderson-1/+7
2016-06-20Run debuginfo tests on TravisSeo Sanghyeon-1/+3
2016-06-03Use Docker for TravisSeo Sanghyeon-0/+25
2016-05-31Auto merge of #33141 - tshepang:python-love, r=brsonbors-8/+4
some Python nits and fixes
2016-05-31mk: Prepare for a new stage0 compilerAlex Crichton-2/+3
This commit prepares the source for a new stage0 compiler, the 1.10.0 beta compiler. These artifacts are hot off the bots and should be ready to go.
2016-05-30print enum variant fields in docsOliver Schneider-0/+1
2016-05-23Auto merge of #33098 - raphlinus:master, r=alexcrichtonbors-4/+134
Efficient trie lookup for boolean Unicode properties Replace binary search of ranges with trie lookup using leaves of 64-bit bitmap chunks. Benchmarks suggest this is approximately 10x faster than the bsearch approach.
2016-05-15Auto merge of #33612 - royalstream:royalstream-enc-enum-ptr, r=michaelwoeristerbors-0/+2
gdb Pretty Print: generic encoded was failing on reference/pointer types If you debug this program using **gdb** ```rust fn main() { let x = 10; let y = Some(&x); // additional code } ``` And you try to print **y**'s value from the debugger, you get the following: ``` (gdb) print y Python Exception <class 'gdb.error'> Cannot convert value to int.: $1 = {RUST$ENCODED$ENUM$0$None = Some = {0x7fff5fbff97c}} ``` What happens is that inside **debugger_pretty_printers_common.py** the method `is_null_variant` doesn't have any special handling for pointer values so it ends up calling `.as_integer()` on `discriminant_val` (which holds a pointer) and fails. Considering it needs to handle pointers and return _true_ when the pointer is _null_, I modified the `.as_integer()` method in **gdb_rust_pretty_printing.py** to take pointers into consideration. After this modification **gdb** prints **y** like this: ``` (gdb) print y $1 = Some = {0x7fff5fbff97c} ``` Now, it would be nice to print something useful (instead of a pointer address) but the pretty printer doesn't currently handle references/pointers so that's a completely different subject.
2016-05-12Generic encoded enums no longer crash on reference/pointer typesSteven Burns-0/+2
2016-05-10Copy more libraries from local Rust to stage0Anton Blanchard-0/+8
When bootstrapping Rust using a previously built toolchain, I noticed a number of libraries were not copied in. As a result the copied in rustc fails to execute because it can't find all its dependences. Add them into the local_stage0.sh script.
2016-04-28test: Move run-make tests into compiletestAlex Crichton-96/+0
Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-26some Python nits and fixesTshepang Lekhonkhobe-8/+4
2016-04-24Fix keyword parsing testsVadim Petrochenkov-3/+5
2016-04-23Auto merge of #33153 - mitaa:rdoc-dejavu, r=alexcrichtonbors-3/+6
rustdoc: Only record the same impl once Due to inlining it is possible to visit the same module multiple times during `<Cache as DocFolder>::fold_crate`, so we keep track of the modules we've already visited. fixes #33054 r? @alexcrichton
2016-04-23Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoeristerbors-0/+1
Sanity check Python on OSX for LLDB tests Two primary changes: * Don't get past the configure stage if `python` isn't coming from `/usr/bin` * Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB. Closes #32994
2016-04-22Only record the same impl oncemitaa-3/+6
Due to inlining it is possible to visit the same module multiple times during `<Cache as DocFolder>::fold_crate`, so we keep track of the modules we've already visited.
2016-04-20Add comment, reduce storage requirementsRaph Levien-6/+33
Adds a comment which explains the trie structure, and also does a little arithmetic on lookup (no measurable impact, looks like modern CPUs do this arithmetic in parallel with the memory lookup to find the node) to save a bit of space. As a result, the memory impact of the compiled tables is within a couple hundred bytes of the old bsearch-range structure.
2016-04-19Fix wrong shift in trie_lookup_range_tableRaph Levien-1/+1
Somehow got in my head that >> 8 was the right shift for a chunk of 64. Oops, sorry.
2016-04-19Efficient trie lookup for boolean Unicode propertiesRaph Levien-4/+107
Replace binary search of ranges with trie lookup using leaves of 64-bit bitmap chunks. Benchmarks suggest this is approximately 10x faster than the bsearch approach.
2016-04-19mk: Bootstrap from stable instead of snapshotsAlex Crichton-507/+51
This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
2016-04-19etc: Add debugger.Terminate() to lldb_batchmode.pyAlex Crichton-0/+1
Right now on the most recent version of LLDB installed on OSX we'll segfault on all the LLDB tests if this isn't called (unfortunately). Hopefully we've updated LLDB on the bots to actually get this working everywhere! Closes #32994
2016-04-12rustbuild: Migrate tidy checks to RustAlex Crichton-693/+0
This commit rewrites all of the tidy checks we have, namely: * featureck * errorck * tidy * binaries into Rust under a new `tidy` tool inside of the `src/tools` directory. This at the same time deletes all the corresponding Python tidy checks so we can be sure to only have one source of truth for all the tidy checks. cc #31590
2016-04-01Auto merge of #32544 - alexcrichton:rustbuild-dist-libtest, r=brsonbors-0/+1
rustbuild: Fix dist for non-host targets The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-04-01rustbuild: Fix dist for non-host targetsAlex Crichton-0/+1
The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-03-29rustc_platform_intrinsics: remove unused rustc dependency.Eduard Burtescu-2/+1
2016-03-24remove broken configSteve Klabnik-4/+0
Fixes #32412
2016-03-15rustc: Improve compile time of platform intrinsicsAlex Crichton-23/+48
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-13Define AVX blend intrinsicsRuud van Asseldonk-0/+7
This defines the `_mm256_blendv_pd` and `_mm256_blendv_ps` intrinsics. The `_mm256_blend_pd` and `_mm256_blend_ps` intrinsics are not available as LLVM intrinsics. In Clang they are implemented using the shufflevector builtin. Intel reference: https://software.intel.com/en-us/node/524070.
2016-03-13Define AVX comparison intrinsicsRuud van Asseldonk-0/+7
This defines `_mm256_cmp_pd` and `_mm256_cmp_ps`. Intel reference: https://software.intel.com/en-us/node/524075.
2016-03-09Define AVX conversion intrinsicsRuud van Asseldonk-0/+56
This defines the following intrinsics: * `_mm256_cvtepi32_pd` * `_mm256_cvtepi32_ps` * `_mm256_cvtpd_epi32` * `_mm256_cvtpd_ps` * `_mm256_cvtps_epi32` * `_mm256_cvtps_pd` * `_mm256_cvttpd_epi32` * `_mm256_cvttps_epi32` Intel reference: https://software.intel.com/en-us/node/514130.
2016-03-09Define AVX broadcast intrinsicsRuud van Asseldonk-0/+7
This defines `_mm256_broadcast_ps` and `_mm256_broadcast_pd`. The `_ss` and `_sd` variants are not supported by LLVM. In Clang these intrinsics are implemented as inline functions in C++. Intel reference: https://software.intel.com/en-us/node/514144. Note: the argument type should really be "0hPc" (a pointer to a vector of half the width), but internally the LLVM intrinsic takes a pointer to a signed integer, and for any other type LLVM will complain. This means that a transmute is required to call these intrinsics. The AVX2 broadcast intrinsics `_mm256_broadcastss_ps` and `_mm256_broadcastsd_pd` are not available as LLVM intrinsics. In Clang they are implemented using the shufflevector builtin.
2016-03-07Auto merge of #29734 - Ryman:whitespace_consistency, r=Aatchbors-2/+2
libsyntax: be more accepting of whitespace in lexer Fixes #29590. Perhaps this may need more thorough testing? r? @Aatch
2016-03-05Update platform intrinsic generator scriptRuud van Asseldonk-3/+3
The file it generates had been modified, but instead the generator should have been modified, and the file regenerated. This merges the modifications into the template in the generator.
2016-03-05Define x86 fused multiply-add intrinsicsRuud van Asseldonk-0/+47
This defines the following intrinsics for 128 and 256 bit vectors of f32 and f64: * `fmadd` * `fmaddsub` * `fmsub` * `fmsubadd` * `fnmadd` * `fnmsub` The `_sd` and `_ss` variants are not included yet. Intel intrinsic reference: https://software.intel.com/en-us/node/523929 The intrinsics there are listed under AVX2, but in the Intel Intrinsic Guide they are part of the "FMA" technology, and LLVM puts them under FMA, not AVX2.
2016-02-23mk: Tweak tidy script to work on Windows pythonAlex Crichton-2/+5
The MinGW-based Python implementations would automatically do this, but if we want to use Python from the official downloads our usage of `/` instead of `\` can wreak havoc. In a few select locations just use `os.path.normpath` do do the conversions properly for us.
2016-02-16Auto merge of #31672 - semarie:rmake-cxx, r=alexcrichtonbors-0/+1
use CXX value found at configure time inside run-make tests. it permits OpenBSD to pass llvm-module-pass test (which use CXX variable). r? @alexcrichton
2016-02-16pass CXX to run-makeSébastien Marie-0/+1
use CXX value found at configure time inside run-make tests. it permits OpenBSD to pass llvm-module-pass test (which use CXX variable).
2016-02-16Add lint to check that all crates have #![unstable]Keith Yeung-0/+18
2016-02-14Auto merge of #31642 - rkruppe:rm-regex-script, r=alexcrichtonbors-109/+0
This file was probably forgotten when libregex moved out of tree. The rust-lang-nursery/regex repo has a nigh-identical file in its script/ folder.
2016-02-13Add LLVM ModulePass regression test using run-make.Corey Farwell-0/+2
Part of #31185
2016-02-13Remove a regex-related scriptRobin Kruppe-109/+0
This file was probably forgotten when libregex moved out of tree. The rust-lang-nursery/regex repo has a nigh-identical file in its script/ folder.
2016-02-11Add a Cargo-based build systemAlex Crichton-1/+1
This commit is the start of a series of commits which start to replace the makefiles with a Cargo-based build system. The aim is not to remove the makefiles entirely just yet but rather just replace the portions that invoke the compiler to do the bootstrap. This commit specifically adds enough support to perform the bootstrap (and all the cross compilation within) along with generating documentation. More commits will follow up in this series to actually wire up the makefiles to call this build system, so stay tuned!
2016-02-06Auto merge of #31410 - rkruppe:issue31109, r=pnkfelixbors-21/+49
Issue #31109 uncovered two semi-related problems: * A panic in `str::parse::<f64>` * A panic in `rustc::middle::const_eval::lit_to_const` where the result of float parsing was unwrapped. This series of commits fixes both issues and also drive-by-fixes some things I noticed while tracking down the parsing panic.
2016-02-04drive-by doc fixesRobin Kruppe-5/+6
2016-02-04Add the kind of input from #31109 to the expensive tests (not run by default)Robin Kruppe-16/+43
2016-02-03Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichtonbors-1/+2
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846. Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138 Here's a snapshot required to build a stage0 compiler: https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz It passes all checks from `make check`. There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated. Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409 Thanks! r? @brson
2016-01-31show location of unused error codesAlex Burka-1/+1