Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ir iterator interproc #160

Closed
wants to merge 27 commits into from
Closed

Ir iterator interproc #160

wants to merge 27 commits into from

Conversation

ailrst
Copy link
Contributor

@ailrst ailrst commented Jan 25, 2024

(merged into staging)

Addresses #157 and #156 and #168

  • Interprocedural iterators now return the fallthrough target for indirect calls, and for directcalls, and only returns the procedure when the target has an implementation.
  • Adds fallthrough edge to blocks as an optional GoTo. This means it is now included in incomingJumps sets etc. It also means the reverse interprocedural iterator jumps to the called-procedure's return call from the aftercall goto.
  • Distinct return blocks are added
  • Defines extension methods for checking whether a cfgnode is a procedureEntry, procedureReturn, afterCall node.

The interface for checking is like this:

        b match {
          case b: GoTo if b.isAfterCall => ...
          case _                => ...
        }

@ailrst
Copy link
Contributor Author

ailrst commented Jan 31, 2024

Bug; the aftercall flag is not updated when the indirect call is resolved so the pred() / reverse iterator visits the old indirect call that is detached from the IL.
fixed

@ailrst ailrst marked this pull request as ready for review February 8, 2024 00:52
@ailrst ailrst requested a review from l-kent February 8, 2024 01:49
@ailrst ailrst force-pushed the ir-iterator-interproc branch from 285072e to 220d884 Compare February 14, 2024 01:30
@ailrst ailrst closed this Feb 16, 2024
@ailrst
Copy link
Contributor Author

ailrst commented Feb 16, 2024

This is already part of staging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant