trans-mem.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Miscellaneous transactional memory support definitions.
  2. Copyright (C) 2009-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 GCC_TRANS_MEM_H
  16. #define GCC_TRANS_MEM_H
  17. /* These defines must match the enumerations in libitm.h. */
  18. #define PR_INSTRUMENTEDCODE 0x0001
  19. #define PR_UNINSTRUMENTEDCODE 0x0002
  20. #define PR_MULTIWAYCODE (PR_INSTRUMENTEDCODE | PR_UNINSTRUMENTEDCODE)
  21. #define PR_HASNOXMMUPDATE 0x0004
  22. #define PR_HASNOABORT 0x0008
  23. #define PR_HASNOIRREVOCABLE 0x0020
  24. #define PR_DOESGOIRREVOCABLE 0x0040
  25. #define PR_HASNOSIMPLEREADS 0x0080
  26. #define PR_AWBARRIERSOMITTED 0x0100
  27. #define PR_RARBARRIERSOMITTED 0x0200
  28. #define PR_UNDOLOGCODE 0x0400
  29. #define PR_PREFERUNINSTRUMENTED 0x0800
  30. #define PR_EXCEPTIONBLOCK 0x1000
  31. #define PR_HASELSE 0x2000
  32. #define PR_READONLY 0x4000
  33. extern void compute_transaction_bits (void);
  34. extern bool is_tm_ending (gimple);
  35. extern tree build_tm_abort_call (location_t, bool);
  36. extern bool is_tm_safe (const_tree);
  37. extern bool is_tm_pure (const_tree);
  38. extern bool is_tm_may_cancel_outer (tree);
  39. extern bool is_tm_ending_fndecl (tree);
  40. extern void record_tm_replacement (tree, tree);
  41. extern void tm_malloc_replacement (tree);
  42. #endif // GCC_TRANS_MEM_H