diff options
author | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-09 17:04:40 +0000 |
---|---|---|
committer | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-09 17:04:40 +0000 |
commit | 5b35a7918cc42521165f68f4fe3975e25103c798 (patch) | |
tree | 9fd7bd08f877808bd7bb4eb601fd7482c9c85d6f /libitm/libitm_i.h | |
parent | 024c1ad598b7c9037f5417f56e367f7dd6b6ea45 (diff) | |
download | gcc-5b35a7918cc42521165f68f4fe3975e25103c798.tar.gz |
Add HTM fastpath and use Intel RTM for it on x86.
* beginend.cc (htm_fastpath): New.
(gtm_thread::begin_transaction, _ITM_commitTransaction,
_ITM_commitTransactionEH): Add HTM fastpath handling.
* config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
* config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
* config/x86/target.h (htm_available, htm_init, htm_begin_success,
htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
* configure.tgt: Add -mrtm to XCFLAGS.
* method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
(gtm_thread::serialirr_mode): Add HTM fastpath handling.
* libitm_i.h (htm_fastpath, dispatch_htm): Declare.
* retry.cc (parse_default_method): Add HTM method parsing.
(gtm_thread::number_of_threads_changed): Use HTM by default if
available.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm/libitm_i.h')
-rw-r--r-- | libitm/libitm_i.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h index e826abd0656..4dfcda9c7de 100644 --- a/libitm/libitm_i.h +++ b/libitm/libitm_i.h @@ -332,9 +332,14 @@ extern abi_dispatch *dispatch_serialirr(); extern abi_dispatch *dispatch_serialirr_onwrite(); extern abi_dispatch *dispatch_gl_wt(); extern abi_dispatch *dispatch_ml_wt(); +extern abi_dispatch *dispatch_htm(); extern gtm_cacheline_mask gtm_mask_stack(gtm_cacheline *, gtm_cacheline_mask); +// Control variable for the HTM fastpath that uses serial mode as fallback. +// Non-zero if the HTM fastpath is enabled. See gtm_thread::begin_transaction. +extern uint32_t htm_fastpath; + } // namespace GTM #endif // LIBITM_I_H |