|
| 1 | +From 00ab608642b2b7f8a1dfa4b04958c5188c71cff8 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Joel Galenson < [email protected]> |
| 3 | +Date: Thu, 23 Apr 2020 12:43:32 -0700 |
| 4 | +Subject: [PATCH] Revert "Change opt-level from 2 back to 3" |
| 5 | + |
| 6 | +This reverts commit 0d52c562db18e85cf53078c9ddb40abe469a4aab. |
| 7 | +--- |
| 8 | + Cargo.toml | 7 +++++++ |
| 9 | + src/librustc_mir/interpret/step.rs | 3 --- |
| 10 | + src/test/run-make/wasm-stringify-ints-small/Makefile | 2 +- |
| 11 | + 3 files changed, 8 insertions(+), 4 deletions(-) |
| 12 | + |
| 13 | +diff --git a/Cargo.toml b/Cargo.toml |
| 14 | +index 2f5a708e8dc..9d5c27b96df 100644 |
| 15 | +--- a/Cargo.toml |
| 16 | ++++ b/Cargo.toml |
| 17 | +@@ -31,6 +31,13 @@ exclude = [ |
| 18 | + "obj", |
| 19 | + ] |
| 20 | + |
| 21 | ++# Curiously, LLVM 7.0 will segfault if compiled with opt-level=3 |
| 22 | ++# See issue https://github.com/rust-lang/rust/issues/52378 |
| 23 | ++[profile.release] |
| 24 | ++opt-level = 2 |
| 25 | ++[profile.bench] |
| 26 | ++opt-level = 2 |
| 27 | ++ |
| 28 | + # These options are controlled from our rustc wrapper script, so turn them off |
| 29 | + # here and have them controlled elsewhere. |
| 30 | + [profile.dev] |
| 31 | +diff --git a/src/librustc_mir/interpret/step.rs b/src/librustc_mir/interpret/step.rs |
| 32 | +index f298a6677d6..4a3f4d9b14e 100644 |
| 33 | +--- a/src/librustc_mir/interpret/step.rs |
| 34 | ++++ b/src/librustc_mir/interpret/step.rs |
| 35 | +@@ -38,9 +38,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { |
| 36 | + /// Returns `true` as long as there are more things to do. |
| 37 | + /// |
| 38 | + /// This is used by [priroda](https://github.com/oli-obk/priroda) |
| 39 | +- /// |
| 40 | +- /// This is marked `#inline(always)` to work around adverserial codegen when `opt-level = 3` |
| 41 | +- #[inline(always)] |
| 42 | + pub fn step(&mut self) -> InterpResult<'tcx, bool> { |
| 43 | + if self.stack.is_empty() { |
| 44 | + return Ok(false); |
| 45 | +diff --git a/src/test/run-make/wasm-stringify-ints-small/Makefile b/src/test/run-make/wasm-stringify-ints-small/Makefile |
| 46 | +index 01e1c6b0ce8..26de6a0c689 100644 |
| 47 | +--- a/src/test/run-make/wasm-stringify-ints-small/Makefile |
| 48 | ++++ b/src/test/run-make/wasm-stringify-ints-small/Makefile |
| 49 | +@@ -4,7 +4,7 @@ ifeq ($(TARGET),wasm32-unknown-unknown) |
| 50 | + all: |
| 51 | + $(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown |
| 52 | + wc -c < $(TMPDIR)/foo.wasm |
| 53 | +- [ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "25000" ] |
| 54 | ++ [ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "20500" ] |
| 55 | + else |
| 56 | + all: |
| 57 | + endif |
| 58 | +-- |
| 59 | +2.26.2.303.gf8c07b1a785-goog |
| 60 | + |
0 commit comments