lower-subreg.h 2.0 KB

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