comparison gcc/config/i386/x86-tune-sched.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Scheduler hooks for IA-32 which implement CPU specific logic. 1 /* Scheduler hooks for IA-32 which implement CPU specific logic.
2 Copyright (C) 1988-2017 Free Software Foundation, Inc. 2 Copyright (C) 1988-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify 6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see 17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */ 18 <http://www.gnu.org/licenses/>. */
19
20 #define IN_TARGET_CODE 1
19 21
20 #include "config.h" 22 #include "config.h"
21 #include "system.h" 23 #include "system.h"
22 #include "coretypes.h" 24 #include "coretypes.h"
23 #include "backend.h" 25 #include "backend.h"
52 54
53 case PROCESSOR_PENTIUMPRO: 55 case PROCESSOR_PENTIUMPRO:
54 case PROCESSOR_ATHLON: 56 case PROCESSOR_ATHLON:
55 case PROCESSOR_K8: 57 case PROCESSOR_K8:
56 case PROCESSOR_AMDFAM10: 58 case PROCESSOR_AMDFAM10:
57 case PROCESSOR_GENERIC:
58 case PROCESSOR_BTVER1: 59 case PROCESSOR_BTVER1:
59 return 3; 60 return 3;
60 61
61 case PROCESSOR_BDVER1: 62 case PROCESSOR_BDVER1:
62 case PROCESSOR_BDVER2: 63 case PROCESSOR_BDVER2:
65 case PROCESSOR_ZNVER1: 66 case PROCESSOR_ZNVER1:
66 case PROCESSOR_CORE2: 67 case PROCESSOR_CORE2:
67 case PROCESSOR_NEHALEM: 68 case PROCESSOR_NEHALEM:
68 case PROCESSOR_SANDYBRIDGE: 69 case PROCESSOR_SANDYBRIDGE:
69 case PROCESSOR_HASWELL: 70 case PROCESSOR_HASWELL:
71 case PROCESSOR_GENERIC:
70 return 4; 72 return 4;
71 73
72 default: 74 default:
73 return 1; 75 return 1;
74 } 76 }
352 case PROCESSOR_BDVER2: 354 case PROCESSOR_BDVER2:
353 case PROCESSOR_BDVER3: 355 case PROCESSOR_BDVER3:
354 case PROCESSOR_BDVER4: 356 case PROCESSOR_BDVER4:
355 case PROCESSOR_BTVER1: 357 case PROCESSOR_BTVER1:
356 case PROCESSOR_BTVER2: 358 case PROCESSOR_BTVER2:
357 case PROCESSOR_GENERIC:
358 /* Stack engine allows to execute push&pop instructions in parall. */ 359 /* Stack engine allows to execute push&pop instructions in parall. */
359 if ((insn_type == TYPE_PUSH || insn_type == TYPE_POP) 360 if ((insn_type == TYPE_PUSH || insn_type == TYPE_POP)
360 && (dep_insn_type == TYPE_PUSH || dep_insn_type == TYPE_POP)) 361 && (dep_insn_type == TYPE_PUSH || dep_insn_type == TYPE_POP))
361 return 0; 362 return 0;
362 /* FALLTHRU */ 363 /* FALLTHRU */
422 423
423 case PROCESSOR_CORE2: 424 case PROCESSOR_CORE2:
424 case PROCESSOR_NEHALEM: 425 case PROCESSOR_NEHALEM:
425 case PROCESSOR_SANDYBRIDGE: 426 case PROCESSOR_SANDYBRIDGE:
426 case PROCESSOR_HASWELL: 427 case PROCESSOR_HASWELL:
428 case PROCESSOR_GENERIC:
427 /* Stack engine allows to execute push&pop instructions in parall. */ 429 /* Stack engine allows to execute push&pop instructions in parall. */
428 if ((insn_type == TYPE_PUSH || insn_type == TYPE_POP) 430 if ((insn_type == TYPE_PUSH || insn_type == TYPE_POP)
429 && (dep_insn_type == TYPE_PUSH || dep_insn_type == TYPE_POP)) 431 && (dep_insn_type == TYPE_PUSH || dep_insn_type == TYPE_POP))
430 return 0; 432 return 0;
431 433