From: Evandro Menezes Date: Fri, 4 Jan 2019 21:02:25 +0000 (+0000) Subject: [AArch64] Adjust the cost model for Exynos M3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ffa038b3ef4448af8bf31f6c50281779939c774;p=llvm [AArch64] Adjust the cost model for Exynos M3 Improve the modeling of ASIMD loads and stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350434 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64SchedExynosM3.td b/lib/Target/AArch64/AArch64SchedExynosM3.td index 6ffaf0f4a31..288a202c1df 100644 --- a/lib/Target/AArch64/AArch64SchedExynosM3.td +++ b/lib/Target/AArch64/AArch64SchedExynosM3.td @@ -108,6 +108,8 @@ def M3UnitNSHF : ProcResGroup<[M3UnitNSHF0, def M3WriteZ0 : SchedWriteRes<[]> { let Latency = 0; let NumMicroOps = 1; } +def M3WriteZ1 : SchedWriteRes<[]> { let Latency = 1; + let NumMicroOps = 0; } def M3WriteA1 : SchedWriteRes<[M3UnitALU]> { let Latency = 1; } def M3WriteAA : SchedWriteRes<[M3UnitALU]> { let Latency = 2; @@ -179,16 +181,16 @@ def M3ReadAdrBase : SchedReadVariant<[SchedVar; -def : WriteRes { let Latency = 1; } +def : SchedAlias; // Arithmetic and logical integer instructions. -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 1; } +def : SchedAlias; +def : SchedAlias; +def : SchedAlias; +def : SchedAlias; // Move instructions. -def : WriteRes { let Latency = 1; } +def : SchedAlias; // Divide and multiply instructions. def : WriteRes { let Latency = 4; def : SchedAlias; // Addressing modes. -def : WriteRes { let Latency = 1; - let NumMicroOps = 0; } +def : SchedAlias; def : SchedAlias; // Load instructions. @@ -669,108 +670,108 @@ def : InstRW<[M3WriteNSHF1], (instregex "^(TRN|UZP|ZIP)[12]v")>; // ASIMD load instructions. def : InstRW<[M3WriteL5], (instregex "LD1Onev(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteL5, - WriteAdr], (instregex "LD1Onev(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD1Onev(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteL5], (instregex "LD1Onev(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteL5, - WriteAdr], (instregex "LD1Onev(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD1Onev(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDA], (instregex "LD1Twov(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteVLDA, - WriteAdr], (instregex "LD1Twov(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD1Twov(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteVLDA], (instregex "LD1Twov(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDA, - WriteAdr], (instregex "LD1Twov(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD1Twov(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDB], (instregex "LD1Threev(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteVLDB, - WriteAdr], (instregex "LD1Threev(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD1Threev(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteVLDB], (instregex "LD1Threev(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDB, - WriteAdr], (instregex "LD1Threev(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD1Threev(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDC], (instregex "LD1Fourv(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteVLDC, - WriteAdr], (instregex "LD1Fourv(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD1Fourv(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteVLDC], (instregex "LD1Fourv(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDC, - WriteAdr], (instregex "LD1Fourv(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD1Fourv(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDD], (instregex "LD1i(8|16|32)$")>; def : InstRW<[M3WriteVLDD, - WriteAdr], (instregex "LD1i(8|16|32)_POST")>; + M3WriteA1], (instregex "LD1i(8|16|32)_POST")>; def : InstRW<[M3WriteVLDE], (instregex "LD1i(64)$")>; def : InstRW<[M3WriteVLDE, - WriteAdr], (instregex "LD1i(64)_POST")>; + M3WriteA1], (instregex "LD1i(64)_POST")>; def : InstRW<[M3WriteL5], (instregex "LD1Rv(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteL5, - WriteAdr], (instregex "LD1Rv(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD1Rv(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteL5], (instregex "LD1Rv(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteL5, - WriteAdr], (instregex "LD1Rv(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD1Rv(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDF], (instregex "LD2Twov(8b|4h|2s)$")>; def : InstRW<[M3WriteVLDF, - WriteAdr], (instregex "LD2Twov(8b|4h|2s)_POST")>; + M3WriteA1], (instregex "LD2Twov(8b|4h|2s)_POST")>; def : InstRW<[M3WriteVLDF], (instregex "LD2Twov(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDF, - WriteAdr], (instregex "LD2Twov(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD2Twov(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDG], (instregex "LD2i(8|16|32)$")>; def : InstRW<[M3WriteVLDG, - WriteAdr], (instregex "LD2i(8|16|32)_POST")>; + M3WriteA1], (instregex "LD2i(8|16|32)_POST")>; def : InstRW<[M3WriteVLDH], (instregex "LD2i(64)$")>; def : InstRW<[M3WriteVLDH, - WriteAdr], (instregex "LD2i(64)_POST")>; + M3WriteA1], (instregex "LD2i(64)_POST")>; def : InstRW<[M3WriteVLDA], (instregex "LD2Rv(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteVLDA, - WriteAdr], (instregex "LD2Rv(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD2Rv(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteVLDA], (instregex "LD2Rv(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDA, - WriteAdr], (instregex "LD2Rv(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD2Rv(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDI], (instregex "LD3Threev(8b|4h|2s)$")>; def : InstRW<[M3WriteVLDI, - WriteAdr], (instregex "LD3Threev(8b|4h|2s)_POST")>; + M3WriteA1], (instregex "LD3Threev(8b|4h|2s)_POST")>; def : InstRW<[M3WriteVLDI], (instregex "LD3Threev(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDI, - WriteAdr], (instregex "LD3Threev(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD3Threev(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDJ], (instregex "LD3i(8|16|32)$")>; def : InstRW<[M3WriteVLDJ, - WriteAdr], (instregex "LD3i(8|16|32)_POST")>; + M3WriteA1], (instregex "LD3i(8|16|32)_POST")>; def : InstRW<[M3WriteVLDL], (instregex "LD3i(64)$")>; def : InstRW<[M3WriteVLDL, - WriteAdr], (instregex "LD3i(64)_POST")>; + M3WriteA1], (instregex "LD3i(64)_POST")>; def : InstRW<[M3WriteVLDB], (instregex "LD3Rv(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteVLDB, - WriteAdr], (instregex "LD3Rv(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD3Rv(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteVLDB], (instregex "LD3Rv(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDB, - WriteAdr], (instregex "LD3Rv(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD3Rv(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDN], (instregex "LD4Fourv(8b|4h|2s)$")>; def : InstRW<[M3WriteVLDN, - WriteAdr], (instregex "LD4Fourv(8b|4h|2s)_POST")>; + M3WriteA1], (instregex "LD4Fourv(8b|4h|2s)_POST")>; def : InstRW<[M3WriteVLDN], (instregex "LD4Fourv(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDN, - WriteAdr], (instregex "LD4Fourv(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD4Fourv(16b|8h|4s|2d)_POST")>; def : InstRW<[M3WriteVLDK], (instregex "LD4i(8|16|32)$")>; def : InstRW<[M3WriteVLDK, - WriteAdr], (instregex "LD4i(8|16|32)_POST")>; + M3WriteA1], (instregex "LD4i(8|16|32)_POST")>; def : InstRW<[M3WriteVLDM], (instregex "LD4i(64)$")>; def : InstRW<[M3WriteVLDM, - WriteAdr], (instregex "LD4i(64)_POST")>; + M3WriteA1], (instregex "LD4i(64)_POST")>; def : InstRW<[M3WriteVLDC], (instregex "LD4Rv(8b|4h|2s|1d)$")>; def : InstRW<[M3WriteVLDC, - WriteAdr], (instregex "LD4Rv(8b|4h|2s|1d)_POST")>; + M3WriteA1], (instregex "LD4Rv(8b|4h|2s|1d)_POST")>; def : InstRW<[M3WriteVLDC], (instregex "LD4Rv(16b|8h|4s|2d)$")>; def : InstRW<[M3WriteVLDC, - WriteAdr], (instregex "LD4Rv(16b|8h|4s|2d)_POST")>; + M3WriteA1], (instregex "LD4Rv(16b|8h|4s|2d)_POST")>; // ASIMD store instructions. def : InstRW<[WriteVST], (instregex "ST1Onev(8b|4h|2s|1d)$")>;