-
Notifications
You must be signed in to change notification settings - Fork 7
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
More trace optimisations #1552
More trace optimisations #1552
Conversation
This is clearly a copy and paste error -- though thankfully a harmless one!
These should thus be `panic`s -- we should never have anything to implement here.
I noticed (because I made a mistake!) that we weren't testing the canonicalisation cases properly. This commit looks like it changes much more than it really does: basically we add a comment to the main optimiser code which causes lots of indenting and churn without any meaningful changes. The meat of the commit is the test cases at the end.
@@ -415,6 +415,16 @@ impl Module { | |||
self.insts[usize::from(iidx)] = inst; | |||
} | |||
|
|||
/// Replace the instruction it `iidx` with an instruction that will generate `op`. In other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/it/in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 762413f.
Please squash. |
24342e2
to
4cee455
Compare
Squashed. |
Hmm, with |
Oof, it seems we are probably hitting a codegen problem with |
OK, so this is actually because we (well... the perpendicular pronoun would be more accurate) didn't consider signed/zero extension in constants in the codegen. I have a partial fix but I need to audit the whole module for other instances. That's a tomorrow job. |
@ptersilie I think this should now merge. |
This PR implements a number of new trace optimisations (most of which I realised are necessary by tracing some Lua programs with yklua), and tidies up some of the trace optimiser along the way. Each commit should be self-contained.