Separate the function clearly into:
- Checks that can be done on CI and Paired before the loop.
- The loop over all instructions between CI and Paired.
- Checks that must be done on InstsToMove after the loop.
Previously these were mostly done inside the loop in a very
confusing way.
Not related to your change, but the mention of "DS" is a left-over from the times this pass only handled ds_read/ds_write. Can you please remove it before committing (no need to resubmit)?