Skip to content

Commit

Permalink
Include stack effects of uops when computing maximum stack depth
Browse files Browse the repository at this point in the history
UOPs may want to pass values on the stack. This is currently only guaranteed
to be possible if the net stack effect of the instruction is greater than
the number of values that need to be passed.

To ensure there is sufficient space on the stack for values passed between
uops, we:

1. Compute the set of stack effects for each instruction by computing the
   stack effect after each uop in the instruction.
2. Collect the set of stack effects for all instructions in a family.
3. Generate a function that computes the maximum stack effect for each
   instruction. The maximum stack effect for a generic instruction is
   the maximum of all instructions in the family.
4. Use the maximum stack effect when computing the maximum stack depth
   of a function.
  • Loading branch information
mpage committed Nov 16, 2024
1 parent 2a6b6b3 commit 00bb424
Show file tree
Hide file tree
Showing 5 changed files with 1,262 additions and 35 deletions.
Loading

0 comments on commit 00bb424

Please sign in to comment.