about summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2019-01-19Combine all builtin early lints and use a separate walk for plugin lints. ↵John Kåre Alsaker-0/+2
Add a -Z no-interleave-lints option to allow benchmarking lints
2019-01-15Querify entry_fnIgor Matuszewski-8/+4
2019-01-15Add missing unpretty option help messageHirokazu Hata-2/+7
2019-01-14Rollup merge of #57570 - Xanewok:querify-some, r=ZoxcMazdak Farrokhzad-4/+0
Querify local `plugin_registrar_fn` and `proc_macro_decls_static` Instead of calculating them as part of the `Session`, we do that in the query system. It's also nice that these queries are already defined for external crates - here, we provide the queries for the local crate. r? @nikomatsakis
2019-01-14Parallelize and optimize parts of HIR map creationJohn Kåre Alsaker-0/+3
2019-01-13Querify local plugin_registrar_fnIgor Matuszewski-2/+0
2019-01-13Querify local proc_macro_decls_staticIgor Matuszewski-2/+0
2019-01-09Auto merge of #56614 - Zoxc:query-perf2, r=michaelwoeristerbors-19/+28
Replace LockCell with atomic types Split from https://github.com/rust-lang/rust/pull/56509 r? @michaelwoerister
2019-01-07Revert "Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton"Matthias Krüger-7/+0
This reverts commit 68614265d312fc2cbe8a696f7dabb9416eb6f221, reversing changes made to cae623c5ce12df8f237264d8f2c31fdaa664c382. Should fix tools on windows. Reopens #57014
2019-01-05Add a target option "merge-functions" taking values in ("disabled",Peter Jin-4/+24
"trampolines", or "aliases (the default)) to allow targets to opt out of the MergeFunctions LLVM pass. Also add a corresponding -Z option with the same name and values. This works around: https://github.com/rust-lang/rust/issues/57356 Motivation: Basically, the problem is that the MergeFunctions pass, which rustc currently enables by default at -O2 and -O3, and `extern "ptx-kernel"` functions (specific to the NVPTX target) are currently not compatible with each other. If the MergeFunctions pass is allowed to run, rustc can generate invalid PTX assembly (i.e. a PTX file that is not accepted by the native PTX assembler ptxas). Therefore we would like a way to opt out of the MergeFunctions pass, which is what our target option does. Related work: The current behavior of rustc is to enable MergeFunctions at -O2 and -O3, and also to enable the use of function aliases within MergeFunctions. MergeFunctions both with and without function aliases is incompatible with the NVPTX target. clang's "solution" is to have a "-fmerge-functions" flag that opts in to the MergeFunctions pass, but it is not enabled by default.
2019-01-05Rollup merge of #57219 - matthewjasper:mir-cleanup, r=nikomatsakiskennytm-4/+0
Remove some unused code Closes #57096
2019-01-05Auto merge of #57101 - o01eg:fix-57014, r=alexcrichtonbors-0/+7
Search codegen backends based on target libdir instead of sysroot Fixes #57014 Fixes cases with custom libdir when it consists of two or more parts.
2018-12-30Remove unused nll debug flagsMatthew Jasper-4/+0
2018-12-30Add `-Z instrument-mcount`Jun Wu-1/+10
This flag inserts `mcount` function call to the beginning of every function after inline processing. So tracing tools like uftrace [1] (or ftrace for Linux kernel modules) have a chance to examine function calls. It is similar to the `-pg` flag provided by gcc or clang, but without generating a `__gmon_start__` function for executables. If a program runs without being traced, no `gmon.out` will be written to disk. Under the hood, it simply adds `"instrument-function-entry-inlined"="mcount"` attribute to every function. The `post-inline-ee-instrument` LLVM pass does the actual job. [1]: https://github.com/namhyung/uftrace
2018-12-29Create a struct for optimization fuel dataJohn Kåre Alsaker-30/+26
2018-12-29Replace LockCell with atomic typesJohn Kåre Alsaker-16/+29
2018-12-28Auto merge of #57118 - Zoxc:query-stats, r=wesleywiserbors-0/+2
Add a command line flag to print some query stats r? @michaelwoerister
2018-12-25Remove licensesMark Rousskov-50/+0
2018-12-25Add a command line flag to print some query statsJohn Kåre Alsaker-0/+2
2018-12-24Search codegen backends based on target libdir instead of sysroot.O01eg-0/+7
Fixes cases with custom libdir when it consists of two or more parts.
2018-12-24Rollup merge of #57021 - nikic:arg-pointer-align, r=nagisaMazdak Farrokhzad-2/+0
Enable emission of alignment attrs for pointer params Instead disable creation of assumptions during inlining using an LLVM opt flag. For non-inlined functions, this gives us alignment information, while not inserting any assumes that kill other optimizations. The `-Z arg-align-attributes` option which previously controlled this behavior is removed. Fixes #54982. r? @nagisa cc @eddyb who added the current behavior, and @scottmcm, who added the `-Z arg-align-attributes` flag.
2018-12-21Enable emission of alignment attrs for pointer paramsNikita Popov-2/+0
Instead disable creation of assumptions during inlining using an LLVM opt flag. The -Z arg-align-attributes option which previously controlled this behavior is removed.
2018-12-17Tweak query code for performanceJohn Kåre Alsaker-3/+17
2018-12-14Auto merge of #56351 - davidtwco:issue-55396-stabilize-linker-flavor, r=nagisabors-2/+2
Stabilize `linker-flavor` flag. Part of #55396. This commit moves the linker-flavor flag from a debugging option to a codegen option, thus stabilizing it. There are no feature flags associated with this flag. r? @nagisa
2018-12-13Stabilize `linker-flavor` flag.David Wood-2/+2
This commit moves the linker-flavor flag from a debugging option to a codegen option, thus stabilizing it. There are no feature flags associated with this flag.
2018-12-12Replace `FileSearch::for_each_lib_search_path` with `search_paths`.Nicholas Nethercote-23/+17
Returning an iterator leads to nicer code all around.
2018-12-12Avoid regenerating the `Vec<PathBuf>` in `FileSearch::search()`.Nicholas Nethercote-25/+42
`FileSearch::search()` traverses one or more directories. For each directory it generates a `Vec<PathBuf>` containing one element per file in that directory. In some benchmarks this occurs enough that the allocations done for the `PathBuf`s are significant, and in practice a small number of directories are being traversed over and over again. For example, when compiling the `tokio-webpush-simple` benchmark, two directories are traversed 58 times each. Each of these directories have more than 100 files. This commit changes things so that all the `Vec<PathBuf>`s that will be needed by a `Session` are precomputed when that `Session` is created; they are stored in `SearchPath`. `FileSearch` gets a reference to the necessary `SearchPath`s. This reduces instruction counts on several benchmarks by 1--5%. The commit also removes the barely-used `visited_dirs` hash in `for_each_lib_searchPath`. It only detects if `tlib_path` is the same as one of the previously seen paths, which is unlikely.
2018-12-12Introduce `SearchPath` and replace `SearchPaths` with `Vec<SearchPath>`.Nicholas Nethercote-77/+63
It's more idiomatic, makes the code shorter, and will help with the next commit.
2018-12-12Remove `Session::sysroot()`.Nicholas Nethercote-16/+8
Instead of maybe storing its own sysroot and maybe deferring to the one in `Session::opts`, just clone the latter when necessary so one is always directly available. This removes the need for the getter.
2018-12-12Avoid a useless `FxHashSet::insert` in `FileSearch::for_each_lib_search_path`.Nicholas Nethercote-2/+0
2018-12-08Rollup merge of #56597 - vext01:dump-mir-usage, r=wesleywiserMazdak Farrokhzad-1/+7
Improve the usage message for `-Z dump-mir`. Ouput now looks like this: ``` $ rustc -Z help ... -Z arg-align-attributes -- emit align metadata for reference arguments -Z dump-mir=val -- dump MIR state to file. `val` is used to select which passes and functions to dump. For example: `all` matches all passes and functions, `foo` matches all passes for functions whose name contains 'foo', `foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo', `foo | bar` all passes for function names containing 'foo' or 'bar'. -Z dump-mir-dir=val -- the directory the MIR is dumped into ... ``` Fixes #56558
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-5/+5
2018-12-07Improve the usage message for `-Z dump-mir`.Edd Barrett-1/+7
2018-12-06Rollup merge of #56553 - wesleywiser:silence_profiler_output, r=Mark-SimulacrumPietro Albini-1/+1
Don't print the profiling summary to stdout when -Zprofile-json is set cc rust-lang-nursery/rustc-perf#299
2018-12-06Rollup merge of #56500 - ljedrz:cleanup_rest_of_const_lifetimes, r=zackmdavisPietro Albini-26/+25
cleanup: remove static lifetimes from consts A follow-up to https://github.com/rust-lang/rust/pull/56497.
2018-12-05Don't print the profiling summary to stdout when -Zprofile-json is setWesley Wiser-1/+1
cc rust-lang-nursery/rustc-perf#299
2018-12-06Auto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, ↵bors-2/+2
r=michaelwoerister 53956 panic on include bytes of own file fix #53956 When using `include_bytes!` on a source file in the project, compiler would panic on subsequent compilations because `expand_include_bytes` would overwrite files in the source_map with no source. This PR changes `expand_include_bytes` to check source_map and use the already existing src, if any.
2018-12-05Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNNPietro Albini-6/+5
Utilize `?` instead of `return None`. None
2018-12-04updates all Filename variants to take a fingerprintMatthew Russo-2/+2
2018-12-04Utilize `?` instead of `return None`.Corey Farwell-6/+5
2018-12-04cleanup: remove static lifetimes from constsljedrz-26/+25
2018-12-01Rollup merge of #56339 - yui-knk:remove_mir_stats_flag, r=alexcrichtonkennytm-2/+0
Remove not used option `mir_stats` has not been used since 2b32cb90c72d90c722d56324ca0ea9f748ebf4e1.
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-4/+4
(compiler front-ends).
2018-11-29Remove not used optionyui-knk-2/+0
`mir_stats` has not been used since 2b32cb90c72d90c722d56324ca0ea9f748ebf4e1.
2018-11-25Rollup merge of #56170 - wesleywiser:fix_self_profiler_windows, r=estebankPietro Albini-2/+4
Fix self profiler ICE on Windows Fixes #51648
2018-11-25Auto merge of #55959 - matthewjasper:remove-end-region, r=nikomatsakisbors-2/+0
Cleanup from lexical MIR borrowck removal Lexical MIR borrowck was removed months ago now, and `EndRegion`s are no longer used for MIRI verification. * Remove `rustc::mir::StatementKind::EndRegion` and the `-Zemit_end_regions` flag * Use `RegionVid` instead of `Region` in BorrowSet * Rewrite drop generation to create fewer goto terminators. r? @nikomatsakis
2018-11-23Auto merge of #54071 - eddyb:alignsssss, r=oli-obkbors-1/+1
rustc_target: separate out an individual alignment quantity type from Align. Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities). After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities. `Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment). r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
2018-11-22Disable the self-profiler unless the `-Z self-profile` flag is setWesley Wiser-2/+4
Related to #51648
2018-11-22Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichtonGuillaume Gomez-1/+1
Fix error message for `-C panic=xxx`. Fixes rust-lang/cargo#6334
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-3/+3