Skip to content

Commit 044bcad

Browse files
committed
flambda-backend: Trivial promotions
1 parent 17921ac commit 044bcad

9 files changed

+883
-868
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "poll_attr_both.ml", line 1:
22
Error: Function with poll-error attribute contains polling points:
3-
allocation at File "poll_attr_both.ml", line 16, characters 29-37
4-
function call at File "poll_attr_both.ml", line 17, characters 13-16
3+
allocation at File "poll_attr_both.ml", line 17, characters 29-37
4+
function call at File "poll_attr_both.ml", line 18, characters 13-16
55
(plus compiler-inserted polling point(s) in prologue and/or loop back edges)
66

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
File "poll_attr_prologue.ml", line 1:
22
Error: Function with poll-error attribute contains polling points:
3-
function call at File "poll_attr_prologue.ml", line 16, characters 15-38
3+
function call at File "poll_attr_prologue.ml", line 17, characters 15-38
44
(plus compiler-inserted polling point(s) in prologue and/or loop back edges)
55

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "poll_attr_user.ml", line 1:
22
Error: Function with poll-error attribute contains polling points:
3-
allocation at File "poll_attr_user.ml", line 16, characters 29-37
4-
function call at File "poll_attr_user.ml", line 17, characters 13-16
5-
allocation at File "poll_attr_user.ml", line 19, characters 34-42
3+
allocation at File "poll_attr_user.ml", line 17, characters 29-37
4+
function call at File "poll_attr_user.ml", line 18, characters 13-16
5+
allocation at File "poll_attr_user.ml", line 20, characters 34-42
66

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Failure("exn")
2-
Raised at Stdlib.failwith in file "stdlib.ml", line 34, characters 17-33
2+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
3+
Called from Backtrace_c_exn.raise_exn in file "backtrace_c_exn.ml", line 14, characters 19-33
34
Called from Backtrace_c_exn in file "backtrace_c_exn.ml", line 20, characters 4-20
45
Called from Backtrace_c_exn in file "backtrace_c_exn.ml", line 20, characters 4-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
Raised by primitive operation at Backtrace_dynlink_plugin in file "backtrace_dynlink_plugin.ml", line 6, characters 13-38
2-
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.ml", line 89, characters 12-29
3-
Called from Stdlib__List.iter in file "list.ml" (inlined), line 112, characters 12-15
4-
Called from Dynlink.Native.run in file "otherlibs/dynlink/native/dynlink.ml", line 88, characters 4-273
5-
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 372, characters 13-56
6-
Called from Stdlib__List.iter in file "list.ml" (inlined), line 112, characters 12-15
7-
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 359, characters 8-392
8-
Called from Dynlink_common.Make.loadfile in file "otherlibs/dynlink/dynlink_common.ml" (inlined), line 374, characters 26-45
2+
Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 292, characters 8-25
3+
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/dynlink.ml" (inlined), line 312, characters 25-58
4+
Called from Stdlib__List.iter in file "list.ml" (inlined), line 116, characters 12-15
5+
Called from Dynlink.Native.run in file "otherlibs/dynlink/dynlink.ml", line 312, characters 4-107
6+
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 367, characters 13-72
7+
Called from Stdlib__List.iter in file "list.ml" (inlined), line 116, characters 12-15
8+
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 363, characters 8-408
9+
Called from Dynlink_common.Make.loadfile in file "otherlibs/dynlink/dynlink_common.ml" (inlined), line 378, characters 26-45
10+
Called from Dynlink.loadfile in file "otherlibs/dynlink/dynlink.ml" (inlined), line 363, characters 20-35
911
Called from Backtrace_dynlink in file "backtrace_dynlink.ml", line 39, characters 4-52
1012
execution of module initializers in the shared library failed: Failure("SUCCESS")
11-
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
13+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
1214
Called from Backtrace_dynlink_plugin in file "backtrace_dynlink_plugin.ml", line 3, characters 4-22
1315
Re-raised at Backtrace_dynlink_plugin in file "backtrace_dynlink_plugin.ml", line 8, characters 5-12
14-
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.ml", line 89, characters 12-29
15-
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.ml", line 89, characters 12-29
16-
Re-raised at Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.ml", line 91, characters 10-149
17-
Called from Stdlib__List.iter in file "list.ml" (inlined), line 112, characters 12-15
18-
Called from Dynlink.Native.run in file "otherlibs/dynlink/native/dynlink.ml", line 88, characters 4-273
19-
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 372, characters 13-56
20-
Called from Stdlib__List.iter in file "list.ml" (inlined), line 112, characters 12-15
21-
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 359, characters 8-392
22-
Re-raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 372, characters 8-17
23-
Called from Dynlink_common.Make.loadfile in file "otherlibs/dynlink/dynlink_common.ml" (inlined), line 374, characters 26-45
16+
Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 292, characters 8-25
17+
Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 292, characters 8-25
18+
Re-raised at Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 304, characters 6-137
19+
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/dynlink.ml" (inlined), line 312, characters 25-58
20+
Called from Stdlib__List.iter in file "list.ml" (inlined), line 116, characters 12-15
21+
Called from Dynlink.Native.run in file "otherlibs/dynlink/dynlink.ml", line 312, characters 4-107
22+
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 367, characters 13-72
23+
Called from Stdlib__List.iter in file "list.ml" (inlined), line 116, characters 12-15
24+
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 363, characters 8-408
25+
Re-raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 376, characters 8-17
26+
Called from Dynlink_common.Make.loadfile in file "otherlibs/dynlink/dynlink_common.ml" (inlined), line 378, characters 26-45
27+
Called from Dynlink.loadfile in file "otherlibs/dynlink/dynlink.ml" (inlined), line 363, characters 20-35
2428
Called from Backtrace_dynlink in file "backtrace_dynlink.ml", line 39, characters 4-52
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
Thread 2 killed on uncaught exception Failure("0")
2-
Raised at Stdlib.failwith in file "stdlib.ml", line 34, characters 17-33
2+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
3+
Raised by primitive operation at Backtrace_systhreads.throw_exn in file "backtrace_systhreads.ml", line 10, characters 20-32
34
Called from Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 14, characters 6-37
45
Re-raised at Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 18, characters 5-14
56
Called from Thread.create.(fun) in file "thread.ml", line 51, characters 8-14
67
Thread 3 killed on uncaught exception Failure("1")
7-
Raised at Stdlib.failwith in file "stdlib.ml", line 34, characters 17-33
8+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
9+
Raised by primitive operation at Backtrace_systhreads.throw_exn in file "backtrace_systhreads.ml", line 10, characters 20-32
810
Called from Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 14, characters 6-37
911
Re-raised at Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 18, characters 5-14
1012
Called from Thread.create.(fun) in file "thread.ml", line 51, characters 8-14
1113
Thread 4 killed on uncaught exception Failure("2")
12-
Raised at Stdlib.failwith in file "stdlib.ml", line 34, characters 17-33
14+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
15+
Raised by primitive operation at Backtrace_systhreads.throw_exn in file "backtrace_systhreads.ml", line 10, characters 20-32
1316
Called from Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 14, characters 6-37
1417
Re-raised at Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 18, characters 5-14
1518
Called from Thread.create.(fun) in file "thread.ml", line 51, characters 8-14
1619
Thread 5 killed on uncaught exception Failure("3")
17-
Raised at Stdlib.failwith in file "stdlib.ml", line 34, characters 17-33
20+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
21+
Raised by primitive operation at Backtrace_systhreads.throw_exn in file "backtrace_systhreads.ml", line 10, characters 20-32
1822
Called from Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 14, characters 6-37
1923
Re-raised at Backtrace_systhreads.thread_func in file "backtrace_systhreads.ml", line 18, characters 5-14
2024
Called from Thread.create.(fun) in file "thread.ml", line 51, characters 8-14
2125
Thread 1 killed on uncaught exception Failure("backtrace")
22-
Raised at Stdlib.failwith in file "stdlib.ml", line 34, characters 17-33
26+
Raised at Stdlib.failwith in file "stdlib.ml" (inlined), line 34, characters 17-33
27+
Raised by primitive operation at Backtrace_systhreads.throw_exn in file "backtrace_systhreads.ml", line 10, characters 20-32
2328
Called from Backtrace_systhreads.thread_backtrace in file "backtrace_systhreads.ml", line 22, characters 6-27
2429
Re-raised at Backtrace_systhreads.thread_backtrace in file "backtrace_systhreads.ml", line 26, characters 5-14
2530
Called from Thread.create.(fun) in file "thread.ml", line 51, characters 8-14
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
Uncaught exception Not_found
22
Raised at Lazy.l1 in file "lazy.ml", line 3, characters 28-45
3-
Called from CamlinternalLazy.do_force_block in file "camlinternalLazy.ml", line 49, characters 17-27
4-
Re-raised at CamlinternalLazy.do_force_block in file "camlinternalLazy.ml", line 56, characters 4-11
3+
Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 125, characters 17-27
4+
Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 130, characters 4-11
55
Called from Lazy.test1 in file "lazy.ml", line 6, characters 11-24
66
Called from Lazy.run in file "lazy.ml", line 15, characters 4-11
77
Uncaught exception Not_found
8-
Raised at Lazy.l2 in file "lazy.ml", line 8, characters 28-45
9-
Called from CamlinternalLazy.do_force_block in file "camlinternalLazy.ml", line 49, characters 17-27
10-
Re-raised at CamlinternalLazy.do_force_block in file "camlinternalLazy.ml", line 56, characters 4-11
8+
Raised at Lazy.l1 in file "lazy.ml", line 3, characters 28-45
9+
Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 125, characters 17-27
10+
Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 130, characters 4-11
11+
Called from Lazy.test1 in file "lazy.ml", line 6, characters 11-24
12+
Called from Lazy.run in file "lazy.ml", line 15, characters 4-11
13+
Re-raised at Lazy.l2 in file "lazy.ml", line 8, characters 28-45
14+
Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 125, characters 17-27
15+
Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 130, characters 4-11
1116
Called from Lazy.test2 in file "lazy.ml", line 11, characters 6-15
1217
Called from Lazy.run in file "lazy.ml", line 15, characters 4-11

