-
Notifications
You must be signed in to change notification settings - Fork 14
Devirtualization of CallIndirect -> Call #1052
Copy link
Copy link
Open
Description
Useful for both BRAT and guppy.
We already have InlineCall rewrite (all Calls have a static known target). Moreover, dataflow analysis is already capable of identifying when the called-function input to CallIndirect has a single/known target. (For example, when the input of the CallIndirect is a LoadFunction, but also other cases.) So, extend constant folding that, when it sees the latter, converts the CallIndirect to a Call.
See #978. For BRAT compilation, we'd like to be able to inline static functions, so an indirect_call of a static graph coming from a LoadFunction node becomes an instantiation of that graph. We can then get further by constant folding the whole hugr.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels