Details
- Reviewers
Pierre-vh MatzeB kparzysz arsenm - Group Reviewers
Restricted Project - Commits
- rG47d3cbcf842a: [BranchFolder] Skip redundant IMPLICIT_DEFs of subregs
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is an alternative to D148438. It is based on a new test test/CodeGen/AMDGPU/resource-usage-agpr-hi16.ll that I have not committed yet.
The motivation is to avoid introducing mentions of registers like $agpr0_hi16 that were never mentioned in the original program.
llvm/lib/CodeGen/BranchFolding.cpp | ||
---|---|---|
865 | IMO it's only worth merging the logic if in the end it yields less code/more understandable code. It's just a few lines of code here so I'm fine with either solution as long as this or D148438 goes in soon. | |
866 | small nit: isn't there a way to do this more succinctly with any_of? |
llvm/lib/CodeGen/BranchFolding.cpp | ||
---|---|---|
866 | Yes using superregs(). It seems mc_superreg_iterator was intended to replace MCSuperRegIterator but it never happened. |
This is another place that should be converted to use regunits. We'd then have to go backwards from live reg units to covering registers
Wouldn't it be better to convert basic block liveins to use regunits first, so that there would be no need to go backwards?
IMO it's only worth merging the logic if in the end it yields less code/more understandable code. It's just a few lines of code here so I'm fine with either solution as long as this or D148438 goes in soon.