So that forwards is forwards and backwards is reverse. Also add a check so that we know the instructions are in the expected order. We'll need a follow-up patch to two to be able to successfully move instructions around for ARMLowOverheadLoops.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll | ||
---|---|---|
31 | I may be misunderstanding this but won't this overwrite the subtraction to r3 that is done each iteration? So I think this should be outside the loop like it was before. |
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll | ||
---|---|---|
31 | The DLS doesn't actually signal the beginning on the loop, and the mov is still in the preheader. The loop body begins with the vctp.32. |
If Sam has no further questions, this looks good to me.
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
582–587 | This code is an exact copy of the previous one, except one iterator. This can probably be refactored into one IsSafeToMove function that gets passed in this iterator. But it's a nit, up to you if it is worth doing this. |
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
582–587 | I thought the same, but each loop uses different sentinels: begin/rbegin and end/rend and I didn't see a way to handle that. |
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
582–587 | ok, fair enough |
This code is an exact copy of the previous one, except one iterator. This can probably be refactored into one IsSafeToMove function that gets passed in this iterator. But it's a nit, up to you if it is worth doing this.