Skip to content

Commit

Permalink
Perform an extra pass to import a generic for a symbolic constant les…
Browse files Browse the repository at this point in the history
…s often. (#4182)

Instead of always forcing an extra pass when we need to import a generic
ID for a generic that isn't already imported, attempt to import the
rest of the instruction in the same pass. There are then three
possibilities:

- The instruction needs a retry anyway to form its constant value, and
  we avoid an extra pass.
- The instruction produces its constant value on the first pass but
  still needs a retry. In this case, the handler for that instruction
  is expected to retry itself, before building its constant value. The
  third pass in this case can't be avoided.
- The instruction succeeds on its first pass. We still need an extra
  pass; track the constant produced by resolution separately.

---------

Co-authored-by: Jon Ross-Perkins <[email protected]>
  • Loading branch information
zygoloid and jonmeow authored Aug 6, 2024
1 parent f6ff5b1 commit 1705347
Show file tree
Hide file tree
Showing 2 changed files with 234 additions and 208 deletions.
Loading

0 comments on commit 1705347

Please sign in to comment.