trans-mem.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Miscellaneous transactional memory support definitions.
  2. Copyright (C) 2009-2019 Free Software Foundation, Inc.
  3. Contributed by Richard Henderson <rth@redhat.com>
  4. and Aldy Hernandez <aldyh@redhat.com>.
  5. This file is part of GCC.
  6. GCC is free software; you can redistribute it and/or modify it under
  7. the terms of the GNU General Public License as published by the Free
  8. Software Foundation; either version 3, or (at your option) any later
  9. version.
  10. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  13. for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with GCC; see the file COPYING3. If not see
  16. <http://www.gnu.org/licenses/>. */
  17. #ifndef GCC_TRANS_MEM_H
  18. #define GCC_TRANS_MEM_H
  19. /* These defines must match the enumerations in libitm.h. */
  20. #define PR_INSTRUMENTEDCODE 0x0001
  21. #define PR_UNINSTRUMENTEDCODE 0x0002
  22. #define PR_MULTIWAYCODE (PR_INSTRUMENTEDCODE | PR_UNINSTRUMENTEDCODE)
  23. #define PR_HASNOXMMUPDATE 0x0004
  24. #define PR_HASNOABORT 0x0008
  25. #define PR_HASNOIRREVOCABLE 0x0020
  26. #define PR_DOESGOIRREVOCABLE 0x0040
  27. #define PR_HASNOSIMPLEREADS 0x0080
  28. #define PR_AWBARRIERSOMITTED 0x0100
  29. #define PR_RARBARRIERSOMITTED 0x0200
  30. #define PR_UNDOLOGCODE 0x0400
  31. #define PR_PREFERUNINSTRUMENTED 0x0800
  32. #define PR_EXCEPTIONBLOCK 0x1000
  33. #define PR_HASELSE 0x2000
  34. #define PR_READONLY 0x4000
  35. extern void compute_transaction_bits (void);
  36. extern bool is_tm_ending (gimple *);
  37. extern tree build_tm_abort_call (location_t, bool);
  38. extern bool is_tm_safe (const_tree);
  39. extern bool is_tm_pure (const_tree);
  40. extern bool is_tm_may_cancel_outer (tree);
  41. extern bool is_tm_ending_fndecl (tree);
  42. extern void record_tm_replacement (tree, tree);
  43. extern void tm_malloc_replacement (tree);
  44. #endif // GCC_TRANS_MEM_H