[LLVMdev] MachineInstr::isSafeToMove()

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Nov 6 21:48:48 PST 2013


On Nov 6, 2013, at 10:21 AM, Jonas Paulsson <jonas.paulsson at ericsson.com> wrote:

> Hi,
> 
> I have a question regarding this method, as i have discovered a case where it seems very far from 'strict'.
> 
> I had two MI's, A and B, where A is !isSafeToMove():
> 
> A
> B
> 
> TwoAddress pass changes the order to
> 
> B
> A
> 
> , as it reschedules the LastKill MI (B).
> 
> Is this a bug in TwoAdress, or is it the case that isSafeToMove() is weaker than isSchedulingBoundary() so that these indirect violations are expected and accepted in TwoAddress and elsewhere?

The latter. The 2-addr pass is free to move B.

/jakob





More information about the llvm-dev mailing list