Frame index elimination runs backwards so we must use backwards
scavenging. Otherwise, when a scavenged register is spilled, the
scavenger will remember that the register is in use until the restore
point, but it will never reach that restore point. The result is that in
some cases it will keep scavenging different registers instead of
reusing the same one.
Details
Details
- Reviewers
arsenm - Group Reviewers
Restricted Project - Commits
- rG5aea839ab3ed: [AMDGPU] Switch to backwards scavenging in eliminateFrameIndex
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/AMDGPU/GlobalISel/call-outgoing-stack-args.ll | ||
---|---|---|
163–173 | Good example of resuing s0 instead of lots of different SGPRs. |
Good example of resuing s0 instead of lots of different SGPRs.