Skip to content

Commit 5afb940

Browse files
committed
Merge branch 'instance-typing' into instantiate
2 parents e22e0bb + c8b4949 commit 5afb940

File tree

514 files changed

+14939
-6469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

514 files changed

+14939
-6469
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ flambda_backend.opam @mshinwell @lthls
66

77
build_ocaml_compiler.sexp @poechsel
88

9-
chamelon/ @Ekdohibs
10-
119
external/memtrace/ @stedolan

backend/asmgen.ml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ let compile_fundecl ~ppf_dump ~funcnames fd_cmm =
279279
++ pass_dump_if ppf_dump dump_selection "After instruction selection"
280280
++ Profile.record ~accumulate:true "save_mach_as_cfg"
281281
(save_mach_as_cfg Compiler_pass.Selection)
282-
++ Profile.record ~accumulate:true "polling"
283-
(Polling.instrument_fundecl ~future_funcnames:funcnames)
282+
++ Profile.record ~accumulate:true "polling"
283+
(fun fd ->
284+
match register_allocator with
285+
| IRC | LS | GI -> fd
286+
| Upstream ->
287+
Polling.instrument_fundecl ~future_funcnames:funcnames fd)
284288
++ Compiler_hooks.execute_and_pipe Compiler_hooks.Mach_polling
285289
++ (fun fd ->
286290
match !Flambda_backend_flags.cfg_zero_alloc_checker with
@@ -320,6 +324,7 @@ let compile_fundecl ~ppf_dump ~funcnames fd_cmm =
320324
let cfg =
321325
fd
322326
++ Profile.record ~accumulate:true "cfgize" cfgize
327+
++ Profile.record ~accumulate:true "cfg_polling" (Cfg_polling.instrument_fundecl ~future_funcnames:funcnames)
323328
++ (fun cfg_with_layout ->
324329
match !Flambda_backend_flags.cfg_zero_alloc_checker with
325330
| false -> cfg_with_layout

backend/cfg/cfg.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ type t =
8383
entry_label : Label.t;
8484
fun_contains_calls : bool;
8585
(* CR-someday gyorsh: compute locally. *)
86-
fun_num_stack_slots : int array
86+
fun_num_stack_slots : int array;
87+
fun_poll : Lambda.poll_attribute
8788
}
8889

8990
let create ~fun_name ~fun_args ~fun_codegen_options ~fun_dbg ~fun_contains_calls
90-
~fun_num_stack_slots =
91+
~fun_num_stack_slots ~fun_poll =
9192
{ fun_name;
9293
fun_args;
9394
fun_codegen_options;
@@ -97,7 +98,8 @@ let create ~fun_name ~fun_args ~fun_codegen_options ~fun_dbg ~fun_contains_calls
9798
currently rely on it to be initialized as above. *)
9899
blocks = Label.Tbl.create 31;
99100
fun_contains_calls;
100-
fun_num_stack_slots
101+
fun_num_stack_slots;
102+
fun_poll
101103
}
102104

103105
let mem_block t label = Label.Tbl.mem t.blocks label

backend/cfg/cfg.mli

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type codegen_option =
8787
val of_cmm_codegen_option : Cmm.codegen_option list -> codegen_option list
8888

8989
(** Control Flow Graph of a function. *)
90-
type t = private
90+
type t =
9191
{ blocks : basic_block Label.Tbl.t; (** Map from labels to blocks *)
9292
fun_name : string; (** Function name, used for printing messages *)
9393
fun_args : Reg.t array;
@@ -99,9 +99,11 @@ type t = private
9999
fun_dbg : Debuginfo.t; (** Dwarf debug info for function entry. *)
100100
entry_label : Label.t;
101101
(** This label must be the first in all layouts of this cfg. *)
102-
fun_contains_calls : bool; (** Precomputed at selection time. *)
103-
fun_num_stack_slots : int array
102+
fun_contains_calls : bool;
103+
(** Precomputed during selection and poll insertion. *)
104+
fun_num_stack_slots : int array;
104105
(** Precomputed at register allocation time *)
106+
fun_poll : Lambda.poll_attribute (* Whether to insert polling points. *)
105107
}
106108

107109
val create :
@@ -111,6 +113,7 @@ val create :
111113
fun_dbg:Debuginfo.t ->
112114
fun_contains_calls:bool ->
113115
fun_num_stack_slots:int array ->
116+
fun_poll:Lambda.poll_attribute ->
114117
t
115118

116119
val fun_name : t -> string

0 commit comments

Comments
 (0)