Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
364 | I assume this exploits the fact we have no instructions which may have more than two uses and are dpp combinable at the same time? If so it deserves a comment. |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
364 | I'm not sure what do you mean - DPP extension can only be applied to src0 operand. addUse is called in the order of defuse chain traversal: defusechain_iterator::operator++ assumes that all per instruction uses comes continuosly - so I decided to assume the same. |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
364 | Hm... This looks like a hack to me. |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
364 | It's a cornerstone for MachineRegisterInfo's use_instr_.. iterators, otherwise it wouldn't be cheap to walk. |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
539–541 | It would be much simpler to add a check here that src0 and src1 are not the same register. |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
521 | This doesn't seem right. Use could be Src2 or some other operand, couldn't it? |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
521 | I cound't find example for this, but ok, lets check this too. |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
522–525 | This looks technically OK now. I still think it would be cleaner to structure the code as: if (Use == Src0) { // do it } else if (Use == Src1 && commutable && Src0 not identical to Src1) { // commute and do it } else { // fail } But I'll leave that up to your judgement. | |
523–525 | Could use MachineOperand::isIdenticalTo ? |
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | ||
---|---|---|
522–525 | I think currently we have better debug messages. |
I assume this exploits the fact we have no instructions which may have more than two uses and are dpp combinable at the same time? If so it deserves a comment.