Make Next an Out-parameter in ARMs GetNextInstructionUsingReg

The input to Next is not used, reflect that properly.

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@28342 3ad0048d-3df7-0310-abae-a5850022a9f2
Introduce TCpuAsmOptimizer.GetNextInstructionUsingRef

It's the counterpart to GetNextInstructionUsingReg and finds the next
instruction to use the same reference. By default it stops searching
when hitting a store instructions to avoid aliasing issues.

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@28343 3ad0048d-3df7-0310-abae-a5850022a9f2
Changed ARMs StrLdr2StrMov peephole optimizer look further ahead

StrLdr2StrMov now uses GetNextInstructionUsingRef to find an instruction
which uses the same Reference. In one of our internal testcases it
speeded up a function by 15% as fpc generated a lot of spilling.

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@28344 3ad0048d-3df7-0310-abae-a5850022a9f2