From: Quentin Colombet Date: Wed, 12 Mar 2014 17:33:42 +0000 (+0000) Subject: [X86] Set the scheduling resources of some of the FPStack instructions. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a6b6d52299ad2bfe34aa4949e64f964bc9c1abc9;p=oota-llvm.git [X86] Set the scheduling resources of some of the FPStack instructions. This is related to . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203682 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrFPStack.td b/lib/Target/X86/X86InstrFPStack.td index 1ff818c5c38..4ad7b7e32a0 100644 --- a/lib/Target/X86/X86InstrFPStack.td +++ b/lib/Target/X86/X86InstrFPStack.td @@ -206,17 +206,26 @@ def _FI32m : FPI<0xDA, fp, (outs), (ins i32mem:$src), } let Defs = [FPSW] in { +// FPBinary_rr just defines pseudo-instructions, no need to set a scheduling +// resources. defm ADD : FPBinary_rr; defm SUB : FPBinary_rr; defm MUL : FPBinary_rr; defm DIV : FPBinary_rr; +// Sets the scheduling resources for the actual NAME#_Fm defintions. +let SchedRW = [WriteFAddLd] in { defm ADD : FPBinary; defm SUB : FPBinary; defm SUBR: FPBinary; +} +let SchedRW = [WriteFMulLd] in { defm MUL : FPBinary; +} +let SchedRW = [WriteFDivLd] in { defm DIV : FPBinary; defm DIVR: FPBinary; } +} class FPST0rInst : FPI<0xD8, fp, (outs), (ins RST:$op), asm>; @@ -228,6 +237,7 @@ class FPrST0PInst // NOTE: GAS and apparently all other AT&T style assemblers have a broken notion // of some of the 'reverse' forms of the fsub and fdiv instructions. As such, // we have to put some 'r's in and take them out of weird places. +let SchedRW = [WriteFAdd] in { def ADD_FST0r : FPST0rInst ; def ADD_FrST0 : FPrST0Inst ; def ADD_FPrST0 : FPrST0PInst; @@ -237,15 +247,20 @@ def SUB_FPrST0 : FPrST0PInst; def SUB_FST0r : FPST0rInst ; def SUBR_FrST0 : FPrST0Inst ; def SUBR_FPrST0 : FPrST0PInst; +} // SchedRW +let SchedRW = [WriteFMul] in { def MUL_FST0r : FPST0rInst ; def MUL_FrST0 : FPrST0Inst ; def MUL_FPrST0 : FPrST0PInst; +} // SchedRW +let SchedRW = [WriteFDiv] in { def DIVR_FST0r : FPST0rInst ; def DIV_FrST0 : FPrST0Inst ; def DIV_FPrST0 : FPrST0PInst; def DIV_FST0r : FPST0rInst ; def DIVR_FrST0 : FPrST0Inst ; def DIVR_FPrST0 : FPrST0PInst; +} // SchedRW def COM_FST0r : FPST0rInst ; def COMP_FST0r : FPST0rInst ; @@ -264,7 +279,9 @@ def _F : FPI<0xD9, fp, (outs), (ins), asmstring>; let Defs = [FPSW] in { defm CHS : FPUnary; defm ABS : FPUnary; +let SchedRW = [WriteFSqrt] in { defm SQRT: FPUnary; +} defm SIN : FPUnary; defm COS : FPUnary;