Skip to content

Basic block identification #27

Description

@emesare

One use case not covered by the current spec is the ability to match on a given basic block (or series of basic blocks). While current matching tools are meant to locate at the function level, there is an interesting series of problems one might be able to solve if given the ability to identify basic blocks, seperate from a function.

Some specific examples:

  • Identification of inlined functions (see: 1)
  • Matching constraints on a basic block level
  • Function similarity (i.e. non-identical function can be compared)

For this to be possible there is two specific changes need to the spec:

  1. We must be able to store a list of ordered basic blocks on a function.
  2. We must be able to store a trie of basic blocks, then end node being a ComputedBasicBlock (name is not final).

The ComputeBasicBlock is analogous to the Function table that already exists. It would represent a single analysis unit that stores all the information one would want to query when a series of basic blocks match.

What is some information we could store?

  • Storing the function its attached to might be useful?
  • Labels, comments, etc...
  • Variable definitions (name and type)
  • What else?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions