This patch completely replaces the scheduling information for the SandyBridge archite...
authorGadi Haber <gadi.haber@intel.com>
Mon, 10 Jul 2017 09:53:16 +0000 (09:53 +0000)
committerGadi Haber <gadi.haber@intel.com>
Mon, 10 Jul 2017 09:53:16 +0000 (09:53 +0000)
commitf4d154c089cd8f0381d08d3a8fb6944527a499c4
tree1280d0c8383c49b594c7102026a944af6459b3d0
parent4be1388ebb09ff4d66eb9de0739a2f1c5da28b0e
This patch completely replaces the scheduling information for the SandyBridge architecture target by modifying the file X86SchedSandyBridge.td located under the X86 Target.
The SandyBridge architects have provided us with a more accurate information about each instruction latency, number of uOPs and used ports and I used it to replace the existing estimated SNB instructions scheduling and to add missing scheduling information.

Please note that the patch extensively affects the X86 MC instr scheduling for SNB.

Also note that this patch will be followed by additional patches for the remaining target architectures HSW, IVB, BDW, SKL and SKX.

The updated and extended information about each instruction includes the following details:
•static latency of the instruction
•number of uOps from which the instruction consists of
•all ports used by the instruction's' uOPs

For example, the following code dictates that instructions, ADC64mr, ADC8mr, SBB64mr, SBB8mr have a static latency of 9 cycles. Each of these instructions is decoded into 6 micro operations which use ports 4, ports 2 or 3 and port 0 and ports 0 or 1 or 5:

def SBWriteResGroup94 : SchedWriteRes<[SBPort4,SBPort23,SBPort0,SBPort015]> {
let Latency = 9;
let NumMicroOps = 6;
let ResourceCycles = [1,2,2,1];

}
def: InstRW<[SBWriteResGroup94], (instregex "ADC64mr")>;
def: InstRW<[SBWriteResGroup94], (instregex "ADC8mr")>;
def: InstRW<[SBWriteResGroup94], (instregex "SBB64mr")>;
def: InstRW<[SBWriteResGroup94], (instregex "SBB8mr")>;

Note that apart for the header, most of the X86SchedSandyBridge.td file was generated by a script.

Reviewers: zvi, chandlerc, RKSimon, m_zuckerman, craig.topper, igorb

Differential Revision:  https://reviews.llvm.org/D35019#inline-304691

llvm-svn: 307529
13 files changed:
llvm/lib/Target/X86/X86SchedSandyBridge.td
llvm/test/CodeGen/X86/avx-schedule.ll
llvm/test/CodeGen/X86/extractelement-legalization-store-ordering.ll
llvm/test/CodeGen/X86/fp128-i128.ll
llvm/test/CodeGen/X86/gather-addresses.ll
llvm/test/CodeGen/X86/recip-fastmath.ll
llvm/test/CodeGen/X86/recip-fastmath2.ll
llvm/test/CodeGen/X86/sse-schedule.ll
llvm/test/CodeGen/X86/sse2-schedule.ll
llvm/test/CodeGen/X86/sse3-schedule.ll
llvm/test/CodeGen/X86/sse41-schedule.ll
llvm/test/CodeGen/X86/sse42-schedule.ll
llvm/test/CodeGen/X86/ssse3-schedule.ll