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

Can we retire the yk-no-fallthrough ykllvm hack? #969

Open
vext01 opened this issue Feb 8, 2024 · 1 comment
Open

Can we retire the yk-no-fallthrough ykllvm hack? #969

vext01 opened this issue Feb 8, 2024 · 1 comment
Assignees

Comments

@vext01
Copy link
Contributor

vext01 commented Feb 8, 2024

This hack is slowing AOT code down:

+----+-------------------------------------------------------------------------------+----------------+---------+
| #  | flags turned off (O2 passes are set)                                          | execution time | 95% CI  |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 1  | baseline (all flags are turned on)                                            | 89.9ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 2  | —yk-no-fallthrough                                                            | 76.1ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 3  | —yk-block-disambiguate                                                        | 78.7ms         | 0.00189 |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 4  | —yk-patch-control-point                                                       | 84.4ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 5  | —yk-insert-stackmaps                                                          | 85.8ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 6  | —yk-split-blocks-after-calls                                                  | 82ms           | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 7  | —yk-no-fallthrough + —yk-block-disambiguate                                   | 68.4ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 8  | —yk-no-fallthrough + —yk-block-disambiguate + —yk-patch-control-point         | 63.9ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 9  | —yk-no-fallthrough + —yk-block-disambiguate + —yk-insert-stackmaps            | 58.4ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 10 | —yk-no-fallthrough + —yk-block-disambiguate + —yk-split-blocks-after-calls    | 66.8ms         | 0.00189 |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 11 | —yk-no-fallthrough + —yk-block-disambiguate + —yk-patch-control-point +       |                |         |
|    | —yk-insert-stackmaps                                                          | 55.1ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 12 | —yk-no-fallthrough + —yk-block-disambiguate + —yk-patch-control-point +       |                |         |
|    | —yk-split-blocks-after-calls                                                  | 64.2ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 13 | —yk-no-fallthrough + —yk-block-disambiguate + —yk-insert-stackmaps +          |                |         |
|    | —yk-split-blocks-after-calls                                                  | 58.2ms         | 0.002   |
+----+-------------------------------------------------------------------------------+----------------+---------+
| 14 | —yk-no-fallthrough + —yk-block-disambiguate + —yk-patch-control-point +       |                |         |
|    | —yk-insert-stackmaps + —yk-split-blocks-after-calls                           | 54.5ms         | 0.003   |
+----+-------------------------------------------------------------------------------+----------------+

(Data collected by @nmdis1999)

The pass also seems to compound with some of our other passes making even worse AOT performance.

As far as I can see, this hack stops consecutive blocks from falling through (by keeping jump terminators around). This seems to be because PT would see fallthrough as one large block instead of two (or small) smaller blocks and that might break the mapper.

Questions:

  • Does it break the mapper though?
  • If it does, why should it? Blockmap queries have the ability to return more than one block. Combined with the corr_bbs stuff, in my head this shouldn't be an issue...
@vext01 vext01 self-assigned this Feb 8, 2024
@ltratt ltratt assigned nmdis1999 and unassigned vext01 Mar 17, 2024
@ltratt
Copy link
Contributor

ltratt commented Apr 17, 2024

@nmdis1999 Has there been any movement on this?

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

No branches or pull requests

3 participants