-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
gh-104635: Expand optimization for dead store elimination #106571
Conversation
Interesting crash; this crash was not triggered at my local machine. I will take a look. -> Done |
471bae6
to
bf580d0
Compare
@carljm Please take a look :) |
|
@carljm Ready to review, I wanted the linear time complexity for the first time, but it will require more. |
30ffbf1
to
661629f
Compare
Found more edge case, I will close the PR. We may need some kinds of use-def analysis |
I'm still unconvinced that this can do anything that a superoptimizer could not do.
If you are only looking at linear sequences of instructions that are on a single line then, almost by definition, a superoptimizer will do at least as well. |
Yeah, I agree if the super-optimizer is added, I expect that most of the cases will be covered, but I just tried it because the super-optimizer infra does not exist at this moment. More digging will be more expensive than I expect, so I am not going to cover those cases at this moment. (At least, we may need to add use-def analysis, but it should be compared to adding a super-optimizer process) |
Explain
This PR is motivated by @carljm 's comment from #105040 (comment)
The limitation of #105320 is that the optimization only covers the next redundant opcode, but with this patch, the optimization can be applied to more than one instruction ahead for another write to the same location.
Benchmark
TODO (Done)