Skip to content

Diffractor integration interferes with invoke inlining #23

Description

@Keno

With this patch:

diff --git a/src/ssair/inlining.jl b/src/ssair/inlining.jl
index c7e052e..0afdfd5 100644
--- a/src/ssair/inlining.jl
+++ b/src/ssair/inlining.jl
@@ -1643,6 +1643,10 @@ function assemble_inline_todo!(ir::IRCode, state::InliningState)
             continue
         end

+        if sig.f === Core.invoke
+            @show info
+        end
+
         # handle special cased builtins
         if isa(info, OpaqueClosureCallInfo)
             handle_opaque_closure_call!(todo, ir, idx, stmt, info, flag, sig, state)

and the testcast from #19, calls to evalpoly fail to inline

info = FRuleCallInfo(Compiler.InvokeCallInfo, Compiler.ConstCallInfo)
info = FRuleCallInfo(Compiler.InvokeCallInfo, Compiler.ConstCallInfo)

We should either the order of the infos (although InvokeCallInfo does not support a nested general info), or make inlining robust to this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions