Skip to content

Rule-based rewriting of expressions #3882

@xusheng6

Description

@xusheng6

We should add an optimization pass to rewrite IL expressions according to a given set of rules, doing pattern matching and replacement of IL instructions to allow a sort of pseudo patching support. For example, #3881. It will also make #2043 easier, which is not very convenient to deal with right now.

Ideally, we should also allow the users to plug their own rules into the system.

This idea might has been proposed earlier and discussed internally before. I am creating this issue so we have a better point to refer to when we discuss it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreIssue needs changes to the coreEffort: MediumIssue should take < 1 monthImpact: MediumIssue is impactful with a bad, or no, workaround

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions