-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[RISCV] Eliminate dead li after emitting VSETVLIs #65934
Conversation
369d068
to
45d7f86
Compare
Ping. |
Ping. |
Gentle ping. |
Ping. |
Ping. |
@preames do you have concerns with this patch? |
Oh nice, I'm running into something similar in #71657. Are all these dead ADDIs coming from the backwards local postpass? |
Yes. I believe this PR can address the issue. |
My suspicion is that these LIs only become dead because the backwards local postpass deletes a vsetvli that had an ADDI AVL. Would it be easier then to just check if they are dead in |
eddadd5
to
f38258e
Compare
f38258e
to
0671803
Compare
Ping. |
1 similar comment
Ping. |
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.
LGTM
0671803
to
608df69
Compare
As discussed in D158759,
RISCVInsertVSETVLI
introduces dead li instructions. These instructions were exceptionally rewritten by the following peephole passRISCVDeadRegisterDefinitions
.This patch tracks li instructions that set AVL operands and does DCE after emitting VSETVLIs.