-
Notifications
You must be signed in to change notification settings - Fork 8
Redundant load/store pass #2001
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
Conversation
|
Oops, I should have added the tests in 410fa9e in the original PR. Will need squashing. |
|
Do you have any benchmark results? The refactoring looks fine to me. |
|
I do: Everything else is indistinguistable (apart from |
|
Ok I've taken a look at this twice now. Let's merge this. |
|
Please squash. |
For load/store elimination, we need to know the `iidx` of the to-be committed instruction, and access to the optimiser for `equiv_iidx`ing and so on. This commit thus makes `inst_commited`: ```rust fn inst_committed(&mut self, ci: &CommitInstOpt, iidx: InstIdx, inst: &Inst); ``` where `CommitInstOpt` is vaguely similar to `PassOpt` _except_ `CommitInstOpt` is `&` (not `&mut`) and therefore doesn't allow types / instructions to be pushed. I would like to pretend that I anticipated this API would naturally fall out of the hat from cf51a9e but I did not. Happily, it does fall out of the hat!
|
Squashed. |
|
@ltratt the new tests are failing, happy holidays! I'll move my branch to use the new API after this is merged. |
|
Oops, fixed the doc string in the force push. |
|
lang tests are failing |
|
Ah, I'm being bitten by the lack of "proper" jit-pre-opt. I'll need to chew on the best solution to this. |
|
After playing for a little bit, I don't see a nice way for j2 to do While doing this, it turned out -- to my surprise! -- that we're also encountering the @Fidget-Spinner If you're OK with this, it will need squashing. |
|
Turning off opt for certain lang tests seem fine to me. Please squash. I will copy my known bits changes to the new branch after merging. |
This is more-or-less a port of jitc_yk's `heapvalues` pass, but tidied up and adjusted for j2. This does make a useful difference to several benchmarks, but its main use right now is to help me understand what different kinds of passes might need from the optimiser API.
|
Squashed. |
This PR adds a new redundant
load_storeelimination pass (2bdc42b): it's simple, and more-or-less a direct port from jitc_yk. The main reason I've done this now is to help me understand what's needed from the optimiser API: indeed, a change was necessary (675444e).@Fidget-Spinner My guess is that the known_bits pass might need the extended
inst_committedAPI too. And perhaps other bits I haven't considered yet.