1*38fd1498Szrj /* Target-dependent costs for lower-subreg.c.
2*38fd1498Szrj    Copyright (C) 2012-2018 Free Software Foundation, Inc.
3*38fd1498Szrj 
4*38fd1498Szrj This file is part of GCC.
5*38fd1498Szrj 
6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify it under
7*38fd1498Szrj the terms of the GNU General Public License as published by the Free
8*38fd1498Szrj Software Foundation; either version 3, or (at your option) any later
9*38fd1498Szrj version.
10*38fd1498Szrj 
11*38fd1498Szrj GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12*38fd1498Szrj WARRANTY; without even the implied warranty of MERCHANTABILITY or
13*38fd1498Szrj FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14*38fd1498Szrj for more details.
15*38fd1498Szrj 
16*38fd1498Szrj You should have received a copy of the GNU General Public License
17*38fd1498Szrj along with GCC; see the file COPYING3.  If not see
18*38fd1498Szrj <http://www.gnu.org/licenses/>.  */
19*38fd1498Szrj 
20*38fd1498Szrj #ifndef LOWER_SUBREG_H
21*38fd1498Szrj #define LOWER_SUBREG_H 1
22*38fd1498Szrj 
23*38fd1498Szrj /* Information about whether, and where, lower-subreg should be applied.  */
24*38fd1498Szrj struct lower_subreg_choices {
25*38fd1498Szrj   /* A boolean vector for move splitting that is indexed by mode and is
26*38fd1498Szrj      true for each mode that is to have its copies split.  */
27*38fd1498Szrj   bool move_modes_to_split[MAX_MACHINE_MODE];
28*38fd1498Szrj 
29*38fd1498Szrj   /* True if zero-extensions from word_mode to twice_word_mode should
30*38fd1498Szrj      be split.  */
31*38fd1498Szrj   bool splitting_zext;
32*38fd1498Szrj 
33*38fd1498Szrj   /* Index X is true if twice_word_mode shifts by X + BITS_PER_WORD
34*38fd1498Szrj      should be split.  */
35*38fd1498Szrj   bool splitting_ashift[MAX_BITS_PER_WORD];
36*38fd1498Szrj   bool splitting_lshiftrt[MAX_BITS_PER_WORD];
37*38fd1498Szrj   bool splitting_ashiftrt[MAX_BITS_PER_WORD];
38*38fd1498Szrj 
39*38fd1498Szrj   /* True if there is at least one mode that is worth splitting.  */
40*38fd1498Szrj   bool something_to_do;
41*38fd1498Szrj };
42*38fd1498Szrj 
43*38fd1498Szrj /* Target-specific information for the subreg lowering pass.  */
44*38fd1498Szrj struct target_lower_subreg {
45*38fd1498Szrj   /* An integer mode that is twice as wide as word_mode.  */
46*38fd1498Szrj   scalar_int_mode_pod x_twice_word_mode;
47*38fd1498Szrj 
48*38fd1498Szrj   /* What we have decided to do when optimizing for size (index 0)
49*38fd1498Szrj      and speed (index 1).  */
50*38fd1498Szrj   struct lower_subreg_choices x_choices[2];
51*38fd1498Szrj };
52*38fd1498Szrj 
53*38fd1498Szrj extern struct target_lower_subreg default_target_lower_subreg;
54*38fd1498Szrj #if SWITCHABLE_TARGET
55*38fd1498Szrj extern struct target_lower_subreg *this_target_lower_subreg;
56*38fd1498Szrj #else
57*38fd1498Szrj #define this_target_lower_subreg (&default_target_lower_subreg)
58*38fd1498Szrj #endif
59*38fd1498Szrj 
60*38fd1498Szrj #endif
61