Revert parts of #66405.
Because PR #66405 caused major performance regressions in some cases.
That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.
Fixes#67454.
r? @nikomatsakis
Because it caused major performance regressions in some cases.
That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.
Fixes#67454.
Use function attribute "frame-pointer" instead of "no-frame-pointer-elim"
LLVM 8 ([D56351](http://reviews.llvm.org/D56351)) introduced "frame-pointer". In LLVM 10 (D71863),
"no-frame-pointer-elim"/"no-frame-pointer-elim-non-leaf" will be
ignored.
-----
In the LLVM monorepo, run `git show origin/release/8.x:llvm/lib/CodeGen/TargetOptionsImpl.cpp` to see that `"frame-pointer"` is available since LLVM 8.
parser: reduce diversity in error handling mechanisms
Instead of having e.g. `span_err`, `fatal`, etc., we prefer to move towards uniformly using `struct_span_err` thus making it harder to emit fatal and/or unstructured diagnostics.
This PR also de-fatalizes some diagnostics.
r? @estebank
Extract `rustc_ast_lowering` crate from `rustc`
Working towards https://github.com/rust-lang/rust/issues/65031.
This PR moves `src/librustc/hir/lowering{/, .rs}` to its own crate (`librustc_ast_lowering`) which is very self-contained (only `fn lower_crate` and `trait Resolver` are exposed).
r? @Mark-Simulacrum
Support `-Z ui-testing=yes/no`
`ui-testing` is now a boolean option (`-Z ui-testing=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z ui-testing=yes -Z ui-testing=no` == `-Z ui-testing=no`), so it can be set in a hierarchical way, e.g. UI testing infra may enable it by default with specific tests being able to opt-out.
This way we can remove the special opt-out support from `compiletest`.
Inspired by https://github.com/rust-lang/rust/pull/67709.
Allocate HIR on an arena 4/4
This is the fourth and last PR in the series started by #66931, #66936 and #66942.
The last commits should compile on their own.
The difference with the previous PR is given by https://github.com/cjgillot/rust/compare/hirene-ty...hirene
A few more cleanups may be necessary, please tell me.
r? @eddyb like the other
cc @Zoxc