Closed konradweiss closed 3 weeks ago
The normal DFGPass
also adds DFG edges and the DynamicInvokeResolver
depends on this one already. The ControlFlowSensitiveDFGPass
basically makes the edges better, so it could make sense to add a soft dependency on this pass too? There's a difference between using the Annotation as @DependsOn(ControlFlowSensitiveDFGPass, false)
(default and would always register the ControlFlowSensitiveDFGPass
) and @DependsOn(DynamicInvokeResolver, true)
(wouldn't register the pass on its own but only enforces the order if the user added this pass). So, I think using the second version to annotate the DynamicInvokeResolver
would do what you want.
ah perfect, I did forget that we had that functionality already implemented somewhere.
DynamicInvokeResolver
runs in parallel withControlFlowSensitiveDFGPass
, but uses DFG edges and should IMO run either before or after (i think before). However, currently we don't have a way to specify an optional dependency, i.e. a dependency saying that the pass should run after the other, only if it was specified to run @RunAfter(ControlFlowSensitiveDFGPass::class) or a grouping of passes by semantic @RunAfter(DFG) and DFG = [DFGPass
,ControlFlowSensitiveDFGPass
].