@@ -8,9 +8,9 @@ function sciml_dae_split_u!(compact, line, settings, arg, numstates)
88 nassgn = numstates[AssignedDiff]
99 ntotalstates = numstates[AssignedDiff] + numstates[UnassignedDiff] + numstates[Algebraic]
1010
11- u_mm = @insert_node_here compact line settings view (arg, 1 : nassgn):: VectorViewType
12- u_unassgn = @insert_node_here compact line settings view (arg, (nassgn+ 1 ): (nassgn+ numstates[UnassignedDiff])):: VectorViewType
13- alg = @insert_node_here compact line settings view (arg, (nassgn+ numstates[UnassignedDiff]+ 1 ): ntotalstates):: VectorViewType
11+ u_mm = @insert_instruction compact line settings view (arg, 1 : nassgn):: VectorViewType
12+ u_unassgn = @insert_instruction compact line settings view (arg, (nassgn+ 1 ): (nassgn+ numstates[UnassignedDiff])):: VectorViewType
13+ alg = @insert_instruction compact line settings view (arg, (nassgn+ numstates[UnassignedDiff]+ 1 ): ntotalstates):: VectorViewType
1414
1515 return (u_mm, u_unassgn, alg)
1616end
@@ -25,8 +25,8 @@ function sciml_dae_split_du!(compact, line, settings, arg, numstates)
2525 nassgn = numstates[AssignedDiff]
2626 ntotalstates = numstates[AssignedDiff] + numstates[UnassignedDiff] + numstates[Algebraic]
2727
28- in_du_assgn = @insert_node_here compact line settings view (arg, 1 : nassgn):: VectorViewType
29- in_du_unassgn = @insert_node_here compact line settings view (arg, (nassgn+ 1 ): (nassgn+ numstates[UnassignedDiff])):: VectorViewType
28+ in_du_assgn = @insert_instruction compact line settings view (arg, 1 : nassgn):: VectorViewType
29+ in_du_unassgn = @insert_instruction compact line settings view (arg, (nassgn+ 1 ): (nassgn+ numstates[UnassignedDiff])):: VectorViewType
3030
3131 return (in_du_assgn, in_du_unassgn)
3232end
@@ -74,7 +74,7 @@ function dae_factory_gen(state::TransformationState, ci::CodeInstance, key::Torn
7474
7575 line = result. ir[SSAValue (1 )][:line ]
7676 param_list = flatten_parameter! (Compiler. fallback_lattice, compact, ci. inferred. ir. argtypes[1 : end ], argn-> Argument (2 + argn), line, settings)
77- sicm = @insert_node_here compact line settings invoke (param_list, sicm_ci):: Tuple
77+ sicm = @insert_instruction compact line settings invoke (param_list, sicm_ci):: Tuple
7878 else
7979 sicm = ()
8080 end
@@ -110,22 +110,22 @@ function dae_factory_gen(state::TransformationState, ci::CodeInstance, key::Torn
110110
111111 # Zero the output
112112 line = ir_oc[SSAValue (1 )][:line ]
113- @insert_node_here oc_compact line settings zero! (Argument (2 )):: VectorViewType
113+ @insert_instruction oc_compact line settings zero! (Argument (2 )):: VectorViewType
114114
115115 # out_du_mm, out_eq, in_u_mm, in_u_unassgn, in_du_unassgn, in_alg
116116 nassgn = numstates[AssignedDiff]
117117 ntotalstates = numstates[AssignedDiff] + numstates[UnassignedDiff] + numstates[Algebraic]
118- out_du_mm = @insert_node_here oc_compact line settings view (Argument (2 ), 1 : nassgn):: VectorViewType
119- out_eq = @insert_node_here oc_compact line settings view (Argument (2 ), (nassgn+ 1 ): ntotalstates):: VectorViewType
118+ out_du_mm = @insert_instruction oc_compact line settings view (Argument (2 ), 1 : nassgn):: VectorViewType
119+ out_eq = @insert_instruction oc_compact line settings view (Argument (2 ), (nassgn+ 1 ): ntotalstates):: VectorViewType
120120
121121 (in_du_assgn, in_du_unassgn) = sciml_dae_split_du! (oc_compact, line, settings, Argument (3 ), numstates)
122122 (in_u_mm, in_u_unassgn, in_alg) = sciml_dae_split_u! (oc_compact, line, settings, Argument (4 ), numstates)
123123
124124 # Call DAECompiler-generated RHS with internal ABI
125- oc_sicm = @insert_node_here oc_compact line settings getfield (Argument (1 ), 1 ):: Core.OpaqueClosure
125+ oc_sicm = @insert_instruction oc_compact line settings getfield (Argument (1 ), 1 ):: Core.OpaqueClosure
126126
127127 # N.B: The ordering of arguments should match the ordering in the StateKind enum
128- @insert_node_here oc_compact line settings (:invoke )(daef_ci, oc_sicm, (), in_u_mm, in_u_unassgn, in_du_unassgn, in_alg, out_du_mm, out_eq, Argument (6 )):: Nothing
128+ @insert_instruction oc_compact line settings (:invoke )(daef_ci, oc_sicm, (), in_u_mm, in_u_unassgn, in_du_unassgn, in_alg, out_du_mm, out_eq, Argument (6 )):: Nothing
129129
130130 # TODO : We should not have to recompute this here
131131 var_eq_matching = matching_for_key (state, key)
@@ -146,15 +146,15 @@ function dae_factory_gen(state::TransformationState, ci::CodeInstance, key::Torn
146146 @assert kind == AssignedDiff
147147 @assert dkind in (AssignedDiff, UnassignedDiff)
148148
149- v_val = @insert_node_here oc_compact line settings getindex (dkind == AssignedDiff ? in_u_mm : in_u_unassgn, dslot):: Any
150- @insert_node_here oc_compact line settings setindex! (out_du_mm, v_val, slot):: Any
149+ v_val = @insert_instruction oc_compact line settings getindex (dkind == AssignedDiff ? in_u_mm : in_u_unassgn, dslot):: Any
150+ @insert_instruction oc_compact line settings setindex! (out_du_mm, v_val, slot):: Any
151151 end
152152
153- bc = @insert_node_here oc_compact line settings Base. Broadcast. broadcasted (- , out_du_mm, in_du_assgn):: Any
154- @insert_node_here oc_compact line settings Base. Broadcast. materialize! (out_du_mm, bc):: Nothing
153+ bc = @insert_instruction oc_compact line settings Base. Broadcast. broadcasted (- , out_du_mm, in_du_assgn):: Any
154+ @insert_instruction oc_compact line settings Base. Broadcast. materialize! (out_du_mm, bc):: Nothing
155155
156156 # Return
157- @insert_node_here oc_compact line settings (return nothing ):: Union{}
157+ @insert_instruction oc_compact line settings (return nothing ):: Union{}
158158
159159 ir_oc = Compiler. finish (oc_compact)
160160 maybe_rewrite_debuginfo! (ir_oc, settings)
@@ -171,21 +171,21 @@ function dae_factory_gen(state::TransformationState, ci::CodeInstance, key::Torn
171171 @atomic oc_ci. max_world = @atomic ci. max_world
172172 @atomic oc_ci. min_world = 1 # @atomic ci.min_world
173173
174- new_oc = @insert_node_here compact line settings (:new_opaque_closure )(argt, Union{}, Nothing, true , oc_source_method, sicm):: Core.OpaqueClosure true
174+ new_oc = @insert_instruction compact line settings (:new_opaque_closure )(argt, Union{}, Nothing, true , oc_source_method, sicm):: Core.OpaqueClosure true
175175
176176 differential_states = Bool[v in key. diff_states for v in all_states]
177177
178178 if init_key != = nothing
179179 initf = init_uncompress_gen! (compact, result, ci, init_key, key, world, settings)
180- daef = @insert_node_here compact line settings make_daefunction (new_oc, initf):: DAEFunction true
180+ daef = @insert_instruction compact line settings make_daefunction (new_oc, initf):: DAEFunction true
181181 else
182- daef = @insert_node_here compact line settings make_daefunction (new_oc):: DAEFunction true
182+ daef = @insert_instruction compact line settings make_daefunction (new_oc):: DAEFunction true
183183 end
184184
185185 # TODO : Ideally, this'd be in DAEFunction
186- daef_and_diff = @insert_node_here compact line settings tuple (daef, differential_states):: Tuple true
186+ daef_and_diff = @insert_instruction compact line settings tuple (daef, differential_states):: Tuple true
187187
188- @insert_node_here compact line settings (return daef_and_diff):: Tuple true
188+ @insert_instruction compact line settings (return daef_and_diff):: Tuple true
189189
190190 ir_factory = Compiler. finish (compact)
191191 resize! (ir_factory. cfg. blocks, 1 )
0 commit comments