testsuite/tests/basic-modules/anonymous.ocamlopt.flambda.reference

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
(apply (field_imm 0 (global CamlinternalMod!))
88
[0: "anonymous.ml" 25 6] [0: [0]])
99
B =
10-
(apply (field 0 (global CamlinternalMod!)) [0: "anonymous.ml" 35 6]
11-
[0: [0]]))
10+
(apply (field_imm 0 (global CamlinternalMod!))
11+
[0: "anonymous.ml" 35 6] [0: [0]]))
1212
(seq
1313
(ignore
1414
(let (x =[(consts ()) (non_consts ([0: [int], [int]]))] [0: 4 2])
1515
(makeblock 0 x)))
16-
(apply (field 1 (global CamlinternalMod!)) [0: [0]] A A)
17-
(apply (field 1 (global CamlinternalMod!)) [0: [0]] B
16+
(apply (field_imm 1 (global CamlinternalMod!)) [0: [0]] A A)
17+
(apply (field_imm 1 (global CamlinternalMod!)) [0: [0]] B
1818
(let (x =[(consts ()) (non_consts ([0: *, *]))] [0: "foo" "bar"])
1919
(makeblock 0)))
2020
(let (f = (function {nlocal = 0} param : int 0) s = (makemutable 0 ""))

0 commit comments

Comments
 (0)