[llvm] r263354 - [X86] Remove many operands that represent memory stores from outs to ins. These operands are the registers and immediates that specify the memory address not the memory itself thus they are inputs.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 19:07:07 PST 2016


Oops that should have said "Move" not "Remove".

On Sat, Mar 12, 2016 at 6:56 PM, Craig Topper via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: ctopper
> Date: Sat Mar 12 20:56:31 2016
> New Revision: 263354
>
> URL: http://llvm.org/viewvc/llvm-project?rev=263354&view=rev
> Log:
> [X86] Remove many operands that represent memory stores from outs to ins.
> These operands are the registers and immediates that specify the memory
> address not the memory itself thus they are inputs.
>
> Modified:
>     llvm/trunk/lib/Target/X86/X86InstrFPStack.td
>     llvm/trunk/lib/Target/X86/X86InstrInfo.td
>     llvm/trunk/lib/Target/X86/X86InstrMMX.td
>     llvm/trunk/lib/Target/X86/X86InstrMPX.td
>     llvm/trunk/lib/Target/X86/X86InstrSystem.td
>     llvm/trunk/lib/Target/X86/X86InstrVMX.td
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrFPStack.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFPStack.td?rev=263354&r1=263353&r2=263354&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrFPStack.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrFPStack.td Sat Mar 12 20:56:31 2016
> @@ -326,7 +326,7 @@ def FCOM32m  : FPI<0xD8, MRM2m, (outs),
>  def FCOMP32m : FPI<0xD8, MRM3m, (outs), (ins f32mem:$src),
> "fcomp{s}\t$src">;
>
>  def FLDENVm  : FPI<0xD9, MRM4m, (outs), (ins f32mem:$src),
> "fldenv\t$src">;
> -def FSTENVm  : FPI<0xD9, MRM6m, (outs f32mem:$dst), (ins),
> "fnstenv\t$dst">;
> +def FSTENVm  : FPI<0xD9, MRM6m, (outs), (ins f32mem:$dst),
> "fnstenv\t$dst">;
>
>  def FICOM32m : FPI<0xDA, MRM2m, (outs), (ins i32mem:$src),
> "ficom{l}\t$src">;
>  def FICOMP32m: FPI<0xDA, MRM3m, (outs), (ins i32mem:$src),
> "ficomp{l}\t$src">;
> @@ -334,15 +334,15 @@ def FICOMP32m: FPI<0xDA, MRM3m, (outs),
>  def FCOM64m  : FPI<0xDC, MRM2m, (outs), (ins f64mem:$src),
> "fcom{l}\t$src">;
>  def FCOMP64m : FPI<0xDC, MRM3m, (outs), (ins f64mem:$src),
> "fcomp{l}\t$src">;
>
> -def FRSTORm  : FPI<0xDD, MRM4m, (outs f32mem:$dst), (ins),
> "frstor\t$dst">;
> -def FSAVEm   : FPI<0xDD, MRM6m, (outs f32mem:$dst), (ins),
> "fnsave\t$dst">;
> -def FNSTSWm  : FPI<0xDD, MRM7m, (outs i16mem:$dst), (ins),
> "fnstsw\t$dst">;
> +def FRSTORm  : FPI<0xDD, MRM4m, (outs), (ins f32mem:$dst),
> "frstor\t$dst">;
> +def FSAVEm   : FPI<0xDD, MRM6m, (outs), (ins f32mem:$dst),
> "fnsave\t$dst">;
> +def FNSTSWm  : FPI<0xDD, MRM7m, (outs), (ins i16mem:$dst),
> "fnstsw\t$dst">;
>
>  def FICOM16m : FPI<0xDE, MRM2m, (outs), (ins i16mem:$src),
> "ficom{s}\t$src">;
>  def FICOMP16m: FPI<0xDE, MRM3m, (outs), (ins i16mem:$src),
> "ficomp{s}\t$src">;
>
>  def FBLDm    : FPI<0xDF, MRM4m, (outs), (ins f80mem:$src), "fbld\t$src">;
> -def FBSTPm   : FPI<0xDF, MRM6m, (outs f80mem:$dst), (ins), "fbstp\t$dst">;
> +def FBSTPm   : FPI<0xDF, MRM6m, (outs), (ins f80mem:$dst), "fbstp\t$dst">;
>
>  // Floating point cmovs.
>  class FpIf32CMov<dag outs, dag ins, FPFormat fp, list<dag> pattern> :
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=263354&r1=263353&r2=263354&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Sat Mar 12 20:56:31 2016
> @@ -1446,30 +1446,30 @@ def MOV32ao16 : Ii16<0xA1, RawFrmMemOffs
>  }
>  let mayStore = 1 in {
>  let Uses = [AL] in
> -def MOV8o32a : Ii32<0xA2, RawFrmMemOffs, (outs offset32_8:$dst), (ins),
> +def MOV8o32a : Ii32<0xA2, RawFrmMemOffs, (outs), (ins offset32_8:$dst),
>                      "mov{b}\t{%al, $dst|$dst, al}", [], IIC_MOV_MEM>,
> AdSize32;
>  let Uses = [AX] in
> -def MOV16o32a : Ii32<0xA3, RawFrmMemOffs, (outs offset32_16:$dst), (ins),
> +def MOV16o32a : Ii32<0xA3, RawFrmMemOffs, (outs), (ins offset32_16:$dst),
>                       "mov{w}\t{%ax, $dst|$dst, ax}", [], IIC_MOV_MEM>,
>                       OpSize16, AdSize32;
>  let Uses = [EAX] in
> -def MOV32o32a : Ii32<0xA3, RawFrmMemOffs, (outs offset32_32:$dst), (ins),
> +def MOV32o32a : Ii32<0xA3, RawFrmMemOffs, (outs), (ins offset32_32:$dst),
>                       "mov{l}\t{%eax, $dst|$dst, eax}", [], IIC_MOV_MEM>,
>                       OpSize32, AdSize32;
>  let Uses = [RAX] in
> -def MOV64o32a : RIi32<0xA3, RawFrmMemOffs, (outs offset32_64:$dst), (ins),
> +def MOV64o32a : RIi32<0xA3, RawFrmMemOffs, (outs), (ins offset32_64:$dst),
>                        "mov{q}\t{%rax, $dst|$dst, rax}", [], IIC_MOV_MEM>,
>                        AdSize32;
>
>  let Uses = [AL] in
> -def MOV8o16a : Ii16<0xA2, RawFrmMemOffs, (outs offset16_8:$dst), (ins),
> +def MOV8o16a : Ii16<0xA2, RawFrmMemOffs, (outs), (ins offset16_8:$dst),
>                      "mov{b}\t{%al, $dst|$dst, al}", [], IIC_MOV_MEM>,
> AdSize16;
>  let Uses = [AX] in
> -def MOV16o16a : Ii16<0xA3, RawFrmMemOffs, (outs offset16_16:$dst), (ins),
> +def MOV16o16a : Ii16<0xA3, RawFrmMemOffs, (outs), (ins offset16_16:$dst),
>                       "mov{w}\t{%ax, $dst|$dst, ax}", [], IIC_MOV_MEM>,
>                       OpSize16, AdSize16;
>  let Uses = [EAX] in
> -def MOV32o16a : Ii16<0xA3, RawFrmMemOffs, (outs offset16_32:$dst), (ins),
> +def MOV32o16a : Ii16<0xA3, RawFrmMemOffs, (outs), (ins offset16_32:$dst),
>                       "mov{l}\t{%eax, $dst|$dst, eax}", [], IIC_MOV_MEM>,
>                       OpSize32, AdSize16;
>  }
> @@ -1995,11 +1995,11 @@ def OUTSL : I<0x6F, RawFrmSrc, (outs), (
>
>  // These uses the DF flag in the EFLAGS register to inc or dec EDI and ESI
>  let Defs = [EDI], Uses = [DX,EDI,EFLAGS] in {
> -def INSB : I<0x6C, RawFrmDst, (outs dstidx8:$dst), (ins),
> +def INSB : I<0x6C, RawFrmDst, (outs), (ins dstidx8:$dst),
>               "insb\t{%dx, $dst|$dst, dx}", [], IIC_INS>;
> -def INSW : I<0x6D, RawFrmDst, (outs dstidx16:$dst), (ins),
> +def INSW : I<0x6D, RawFrmDst, (outs), (ins dstidx16:$dst),
>               "insw\t{%dx, $dst|$dst, dx}", [], IIC_INS>,  OpSize16;
> -def INSL : I<0x6D, RawFrmDst, (outs dstidx32:$dst), (ins),
> +def INSL : I<0x6D, RawFrmDst, (outs), (ins dstidx32:$dst),
>               "ins{l|d}\t{%dx, $dst|$dst, dx}", [], IIC_INS>, OpSize32;
>  }
>  }
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrMMX.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrMMX.td?rev=263354&r1=263353&r2=263354&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrMMX.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrMMX.td Sat Mar 12 20:56:31 2016
> @@ -282,7 +282,7 @@ def MMX_MOVQ64rr_REV : MMXI<0x7F, MRMDes
>
>  let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0, mayStore
> = 1 in
>  def MMX_MOVD64from64rm : MMXRI<0x7E, MRMDestMem,
> -                               (outs i64mem:$dst), (ins VR64:$src),
> +                               (outs), (ins i64mem:$dst, VR64:$src),
>                                 "movd\t{$src, $dst|$dst, $src}",
>                                 [], IIC_MMX_MOV_REG_MM>,
> Sched<[WriteStore]>;
>
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrMPX.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrMPX.td?rev=263354&r1=263353&r2=263354&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrMPX.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrMPX.td Sat Mar 12 20:56:31 2016
> @@ -55,10 +55,10 @@ def BNDMOVRM64rm : RI<0x1A, MRMSrcMem, (
>  def BNDMOVMRrr   : I<0x1B, MRMDestReg, (outs BNDR:$dst), (ins BNDR:$src),
>                      "bndmov\t{$src, $dst|$dst, $src}", []>, PD,
>                      Requires<[HasMPX]>;
> -def BNDMOVMR32mr : I<0x1B, MRMDestMem, (outs i64mem:$dst), (ins
> BNDR:$src),
> +def BNDMOVMR32mr : I<0x1B, MRMDestMem, (outs), (ins i64mem:$dst,
> BNDR:$src),
>                      "bndmov\t{$src, $dst|$dst, $src}", []>, PD,
>                      Requires<[HasMPX, Not64BitMode]>;
> -def BNDMOVMR64mr : RI<0x1B, MRMDestMem, (outs i128mem:$dst), (ins
> BNDR:$src),
> +def BNDMOVMR64mr : RI<0x1B, MRMDestMem, (outs), (ins i128mem:$dst,
> BNDR:$src),
>                      "bndmov\t{$src, $dst|$dst, $src}", []>, PD,
>                      Requires<[HasMPX, In64BitMode]>;
>
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrSystem.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSystem.td?rev=263354&r1=263353&r2=263354&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrSystem.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrSystem.td Sat Mar 12 20:56:31 2016
> @@ -174,11 +174,11 @@ def MOV32rs : I<0x8C, MRMDestReg, (outs
>  def MOV64rs : RI<0x8C, MRMDestReg, (outs GR64:$dst), (ins
> SEGMENT_REG:$src),
>                   "mov{q}\t{$src, $dst|$dst, $src}", [], IIC_MOV_REG_SR>;
>
> -def MOV16ms : I<0x8C, MRMDestMem, (outs i16mem:$dst), (ins
> SEGMENT_REG:$src),
> +def MOV16ms : I<0x8C, MRMDestMem, (outs), (ins i16mem:$dst,
> SEGMENT_REG:$src),
>                  "mov{w}\t{$src, $dst|$dst, $src}", [], IIC_MOV_MEM_SR>,
> OpSize16;
> -def MOV32ms : I<0x8C, MRMDestMem, (outs i32mem:$dst), (ins
> SEGMENT_REG:$src),
> +def MOV32ms : I<0x8C, MRMDestMem, (outs), (ins i32mem:$dst,
> SEGMENT_REG:$src),
>                  "mov{l}\t{$src, $dst|$dst, $src}", [], IIC_MOV_MEM_SR>,
> OpSize32;
> -def MOV64ms : RI<0x8C, MRMDestMem, (outs i64mem:$dst), (ins
> SEGMENT_REG:$src),
> +def MOV64ms : RI<0x8C, MRMDestMem, (outs), (ins i64mem:$dst,
> SEGMENT_REG:$src),
>                   "mov{q}\t{$src, $dst|$dst, $src}", [], IIC_MOV_MEM_SR>;
>
>  def MOV16sr : I<0x8E, MRMSrcReg, (outs SEGMENT_REG:$dst), (ins GR16:$src),
> @@ -248,7 +248,7 @@ def STR32r : I<0x00, MRM1r, (outs GR32:$
>                 "str{l}\t$dst", [], IIC_STR>, TB, OpSize32;
>  def STR64r : RI<0x00, MRM1r, (outs GR64:$dst), (ins),
>                  "str{q}\t$dst", [], IIC_STR>, TB;
> -def STRm   : I<0x00, MRM1m, (outs i16mem:$dst), (ins),
> +def STRm   : I<0x00, MRM1m, (outs), (ins i16mem:$dst),
>                 "str{w}\t$dst", [], IIC_STR>, TB;
>
>  def LTRr : I<0x00, MRM3r, (outs), (ins GR16:$src),
> @@ -389,21 +389,21 @@ def VERWm : I<0x00, MRM5m, (outs), (ins
>  // Descriptor-table support instructions
>
>  let SchedRW = [WriteSystem] in {
> -def SGDT16m : I<0x01, MRM0m, (outs opaque48mem:$dst), (ins),
> +def SGDT16m : I<0x01, MRM0m, (outs), (ins opaque48mem:$dst),
>                "sgdt{w}\t$dst", [], IIC_SGDT>, TB, OpSize16,
> Requires<[Not64BitMode]>;
> -def SGDT32m : I<0x01, MRM0m, (outs opaque48mem:$dst), (ins),
> +def SGDT32m : I<0x01, MRM0m, (outs), (ins opaque48mem:$dst),
>                "sgdt{l}\t$dst", [], IIC_SGDT>, OpSize32, TB, Requires
> <[Not64BitMode]>;
> -def SGDT64m : I<0x01, MRM0m, (outs opaque80mem:$dst), (ins),
> +def SGDT64m : I<0x01, MRM0m, (outs), (ins opaque80mem:$dst),
>                "sgdt{q}\t$dst", [], IIC_SGDT>, TB, Requires
> <[In64BitMode]>;
> -def SIDT16m : I<0x01, MRM1m, (outs opaque48mem:$dst), (ins),
> +def SIDT16m : I<0x01, MRM1m, (outs), (ins opaque48mem:$dst),
>                "sidt{w}\t$dst", [], IIC_SIDT>, TB, OpSize16,
> Requires<[Not64BitMode]>;
> -def SIDT32m : I<0x01, MRM1m, (outs opaque48mem:$dst), (ins),
> +def SIDT32m : I<0x01, MRM1m, (outs), (ins opaque48mem:$dst),
>                "sidt{l}\t$dst", []>, OpSize32, TB, Requires
> <[Not64BitMode]>;
> -def SIDT64m : I<0x01, MRM1m, (outs opaque80mem:$dst), (ins),
> +def SIDT64m : I<0x01, MRM1m, (outs), (ins opaque80mem:$dst),
>                "sidt{q}\t$dst", []>, TB, Requires <[In64BitMode]>;
>  def SLDT16r : I<0x00, MRM0r, (outs GR16:$dst), (ins),
>                  "sldt{w}\t$dst", [], IIC_SLDT>, TB, OpSize16;
> -def SLDT16m : I<0x00, MRM0m, (outs i16mem:$dst), (ins),
> +def SLDT16m : I<0x00, MRM0m, (outs), (ins i16mem:$dst),
>                  "sldt{w}\t$dst", [], IIC_SLDT>, TB;
>  def SLDT32r : I<0x00, MRM0r, (outs GR32:$dst), (ins),
>                  "sldt{l}\t$dst", [], IIC_SLDT>, OpSize32, TB;
> @@ -412,7 +412,7 @@ def SLDT32r : I<0x00, MRM0r, (outs GR32:
>  //   extension.
>  def SLDT64r : RI<0x00, MRM0r, (outs GR64:$dst), (ins),
>                   "sldt{q}\t$dst", [], IIC_SLDT>, TB;
> -def SLDT64m : RI<0x00, MRM0m, (outs i16mem:$dst), (ins),
> +def SLDT64m : RI<0x00, MRM0m, (outs), (ins i16mem:$dst),
>                   "sldt{q}\t$dst", [], IIC_SLDT>, TB;
>
>  def LGDT16m : I<0x01, MRM2m, (outs), (ins opaque48mem:$src),
> @@ -454,7 +454,7 @@ def SMSW64r : RI<0x01, MRM4r, (outs GR64
>                   "smsw{q}\t$dst", [], IIC_SMSW>, TB;
>
>  // For memory operands, there is only a 16-bit form
> -def SMSW16m : I<0x01, MRM4m, (outs i16mem:$dst), (ins),
> +def SMSW16m : I<0x01, MRM4m, (outs), (ins i16mem:$dst),
>                  "smsw{w}\t$dst", [], IIC_SMSW>, TB;
>
>  def LMSW16r : I<0x01, MRM6r, (outs), (ins GR16:$src),
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrVMX.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrVMX.td?rev=263354&r1=263353&r2=263354&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrVMX.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrVMX.td Sat Mar 12 20:56:31 2016
> @@ -41,13 +41,13 @@ def VMLAUNCH : I<0x01, MRM_C2, (outs), (
>  def VMRESUME : I<0x01, MRM_C3, (outs), (ins), "vmresume", []>, TB;
>  def VMPTRLDm : I<0xC7, MRM6m, (outs), (ins i64mem:$vmcs),
>    "vmptrld\t$vmcs", []>, PS;
> -def VMPTRSTm : I<0xC7, MRM7m, (outs i64mem:$vmcs), (ins),
> +def VMPTRSTm : I<0xC7, MRM7m, (outs), (ins i64mem:$vmcs),
>    "vmptrst\t$vmcs", []>, TB;
> -def VMREAD64rm : I<0x78, MRMDestMem, (outs i64mem:$dst), (ins GR64:$src),
> +def VMREAD64rm : I<0x78, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src),
>    "vmread{q}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[In64BitMode]>;
>  def VMREAD64rr : I<0x78, MRMDestReg, (outs GR64:$dst), (ins GR64:$src),
>    "vmread{q}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[In64BitMode]>;
> -def VMREAD32rm : I<0x78, MRMDestMem, (outs i32mem:$dst), (ins GR32:$src),
> +def VMREAD32rm : I<0x78, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
>    "vmread{l}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[Not64BitMode]>;
>  def VMREAD32rr : I<0x78, MRMDestReg, (outs GR32:$dst), (ins GR32:$src),
>    "vmread{l}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[Not64BitMode]>;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160312/4337997a/attachment-0001.html>


More information about the llvm-commits mailing list