Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
0b18ed83
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0b18ed83
编写于
12月 14, 2020
作者:
W
Wesley Wiser
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable the constant debuginfo promotion pass by default
It doesn't work correctly on *-pc-windows-gnu
上级
01aec8d1
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
54 addition
and
14 deletion
+54
-14
compiler/rustc_mir/src/transform/const_debuginfo.rs
compiler/rustc_mir/src/transform/const_debuginfo.rs
+5
-1
src/test/incremental/hashes/let_expressions.rs
src/test/incremental/hashes/let_expressions.rs
+2
-2
src/test/mir-opt/const_debuginfo.rs
src/test/mir-opt/const_debuginfo.rs
+1
-1
src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir
...timizes_into_variable.main.SimplifyLocals.after.32bit.mir
+15
-3
src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir
...timizes_into_variable.main.SimplifyLocals.after.64bit.mir
+15
-3
src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
...issue_76997_inline_scopes_parenting.main.Inline.after.mir
+5
-1
src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir
...test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir
+1
-1
src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir
...ile_let_loops.change_loop_body.PreCodegen.after.32bit.mir
+5
-1
src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir
...ile_let_loops.change_loop_body.PreCodegen.after.64bit.mir
+5
-1
未找到文件。
compiler/rustc_mir/src/transform/const_debuginfo.rs
浏览文件 @
0b18ed83
...
...
@@ -15,7 +15,11 @@
pub
struct
ConstDebugInfo
;
impl
<
'tcx
>
MirPass
<
'tcx
>
for
ConstDebugInfo
{
fn
run_pass
(
&
self
,
_
tcx
:
TyCtxt
<
'tcx
>
,
body
:
&
mut
Body
<
'tcx
>
)
{
fn
run_pass
(
&
self
,
tcx
:
TyCtxt
<
'tcx
>
,
body
:
&
mut
Body
<
'tcx
>
)
{
if
!
tcx
.sess.opts.debugging_opts.unsound_mir_opts
{
return
;
}
trace!
(
"running ConstDebugInfo on {:?}"
,
body
.source
);
for
(
local
,
constant
)
in
find_optimization_oportunities
(
body
)
{
...
...
src/test/incremental/hashes/let_expressions.rs
浏览文件 @
0b18ed83
...
...
@@ -86,7 +86,7 @@ pub fn change_mutability_of_slot() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg=
"cfail2"
,
except=
"hir_owner_nodes,typeck"
)]
except=
"hir_owner_nodes,typeck
,optimized_mir
"
)]
#[rustc_clean(cfg=
"cfail3"
)]
pub
fn
change_mutability_of_slot
()
{
let
_
x
:
u64
=
0
;
...
...
@@ -166,7 +166,7 @@ pub fn change_mutability_of_binding_in_pattern() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg=
"cfail2"
,
except=
"hir_owner_nodes,typeck"
)]
except=
"hir_owner_nodes,typeck
,optimized_mir
"
)]
#[rustc_clean(cfg=
"cfail3"
)]
pub
fn
change_mutability_of_binding_in_pattern
()
{
let
(
mut
_
a
,
_
b
)
=
(
99u8
,
'q'
);
...
...
src/test/mir-opt/const_debuginfo.rs
浏览文件 @
0b18ed83
// compile-flags: -C overflow-checks=no
// compile-flags: -C overflow-checks=no
-Zunsound-mir-opts
struct
Point
{
x
:
u32
,
...
...
src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir
浏览文件 @
0b18ed83
...
...
@@ -2,18 +2,30 @@
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:11:11: 11:11
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
scope 1 {
debug x => const 4_i32; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
let _2: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
scope 2 {
debug y => const 3_i32; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
debug y => _2; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
let _3: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
scope 3 {
debug z =>
const 42_u32;
// in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
debug z =>
_3;
// in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
}
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
}
}
src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir
浏览文件 @
0b18ed83
...
...
@@ -2,18 +2,30 @@
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:11:11: 11:11
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
scope 1 {
debug x => const 4_i32; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
let _2: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
scope 2 {
debug y => const 3_i32; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
debug y => _2; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
let _3: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
scope 3 {
debug z =>
const 42_u32;
// in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
debug z =>
_3;
// in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
}
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
}
}
src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
浏览文件 @
0b18ed83
...
...
@@ -11,8 +11,9 @@ fn main() -> () {
debug f => _1; // in scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:5:9: 5:10
scope 2 (inlined main::{closure#0}) { // at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
debug x => _5; // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
let _6: (); // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
scope 3 {
debug y =>
const ();
// in scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
debug y =>
_6;
// in scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
}
}
}
...
...
@@ -26,7 +27,10 @@ fn main() -> () {
(_3.0: ()) = move _4; // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageLive(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
_5 = move (_3.0: ()); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageLive(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
_6 = const (); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
_0 = const (); // scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageDead(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageDead(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageDead(_4); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:9: 6:10
StorageDead(_3); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:9: 6:10
...
...
src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir
浏览文件 @
0b18ed83
...
...
@@ -3,7 +3,7 @@
fn f_u64() -> () {
let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:34:16: 34:16
scope 1 (inlined f_dispatch::<u64>) { // at $DIR/lower_intrinsics.rs:35:5: 35:21
debug t =>
const 0_u64;
// in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
debug t =>
_2;
// in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
let _1: (); // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
let mut _2: u64; // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
scope 2 (inlined std::mem::size_of::<u64>) { // at $DIR/lower_intrinsics.rs:35:5: 35:21
...
...
src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir
浏览文件 @
0b18ed83
...
...
@@ -2,12 +2,16 @@
fn change_loop_body() -> () {
let mut _0: (); // return place in scope 0 at $DIR/while_let_loops.rs:5:27: 5:27
let mut _1: i32; // in scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
scope 1 {
debug _x =>
const 0_i32;
// in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
debug _x =>
_1;
// in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
_1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
return; // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
}
}
src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir
浏览文件 @
0b18ed83
...
...
@@ -2,12 +2,16 @@
fn change_loop_body() -> () {
let mut _0: (); // return place in scope 0 at $DIR/while_let_loops.rs:5:27: 5:27
let mut _1: i32; // in scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
scope 1 {
debug _x =>
const 0_i32;
// in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
debug _x =>
_1;
// in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
_1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
return; // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录