From c732adf3a1718d1b3e08adb11652100cab1efad6 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 30 Sep 2009 01:35:11 +0000 Subject: [PATCH] Add "isBarrier = 1" to return instructions. Patch by Sylvere Teissier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83135 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrInfo.td | 4 ++-- lib/Target/ARM/ARMInstrThumb.td | 4 ++-- lib/Target/ARM/ARMInstrThumb2.td | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 1dcc4d61a9e..29f1a0e3b5e 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -618,7 +618,7 @@ def LEApcrelJT : AXI1<0x0, (outs GPR:$dst), // Control Flow Instructions. // -let isReturn = 1, isTerminator = 1 in +let isReturn = 1, isTerminator = 1, isBarrier = 1 in def BX_RET : AI<(outs), (ins), BrMiscFrm, IIC_Br, "bx", " lr", [(ARMretflag)]> { let Inst{7-4} = 0b0001; @@ -630,7 +630,7 @@ let isReturn = 1, isTerminator = 1 in // FIXME: $dst1 should be a def. But the extra ops must be in the end of the // operand list. // FIXME: Should pc be an implicit operand like PICADD, etc? -let isReturn = 1, isTerminator = 1, mayLoad = 1 in +let isReturn = 1, isTerminator = 1, isBarrier = 1, mayLoad = 1 in def LDM_RET : AXI4ld<(outs), (ins addrmode4:$addr, pred:$p, reglist:$dst1, variable_ops), LdStMulFrm, IIC_Br, "ldm${p}${addr:submode} $addr, $dst1", diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index 4784fae467c..7ec4bdef263 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -174,14 +174,14 @@ def tANDsp : PseudoInst<(outs tGPR:$dst), (ins tGPR:$lhs, tGPR:$rhs), // Control Flow Instructions. // -let isReturn = 1, isTerminator = 1 in { +let isReturn = 1, isTerminator = 1, isBarrier = 1 in { def tBX_RET : TI<(outs), (ins), IIC_Br, "bx lr", [(ARMretflag)]>; // Alternative return instruction used by vararg functions. def tBX_RET_vararg : TI<(outs), (ins tGPR:$target), IIC_Br, "bx $target", []>; } // FIXME: remove when we have a way to marking a MI with these properties. -let isReturn = 1, isTerminator = 1, mayLoad = 1 in +let isReturn = 1, isTerminator = 1, isBarrier = 1, mayLoad = 1 in def tPOP_RET : T1I<(outs), (ins pred:$p, reglist:$dst1, variable_ops), IIC_Br, "pop${p} $dst1", []>; diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td index 27c4ef0dbb3..9c60aaa45bc 100644 --- a/lib/Target/ARM/ARMInstrThumb2.td +++ b/lib/Target/ARM/ARMInstrThumb2.td @@ -1072,7 +1072,7 @@ let Defs = // FIXME: $dst1 should be a def. But the extra ops must be in the end of the // operand list. // FIXME: Should pc be an implicit operand like PICADD, etc? -let isReturn = 1, isTerminator = 1, mayLoad = 1 in +let isReturn = 1, isTerminator = 1, isBarrier = 1, mayLoad = 1 in def t2LDM_RET : T2XI<(outs), (ins addrmode4:$addr, pred:$p, reglist:$dst1, variable_ops), IIC_Br, "ldm${addr:submode}${p}${addr:wide} $addr, $dst1",