Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
7a6832de
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,发现更多精彩内容 >>
提交
7a6832de
编写于
11月 04, 2017
作者:
M
Mikhail Modin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change MIR dump filenames from `nodeN` to `DefPath`
上级
fd9ecfdf
变更
41
隐藏空白更改
内联
并排
Showing
41 changed file
with
155 addition
and
132 deletion
+155
-132
src/librustc/hir/map/definitions.rs
src/librustc/hir/map/definitions.rs
+20
-0
src/librustc_mir/util/pretty.rs
src/librustc_mir/util/pretty.rs
+5
-2
src/test/mir-opt/basic_assignment.rs
src/test/mir-opt/basic_assignment.rs
+2
-2
src/test/mir-opt/box_expr.rs
src/test/mir-opt/box_expr.rs
+2
-2
src/test/mir-opt/copy_propagation.rs
src/test/mir-opt/copy_propagation.rs
+4
-4
src/test/mir-opt/deaggregator_test.rs
src/test/mir-opt/deaggregator_test.rs
+4
-4
src/test/mir-opt/deaggregator_test_enum.rs
src/test/mir-opt/deaggregator_test_enum.rs
+4
-4
src/test/mir-opt/deaggregator_test_enum_2.rs
src/test/mir-opt/deaggregator_test_enum_2.rs
+4
-4
src/test/mir-opt/deaggregator_test_multiple.rs
src/test/mir-opt/deaggregator_test_multiple.rs
+4
-4
src/test/mir-opt/end_region_1.rs
src/test/mir-opt/end_region_1.rs
+2
-2
src/test/mir-opt/end_region_2.rs
src/test/mir-opt/end_region_2.rs
+2
-2
src/test/mir-opt/end_region_3.rs
src/test/mir-opt/end_region_3.rs
+2
-2
src/test/mir-opt/end_region_4.rs
src/test/mir-opt/end_region_4.rs
+2
-2
src/test/mir-opt/end_region_5.rs
src/test/mir-opt/end_region_5.rs
+4
-4
src/test/mir-opt/end_region_6.rs
src/test/mir-opt/end_region_6.rs
+4
-4
src/test/mir-opt/end_region_7.rs
src/test/mir-opt/end_region_7.rs
+4
-4
src/test/mir-opt/end_region_8.rs
src/test/mir-opt/end_region_8.rs
+4
-4
src/test/mir-opt/end_region_9.rs
src/test/mir-opt/end_region_9.rs
+2
-2
src/test/mir-opt/end_region_cyclic.rs
src/test/mir-opt/end_region_cyclic.rs
+2
-2
src/test/mir-opt/end_region_destruction_extents_1.rs
src/test/mir-opt/end_region_destruction_extents_1.rs
+5
-5
src/test/mir-opt/issue-38669.rs
src/test/mir-opt/issue-38669.rs
+2
-2
src/test/mir-opt/issue-41110.rs
src/test/mir-opt/issue-41110.rs
+4
-4
src/test/mir-opt/issue-43457.rs
src/test/mir-opt/issue-43457.rs
+1
-1
src/test/mir-opt/match_false_edges.rs
src/test/mir-opt/match_false_edges.rs
+6
-6
src/test/mir-opt/nll/liveness-call-subtlety.rs
src/test/mir-opt/nll/liveness-call-subtlety.rs
+4
-4
src/test/mir-opt/nll/liveness-drop-intra-block.rs
src/test/mir-opt/nll/liveness-drop-intra-block.rs
+2
-2
src/test/mir-opt/nll/liveness-interblock.rs
src/test/mir-opt/nll/liveness-interblock.rs
+4
-4
src/test/mir-opt/nll/reborrow-basic.rs
src/test/mir-opt/nll/reborrow-basic.rs
+4
-4
src/test/mir-opt/nll/region-liveness-basic.rs
src/test/mir-opt/nll/region-liveness-basic.rs
+6
-6
src/test/mir-opt/nll/region-liveness-drop-may-dangle.rs
src/test/mir-opt/nll/region-liveness-drop-may-dangle.rs
+2
-2
src/test/mir-opt/nll/region-liveness-drop-no-may-dangle.rs
src/test/mir-opt/nll/region-liveness-drop-no-may-dangle.rs
+2
-2
src/test/mir-opt/nll/region-liveness-two-disjoint-uses.rs
src/test/mir-opt/nll/region-liveness-two-disjoint-uses.rs
+2
-2
src/test/mir-opt/nll/region-subtyping-basic.rs
src/test/mir-opt/nll/region-subtyping-basic.rs
+4
-4
src/test/mir-opt/simplify_if.rs
src/test/mir-opt/simplify_if.rs
+4
-4
src/test/mir-opt/storage_live_dead_in_statics.rs
src/test/mir-opt/storage_live_dead_in_statics.rs
+2
-2
src/test/mir-opt/storage_ranges.rs
src/test/mir-opt/storage_ranges.rs
+2
-2
src/test/mir-opt/validate_1.rs
src/test/mir-opt/validate_1.rs
+6
-6
src/test/mir-opt/validate_2.rs
src/test/mir-opt/validate_2.rs
+2
-2
src/test/mir-opt/validate_3.rs
src/test/mir-opt/validate_3.rs
+2
-2
src/test/mir-opt/validate_4.rs
src/test/mir-opt/validate_4.rs
+8
-8
src/test/mir-opt/validate_5.rs
src/test/mir-opt/validate_5.rs
+4
-4
未找到文件。
src/librustc/hir/map/definitions.rs
浏览文件 @
7a6832de
...
...
@@ -314,6 +314,26 @@ pub fn to_string_no_crate(&self) -> String {
s
}
/// Return filename friendly string of the DefPah without
/// the crate-prefix. This method is useful if you don't have
/// a TyCtxt available.
pub
fn
to_filename_friendly_no_crate
(
&
self
)
->
String
{
let
mut
s
=
String
::
with_capacity
(
self
.data
.len
()
*
16
);
for
component
in
&
self
.data
{
if
component
.disambiguator
==
0
{
write!
(
s
,
".{}"
,
component
.data
.as_interned_str
())
.unwrap
();
}
else
{
write!
(
s
,
".{}[{}]"
,
component
.data
.as_interned_str
(),
component
.disambiguator
)
.unwrap
();
}
}
s
}
}
#[derive(Clone,
Debug,
Eq,
PartialEq,
Hash,
RustcEncodable,
RustcDecodable)]
...
...
src/librustc_mir/util/pretty.rs
浏览文件 @
7a6832de
...
...
@@ -132,9 +132,12 @@ fn dump_matched_mir_node<'a, 'gcx, 'tcx, F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
let
p
=
Path
::
new
(
file_dir
);
file_path
.push
(
p
);
};
let
_
=
fs
::
create_dir_all
(
&
file_path
);
let
file_name
=
format!
(
"rustc.node{}{}{}.{}.{}.mir"
,
source
.item_id
(),
promotion_id
,
pass_num
,
pass_name
,
disambiguator
);
let
function_name
=
tcx
.hir
.def_path_from_id
(
source
.item_id
())
.map
(|
d
|
d
.to_filename_friendly_no_crate
())
.unwrap_or
(
format!
(
".node{}"
,
source
.item_id
()));
let
file_name
=
format!
(
"rustc{}{}{}.{}.{}.mir"
,
function_name
,
promotion_id
,
pass_num
,
pass_name
,
disambiguator
);
file_path
.push
(
&
file_name
);
let
_
=
fs
::
File
::
create
(
&
file_path
)
.and_then
(|
mut
file
|
{
writeln!
(
file
,
"// MIR for `{}`"
,
node_path
)
?
;
...
...
src/test/mir-opt/basic_assignment.rs
浏览文件 @
7a6832de
...
...
@@ -36,7 +36,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-initial.after.mir
// START rustc.
main
.SimplifyCfg-initial.after.mir
// bb0: {
// StorageLive(_1);
// _1 = const false;
...
...
@@ -82,4 +82,4 @@ fn main() {
// StorageDead(_1);
// return;
// }
// END rustc.
node4
.SimplifyCfg-initial.after.mir
// END rustc.
main
.SimplifyCfg-initial.after.mir
src/test/mir-opt/box_expr.rs
浏览文件 @
7a6832de
...
...
@@ -28,7 +28,7 @@ fn drop(&mut self) {
}
// END RUST SOURCE
// START rustc.
node4
.ElaborateDrops.before.mir
// START rustc.
main
.ElaborateDrops.before.mir
// let mut _0: ();
// scope 1 {
// let _1: std::boxed::Box<S>;
...
...
@@ -88,4 +88,4 @@ fn drop(&mut self) {
// return;
// }
// }
// END rustc.
node4
.ElaborateDrops.before.mir
// END rustc.
main
.ElaborateDrops.before.mir
src/test/mir-opt/copy_propagation.rs
浏览文件 @
7a6832de
...
...
@@ -19,7 +19,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.CopyPropagation.before.mir
// START rustc.
test
.CopyPropagation.before.mir
// bb0: {
// ...
// _3 = _1;
...
...
@@ -31,12 +31,12 @@ fn main() {
// ...
// return;
// }
// END rustc.
node4
.CopyPropagation.before.mir
// START rustc.
node4
.CopyPropagation.after.mir
// END rustc.
test
.CopyPropagation.before.mir
// START rustc.
test
.CopyPropagation.after.mir
// bb0: {
// ...
// _0 = _1;
// ...
// return;
// }
// END rustc.
node4
.CopyPropagation.after.mir
// END rustc.
test
.CopyPropagation.after.mir
src/test/mir-opt/deaggregator_test.rs
浏览文件 @
7a6832de
...
...
@@ -24,7 +24,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node13
.Deaggregator.before.mir
// START rustc.
bar
.Deaggregator.before.mir
// bb0: {
// ...
// _2 = _1;
...
...
@@ -33,8 +33,8 @@ fn main() {
// ...
// return;
// }
// END rustc.
node13
.Deaggregator.before.mir
// START rustc.
node13
.Deaggregator.after.mir
// END rustc.
bar
.Deaggregator.before.mir
// START rustc.
bar
.Deaggregator.after.mir
// bb0: {
// ...
// _2 = _1;
...
...
@@ -45,4 +45,4 @@ fn main() {
// ...
// return;
// }
// END rustc.
node13
.Deaggregator.after.mir
// END rustc.
bar
.Deaggregator.after.mir
src/test/mir-opt/deaggregator_test_enum.rs
浏览文件 @
7a6832de
...
...
@@ -26,7 +26,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node10
.Deaggregator.before.mir
// START rustc.
bar
.Deaggregator.before.mir
// bb0: {
// StorageLive(_2);
// _2 = _1;
...
...
@@ -34,8 +34,8 @@ fn main() {
// StorageDead(_2);
// return;
// }
// END rustc.
node10
.Deaggregator.before.mir
// START rustc.
node10
.Deaggregator.after.mir
// END rustc.
bar
.Deaggregator.before.mir
// START rustc.
bar
.Deaggregator.after.mir
// bb0: {
// StorageLive(_2);
// _2 = _1;
...
...
@@ -44,4 +44,4 @@ fn main() {
// StorageDead(_2);
// return;
// }
// END rustc.
node10
.Deaggregator.after.mir
// END rustc.
bar
.Deaggregator.after.mir
src/test/mir-opt/deaggregator_test_enum_2.rs
浏览文件 @
7a6832de
...
...
@@ -29,7 +29,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node12
.Deaggregator.before.mir
// START rustc.
test1
.Deaggregator.before.mir
// bb1: {
// StorageLive(_4);
// _4 = _2;
...
...
@@ -44,8 +44,8 @@ fn main() {
// StorageDead(_5);
// goto -> bb3;
// }
// END rustc.
node12
.Deaggregator.before.mir
// START rustc.
node12
.Deaggregator.after.mir
// END rustc.
test1
.Deaggregator.before.mir
// START rustc.
test1
.Deaggregator.after.mir
// bb1: {
// StorageLive(_4);
// _4 = _2;
...
...
@@ -62,5 +62,5 @@ fn main() {
// StorageDead(_5);
// goto -> bb3;
// }
// END rustc.
node12
.Deaggregator.after.mir
// END rustc.
test1
.Deaggregator.after.mir
//
src/test/mir-opt/deaggregator_test_multiple.rs
浏览文件 @
7a6832de
...
...
@@ -25,7 +25,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node10
.Deaggregator.before.mir
// START rustc.
test
.Deaggregator.before.mir
// bb0: {
// ...
// _3 = _1;
...
...
@@ -39,8 +39,8 @@ fn main() {
// ...
// return;
// }
// END rustc.
node10
.Deaggregator.before.mir
// START rustc.
node10
.Deaggregator.after.mir
// END rustc.
test
.Deaggregator.before.mir
// START rustc.
test
.Deaggregator.after.mir
// bb0: {
// ...
// _3 = _1;
...
...
@@ -56,4 +56,4 @@ fn main() {
// ...
// return;
// }
// END rustc.
node10
.Deaggregator.after.mir
// END rustc.
test
.Deaggregator.after.mir
src/test/mir-opt/end_region_1.rs
浏览文件 @
7a6832de
...
...
@@ -19,7 +19,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _1: i32;
...
...
@@ -37,4 +37,4 @@ fn main() {
// StorageDead(_1);
// return;
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_2.rs
浏览文件 @
7a6832de
...
...
@@ -24,7 +24,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _2: bool;
...
...
@@ -69,4 +69,4 @@ fn main() {
// StorageDead(_2);
// goto -> bb1;
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_3.rs
浏览文件 @
7a6832de
...
...
@@ -25,7 +25,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let mut _1: bool;
...
...
@@ -70,4 +70,4 @@ fn main() {
// StorageDead(_3);
// goto -> bb1;
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_4.rs
浏览文件 @
7a6832de
...
...
@@ -29,7 +29,7 @@ fn foo(i: i32) {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _1: D;
...
...
@@ -76,4 +76,4 @@ fn foo(i: i32) {
// StorageDead(_1);
// return;
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_5.rs
浏览文件 @
7a6832de
...
...
@@ -26,7 +26,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// ...
// let mut _0: ();
...
...
@@ -64,9 +64,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
node18
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(18) d:&'14s D]) -> i32 {
// let mut _0: i32;
// let mut _2: i32;
...
...
@@ -78,4 +78,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_2);
// return;
// }
// END rustc.
node18
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_6.rs
浏览文件 @
7a6832de
...
...
@@ -26,7 +26,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
...
...
@@ -62,9 +62,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_1);
// return;
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
node22
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) d:&'19s D]) -> i32 {
// let mut _0: i32;
// ...
...
...
@@ -82,4 +82,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_2);
// return;
// }
// END rustc.
node22
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_7.rs
浏览文件 @
7a6832de
...
...
@@ -26,7 +26,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
...
...
@@ -70,9 +70,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
node22
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) d:D]) -> i32 {
// let mut _0: i32;
// ...
...
...
@@ -94,4 +94,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.
node22
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_8.rs
浏览文件 @
7a6832de
...
...
@@ -27,7 +27,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
...
...
@@ -69,9 +69,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
node22
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) r:&'21_1rs D]) -> i32 {
// let mut _0: i32;
// let mut _2: i32;
...
...
@@ -84,4 +84,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.
node22
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main.{{closure}}
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_9.rs
浏览文件 @
7a6832de
...
...
@@ -37,7 +37,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
...
...
@@ -84,4 +84,4 @@ fn main() {
// goto -> bb1;
// }
// }
// END rustc.
node4
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_cyclic.rs
浏览文件 @
7a6832de
...
...
@@ -39,7 +39,7 @@ fn main() {
fn
query
()
->
bool
{
true
}
// END RUST SOURCE
// START rustc.
node16
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
main
.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// scope 1 {
...
...
@@ -130,4 +130,4 @@ fn query() -> bool { true }
// goto -> bb1;
// }
// }
// END rustc.
node16
.SimplifyCfg-qualify-consts.after.mir
// END rustc.
main
.SimplifyCfg-qualify-consts.after.mir
src/test/mir-opt/end_region_destruction_extents_1.rs
浏览文件 @
7a6832de
...
...
@@ -60,11 +60,11 @@ fn drop(&mut self) {
// transformation encoding the effects of rvalue-promotion.
// This may be the simplest and most-likely option; note in
// particular that `StorageDead(_6)` goes away below in
// rustc.
node4
.QualifyAndPromoteConstants.after.mir
// rustc.
main
.QualifyAndPromoteConstants.after.mir
// END RUST SOURCE
// START rustc.
node4
.QualifyAndPromoteConstants.before.mir
// START rustc.
main
.QualifyAndPromoteConstants.before.mir
// fn main() -> () {
// let mut _0: ();
// let mut _1: &'12ds S1;
...
...
@@ -113,9 +113,9 @@ fn drop(&mut self) {
// return;
// }
// }
// END rustc.
node4
.QualifyAndPromoteConstants.before.mir
// END rustc.
main
.QualifyAndPromoteConstants.before.mir
// START rustc.
node4
.QualifyAndPromoteConstants.after.mir
// START rustc.
main
.QualifyAndPromoteConstants.after.mir
// fn main() -> () {
// let mut _0: ();
// let mut _1: &'12ds S1;
...
...
@@ -158,4 +158,4 @@ fn drop(&mut self) {
// return;
// }
// }
// END rustc.
node4
.QualifyAndPromoteConstants.after.mir
// END rustc.
main
.QualifyAndPromoteConstants.after.mir
src/test/mir-opt/issue-38669.rs
浏览文件 @
7a6832de
...
...
@@ -21,7 +21,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyCfg-initial.after.mir
// START rustc.
main
.SimplifyCfg-initial.after.mir
// bb0: {
// StorageLive(_1);
// _1 = const false;
...
...
@@ -48,4 +48,4 @@ fn main() {
// _2 = ();
// goto -> bb1;
// }
// END rustc.
node4
.SimplifyCfg-initial.after.mir
// END rustc.
main
.SimplifyCfg-initial.after.mir
src/test/mir-opt/issue-41110.rs
浏览文件 @
7a6832de
...
...
@@ -35,7 +35,7 @@ fn other(self, s: Self) {}
}
// END RUST SOURCE
// START rustc.
node4
.ElaborateDrops.after.mir
// START rustc.
main
.ElaborateDrops.after.mir
// let mut _0: ();
// scope 1 {
// let _1: ();
...
...
@@ -46,8 +46,8 @@ fn other(self, s: Self) {}
// let mut _4: S;
// let mut _5: bool;
// bb0: {
// END rustc.
node4
.ElaborateDrops.after.mir
// START rustc.
node13
.ElaborateDrops.after.mir
// END rustc.
main
.ElaborateDrops.after.mir
// START rustc.
test
.ElaborateDrops.after.mir
// let mut _0: ();
// ...
// let _1: S;
...
...
@@ -59,4 +59,4 @@ fn other(self, s: Self) {}
// let mut _5: S;
// let mut _6: bool;
// bb0: {
// END rustc.
node13
.ElaborateDrops.after.mir
// END rustc.
test
.ElaborateDrops.after.mir
src/test/mir-opt/issue-43457.rs
浏览文件 @
7a6832de
...
...
@@ -23,7 +23,7 @@ fn rc_refcell_test(r: RefCell<i32>) {
fn
main
()
{
}
// END RUST SOURCE
// START rustc.
node5
.SimplifyCfg-qualify-consts.after.mir
// START rustc.
rc_refcell_test
.SimplifyCfg-qualify-consts.after.mir
//
// fn rc_refcell_test(_1: std::cell::RefCell<i32>) -> () {
// let mut _0: ();
...
...
src/test/mir-opt/match_false_edges.rs
浏览文件 @
7a6832de
...
...
@@ -49,7 +49,7 @@ fn main() {
// END RUST SOURCE
//
// START rustc.
node17
.SimplifyBranches-initial.before.mir
// START rustc.
full_tested_match
.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
...
...
@@ -104,9 +104,9 @@ fn main() {
// ...
// return;
// }
// END rustc.
node17
.SimplifyBranches-initial.before.mir
// END rustc.
full_tested_match
.SimplifyBranches-initial.before.mir
//
// START rustc.
node4
2.SimplifyBranches-initial.before.mir
// START rustc.
full_tested_match
2.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
...
...
@@ -161,9 +161,9 @@ fn main() {
// ...
// return;
// }
// END rustc.
node4
2.SimplifyBranches-initial.before.mir
// END rustc.
full_tested_match
2.SimplifyBranches-initial.before.mir
//
// START rustc.
node67
.SimplifyBranches-initial.before.mir
// START rustc.
main
.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 1i32,);
...
...
@@ -237,4 +237,4 @@ fn main() {
// ...
// return;
// }
// END rustc.
node67
.SimplifyBranches-initial.before.mir
// END rustc.
main
.SimplifyBranches-initial.before.mir
src/test/mir-opt/nll/liveness-call-subtlety.rs
浏览文件 @
7a6832de
...
...
@@ -25,7 +25,7 @@ fn main() {
// - `_1` is live when `can_panic` is called (because it may be dropped)
//
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | Live variables on entry to bb0: []
// bb0: {
// | Live variables at bb0[0]: []
...
...
@@ -37,8 +37,8 @@ fn main() {
// | Live variables at bb0[3]: [_2]
// _1 = const <std::boxed::Box<T>>::new(_2) -> bb1;
// }
// END rustc.
node12
.nll.0.mir
// START rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | Live variables on entry to bb1: [_1 (drop)]
// bb1: {
// | Live variables at bb1[0]: [_1 (drop)]
...
...
@@ -48,4 +48,4 @@ fn main() {
// | Live variables at bb1[2]: [_1 (drop)]
// _3 = const can_panic() -> [return: bb2, unwind: bb4];
// }
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/liveness-drop-intra-block.rs
浏览文件 @
7a6832de
...
...
@@ -24,7 +24,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | Live variables on entry to bb1: []
// bb1: {
// | Live variables at bb1[0]: []
...
...
@@ -38,4 +38,4 @@ fn main() {
// | Live variables at bb1[4]: [_4]
// _3 = const use_x(_4) -> bb2;
// }
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/liveness-interblock.rs
浏览文件 @
7a6832de
...
...
@@ -28,7 +28,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node18
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | Live variables on entry to bb2: [_1]
// bb2: {
// | Live variables at bb2[0]: [_1]
...
...
@@ -38,13 +38,13 @@ fn main() {
// | Live variables at bb2[2]: [_4]
// _3 = const make_live(_4) -> bb4;
// }
// END rustc.
node18
.nll.0.mir
// START rustc.
node18
.nll.0.mir
// END rustc.
main
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | Live variables on entry to bb3: []
// bb3: {
// | Live variables at bb3[0]: []
// _5 = const make_dead() -> bb5;
// }
// END rustc.
node18
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/reborrow-basic.rs
浏览文件 @
7a6832de
...
...
@@ -27,13 +27,13 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node13
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | '_#5r: {bb0[6], bb0[7], bb0[8], bb0[9], bb0[10], bb0[11], bb0[12], bb0[13], bb0[14]}
// ...
// | '_#7r: {bb0[11], bb0[12], bb0[13], bb0[14]}
// END rustc.
node13
.nll.0.mir
// START rustc.
node13
.nll.0.mir
// END rustc.
main
.nll.0.mir
// START rustc.
main
.nll.0.mir
// let _2: &'_#5r mut i32;
// ...
// let _4: &'_#7r mut i32;
// END rustc.
node13
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/region-liveness-basic.rs
浏览文件 @
7a6832de
...
...
@@ -30,21 +30,21 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | '_#0r: {bb1[1], bb2[0], bb2[1]}
// | '_#1r: {bb1[1], bb2[0], bb2[1]}
// ...
// let _2: &'_#1r usize;
// END rustc.
node12
.nll.0.mir
// START rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
// START rustc.
main
.nll.0.mir
// bb1: {
// | Live variables at bb1[0]: [_1, _3]
// _2 = &'_#0r _1[_3];
// | Live variables at bb1[1]: [_2]
// switchInt(const true) -> [0u8: bb3, otherwise: bb2];
// }
// END rustc.
node12
.nll.0.mir
// START rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
// START rustc.
main
.nll.0.mir
// bb2: {
// | Live variables at bb2[0]: [_2]
// StorageLive(_7);
...
...
@@ -53,4 +53,4 @@ fn main() {
// | Live variables at bb2[2]: [_7]
// _6 = const use_x(_7) -> bb4;
// }
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/region-liveness-drop-may-dangle.rs
浏览文件 @
7a6832de
...
...
@@ -43,6 +43,6 @@ fn drop(&mut self) { }
}
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | '_#4r: {bb1[3], bb1[4], bb1[5], bb2[0], bb2[1]}
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/region-liveness-drop-no-may-dangle.rs
浏览文件 @
7a6832de
...
...
@@ -45,6 +45,6 @@ fn drop(&mut self) { }
}
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | '_#4r: {bb1[3], bb1[4], bb1[5], bb2[0], bb2[1], bb2[2], bb3[0], bb3[1], bb3[2], bb4[0], bb4[1], bb4[2], bb6[0], bb7[0], bb7[1], bb7[2], bb8[0]}
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/region-liveness-two-disjoint-uses.rs
浏览文件 @
7a6832de
...
...
@@ -35,7 +35,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | '_#0r: {bb1[1], bb2[0], bb2[1]}
// ...
// | '_#2r: {bb7[2], bb7[3], bb7[4]}
...
...
@@ -46,4 +46,4 @@ fn main() {
// _2 = &'_#0r _1[_3];
// ...
// _2 = &'_#2r (*_11);
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/nll/region-subtyping-basic.rs
浏览文件 @
7a6832de
...
...
@@ -31,12 +31,12 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node12
.nll.0.mir
// START rustc.
main
.nll.0.mir
// | '_#0r: {bb1[1], bb1[2], bb1[3], bb1[4], bb1[5], bb1[6], bb2[0], bb2[1]}
// | '_#1r: {bb1[1], bb1[2], bb1[3], bb1[4], bb1[5], bb1[6], bb2[0], bb2[1]}
// | '_#2r: {bb1[5], bb1[6], bb2[0], bb2[1]}
// END rustc.
node12
.nll.0.mir
// START rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
// START rustc.
main
.nll.0.mir
// let _2: &'_#1r usize;
// ...
// let _6: &'_#2r usize;
...
...
@@ -46,4 +46,4 @@ fn main() {
// _7 = _2;
// ...
// _6 = _7;
// END rustc.
node12
.nll.0.mir
// END rustc.
main
.nll.0.mir
src/test/mir-opt/simplify_if.rs
浏览文件 @
7a6832de
...
...
@@ -15,13 +15,13 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.SimplifyBranches-initial.before.mir
// START rustc.
main
.SimplifyBranches-initial.before.mir
// bb0: {
// switchInt(const false) -> [0u8: bb2, otherwise: bb1];
// }
// END rustc.
node4
.SimplifyBranches-initial.before.mir
// START rustc.
node4
.SimplifyBranches-initial.after.mir
// END rustc.
main
.SimplifyBranches-initial.before.mir
// START rustc.
main
.SimplifyBranches-initial.after.mir
// bb0: {
// goto -> bb2;
// }
// END rustc.
node4
.SimplifyBranches-initial.after.mir
// END rustc.
main
.SimplifyBranches-initial.after.mir
src/test/mir-opt/storage_live_dead_in_statics.rs
浏览文件 @
7a6832de
...
...
@@ -44,7 +44,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.mir_map.0.mir
// START rustc.
XXX
.mir_map.0.mir
// let mut _0: &'static Foo;
// let mut _1: &'static Foo;
// let mut _2: Foo;
...
...
@@ -197,4 +197,4 @@ fn main() {
// return;
// }
//}
// END rustc.
node4
.mir_map.0.mir
// END rustc.
XXX
.mir_map.0.mir
src/test/mir-opt/storage_ranges.rs
浏览文件 @
7a6832de
...
...
@@ -19,7 +19,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.TypeckMir.before.mir
// START rustc.
main
.TypeckMir.before.mir
// bb0: {
// StorageLive(_1);
// _1 = const 0i32;
...
...
@@ -40,4 +40,4 @@ fn main() {
// StorageDead(_1);
// return;
// }
// END rustc.
node4
.TypeckMir.before.mir
// END rustc.
main
.TypeckMir.before.mir
src/test/mir-opt/validate_1.rs
浏览文件 @
7a6832de
...
...
@@ -28,14 +28,14 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node12
.EraseRegions.after.mir
// START rustc.
{{impl}}.foo
.EraseRegions.after.mir
// bb0: {
// Validate(Acquire, [_1: &ReFree(DefId { krate: CrateNum(0), index: DefIndex(0:5) => validate_1[317d]::{{impl}}[0]::foo[0] }, BrAnon(0)) Test, _2: &ReFree(DefId { krate: CrateNum(0), index: DefIndex(0:5) => validate_1[317d]::{{impl}}[0]::foo[0] }, BrAnon(1)) mut i32]);
// ...
// return;
// }
// END rustc.
node12
.EraseRegions.after.mir
// START rustc.
node23
.EraseRegions.after.mir
// END rustc.
{{impl}}.foo
.EraseRegions.after.mir
// START rustc.
main
.EraseRegions.after.mir
// fn main() -> () {
// ...
// bb0: {
...
...
@@ -57,8 +57,8 @@ fn main() {
// return;
// }
// }
// END rustc.
node23
.EraseRegions.after.mir
// START rustc.
node50
.EraseRegions.after.mir
// END rustc.
main
.EraseRegions.after.mir
// START rustc.
main.{{closure}}
.EraseRegions.after.mir
// fn main::{{closure}}(_1: &ReErased [closure@NodeId(50)], _2: &ReErased mut i32) -> i32 {
// ...
// bb0: {
...
...
@@ -76,4 +76,4 @@ fn main() {
// return;
// }
// }
// END rustc.
node50
.EraseRegions.after.mir
// END rustc.
main.{{closure}}
.EraseRegions.after.mir
src/test/mir-opt/validate_2.rs
浏览文件 @
7a6832de
...
...
@@ -16,7 +16,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node4
.EraseRegions.after.mir
// START rustc.
main
.EraseRegions.after.mir
// fn main() -> () {
// ...
// bb1: {
...
...
@@ -32,4 +32,4 @@ fn main() {
// }
// ...
// }
// END rustc.
node4
.EraseRegions.after.mir
// END rustc.
main
.EraseRegions.after.mir
src/test/mir-opt/validate_3.rs
浏览文件 @
7a6832de
...
...
@@ -28,7 +28,7 @@ fn _unused2(x: *const i32) -> i32 { unsafe { *x }}
}
// END RUST SOURCE
// START rustc.
node16
.EraseRegions.after.mir
// START rustc.
main
.EraseRegions.after.mir
// fn main() -> () {
// ...
// let mut _5: &ReErased i32;
...
...
@@ -62,4 +62,4 @@ fn _unused2(x: *const i32) -> i32 { unsafe { *x }}
// return;
// }
// }
// END rustc.
node16
.EraseRegions.after.mir
// END rustc.
main
.EraseRegions.after.mir
src/test/mir-opt/validate_4.rs
浏览文件 @
7a6832de
...
...
@@ -36,7 +36,7 @@ fn main() {
// contain name of the source file, so we cannot test for it.
// END RUST SOURCE
// START rustc.
node4
.EraseRegions.after.mir
// START rustc.
write_42
.EraseRegions.after.mir
// fn write_42(_1: *mut i32) -> bool {
// ...
// bb0: {
...
...
@@ -46,8 +46,8 @@ fn main() {
// return;
// }
// }
// END rustc.
node4
.EraseRegions.after.mir
// START rustc.
node22
.EraseRegions.after.mir
// END rustc.
write_42
.EraseRegions.after.mir
// START rustc.
write_42.{{closure}}
.EraseRegions.after.mir
// fn write_42::{{closure}}(_1: &ReErased [closure@NodeId(22)], _2: *mut i32) -> () {
// ...
// bb0: {
...
...
@@ -57,8 +57,8 @@ fn main() {
// return;
// }
// }
// END rustc.
node22
.EraseRegions.after.mir
// START rustc.
node31
.EraseRegions.after.mir
// END rustc.
write_42.{{closure}}
.EraseRegions.after.mir
// START rustc.
test
.EraseRegions.after.mir
// fn test(_1: &ReErased mut i32) -> () {
// ...
// bb0: {
...
...
@@ -73,8 +73,8 @@ fn main() {
// ...
// }
// }
// END rustc.
node31
.EraseRegions.after.mir
// START rustc.
node60
.EraseRegions.after.mir
// END rustc.
test
.EraseRegions.after.mir
// START rustc.
main.{{closure}}
.EraseRegions.after.mir
// fn main::{{closure}}(_1: &ReErased [closure@NodeId(60)], _2: &ReErased mut i32) -> bool {
// ...
// bb0: {
...
...
@@ -86,4 +86,4 @@ fn main() {
// }
// ...
// }
// END rustc.
node60
.EraseRegions.after.mir
// END rustc.
main.{{closure}}
.EraseRegions.after.mir
src/test/mir-opt/validate_5.rs
浏览文件 @
7a6832de
...
...
@@ -33,7 +33,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.
node17
.EraseRegions.after.mir
// START rustc.
test
.EraseRegions.after.mir
// fn test(_1: &ReErased mut i32) -> () {
// ...
// bb0: {
...
...
@@ -44,8 +44,8 @@ fn main() {
// }
// ...
// }
// END rustc.
node17
.EraseRegions.after.mir
// START rustc.
node46
.EraseRegions.after.mir
// END rustc.
test
.EraseRegions.after.mir
// START rustc.
main.{{closure}}
.EraseRegions.after.mir
// fn main::{{closure}}(_1: &ReErased [closure@NodeId(46)], _2: &ReErased mut i32) -> bool {
// ...
// bb0: {
...
...
@@ -63,4 +63,4 @@ fn main() {
// }
// ...
// }
// END rustc.
node46
.EraseRegions.after.mir
// END rustc.
main.{{closure}}
.EraseRegions.after.mir
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录