2014-11-10 17:12:42 +01:00
|
|
|
/* Prototypes for exported functions defined in nvptx.c.
|
2017-01-01 13:07:43 +01:00
|
|
|
Copyright (C) 2014-2017 Free Software Foundation, Inc.
|
2014-11-10 17:12:42 +01:00
|
|
|
Contributed by Bernd Schmidt <bernds@codesourcery.com>
|
|
|
|
|
|
|
|
This file is part of GCC.
|
|
|
|
|
|
|
|
GCC is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU General Public License as published
|
|
|
|
by the Free Software Foundation; either version 3, or (at your
|
|
|
|
option) any later version.
|
|
|
|
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GCC; see the file COPYING3. If not see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
|
|
#ifndef GCC_NVPTX_PROTOS_H
|
|
|
|
#define GCC_NVPTX_PROTOS_H
|
|
|
|
|
2016-11-16 18:17:00 +01:00
|
|
|
/* The kind of shuffe instruction. */
|
|
|
|
enum nvptx_shuffle_kind
|
|
|
|
{
|
|
|
|
SHUFFLE_UP,
|
|
|
|
SHUFFLE_DOWN,
|
|
|
|
SHUFFLE_BFLY,
|
|
|
|
SHUFFLE_IDX,
|
|
|
|
SHUFFLE_MAX
|
|
|
|
};
|
|
|
|
|
2014-11-10 17:12:42 +01:00
|
|
|
extern void nvptx_declare_function_name (FILE *, const char *, const_tree decl);
|
|
|
|
extern void nvptx_declare_object_name (FILE *file, const char *name,
|
|
|
|
const_tree decl);
|
2015-12-01 21:13:02 +01:00
|
|
|
extern void nvptx_output_aligned_decl (FILE *file, const char *name,
|
|
|
|
const_tree decl,
|
|
|
|
HOST_WIDE_INT size, unsigned align);
|
2014-11-10 17:12:42 +01:00
|
|
|
extern void nvptx_function_end (FILE *);
|
|
|
|
extern void nvptx_output_skip (FILE *, unsigned HOST_WIDE_INT);
|
|
|
|
extern void nvptx_output_ascii (FILE *, const char *, unsigned HOST_WIDE_INT);
|
|
|
|
extern void nvptx_register_pragmas (void);
|
|
|
|
|
|
|
|
#ifdef RTX_CODE
|
nvptx.h (struct machine_function): Add axis_predicate.
* config/nvptx/nvptx.h (struct machine_function): Add
axis_predicate.
* config/nvptx/nvptx-protos.h (nvptx_expand_oacc_fork,
nvptx_expand_oacc_join): Declare.
* config/nvptx/nvptx.md (UNSPEC_NTID, UNSPEC_TID): Delete.
(UNSPEC_DIM_SIZE, UNSPEC_SHARED_DATA, UNSPEC_BIT_CONV,
UNSPEC_SHUFFLE, UNSPEC_BR_UNIFIED): New.
(UNSPECV_BARSYNC, UNSPECV_DIM_POS, UNSPECV_FORK, UNSPECV_FORKED,
UNSPECV_JOINING, UNSPECV_JOIN): New.
(BITS, BITD): New mode iterators.
(br_true_uni, br_false_uni): New.
(*oacc_ntid_insn, oacc_ntid, *oacc_tid_insn, oacc_tid): Delete.
(oacc_dim_size, oacc_dim_pos): New.
(nvptx_fork, nvptx_forked, nvptx_joining, nvptx_join): New.
(oacc_fork, oacc_join): New.
(nvptx_shuffle<mode>, unpack<mode>si2, packsi<mode>2): New.
(worker_load<mode>, worker_store<mode>): New.
(nvptx_barsync): New.
* config/nvptx/nvptx.c: Include gimple.h & dumpfile.h.
(SHUFFLE_UP, SHUFFLE_DOWN, SHUFFLE_BFLY, SHUFFLE_IDX): Define.
(worker_bcast_hwm, worker_bcast_align, worker_bcast_name,
worker_bcast_sym): New.
(nvptx_option_override): Initialize worker broadcast buffer.
(nvptx_emit_forking, nvptx_emit_joining): New.
(nvptx_init_axis_predicate): New.
(nvptx_declare_function_name): Init axis predicates.
(nvptx_expand_call): Add fork/join markers around routine call.
(nvptx_expand_oacc_fork, nvptx_expand_oacc_join): New.
(nvptx_gen_unpack, nvptx_gen_pack, nvptx_gen_shuffle): New.
(nvptx_gen_vcast): New.
(struct wcast_data_t): New.
(enum propagate_mask): New.
(nvptx_gen_wcast): New.
(nvptx_print_operand): Add 'S' case.
(struct parallel): New.
(parallel::parallel, parallel::~parallel): New.
(bb_insn_map_t, insn_bb_t, insn_bb_vec_t): New typedefs.
(nvptx_split_blocks, nvptx_discover_pre, nvptx_dump_pars,
nvptx_find_par, nvptx_discover_pars): New.
(nvptx_propagate): New.
(vprop_gen, nvptx_vpropagate): New.
(wprop_gen, nvptx_wpropagate): New.
(nvptx_wsync): New.
(nvptx_single, nvptx_skip_par): New.
(nvptx_process_pars, nvptx_neuter_pars): New.
(ntptx_reorg): Split blocks, generate parallel structure, apply
neutering.
(nvptx_cannot_copy_insn_p): New.
(nvptx_file_end): Emit worker broadcast decl.
(nvptx_goacc_fork_join): New.
(TARGET_CANNOT_COPY_INSN_P): Override.
(TARGET_GOACC_FORK_JOIN): Override.
From-SVN: r229486
2015-10-28 15:24:39 +01:00
|
|
|
extern void nvptx_expand_oacc_fork (unsigned);
|
|
|
|
extern void nvptx_expand_oacc_join (unsigned);
|
2014-11-10 17:12:42 +01:00
|
|
|
extern void nvptx_expand_call (rtx, rtx);
|
2016-11-16 18:17:00 +01:00
|
|
|
extern rtx nvptx_gen_shuffle (rtx, rtx, rtx, nvptx_shuffle_kind);
|
2014-11-10 17:12:42 +01:00
|
|
|
extern rtx nvptx_expand_compare (rtx);
|
|
|
|
extern const char *nvptx_ptx_type_from_mode (machine_mode, bool);
|
2015-12-02 15:57:54 +01:00
|
|
|
extern const char *nvptx_output_mov_insn (rtx, rtx);
|
2014-11-10 17:12:42 +01:00
|
|
|
extern const char *nvptx_output_call_insn (rtx_insn *, rtx, rtx);
|
|
|
|
extern const char *nvptx_output_return (void);
|
2016-11-16 18:17:00 +01:00
|
|
|
extern const char *nvptx_output_set_softstack (unsigned);
|
2017-03-28 19:24:57 +02:00
|
|
|
extern const char *nvptx_output_simt_enter (rtx, rtx, rtx);
|
|
|
|
extern const char *nvptx_output_simt_exit (rtx);
|
2014-11-10 17:12:42 +01:00
|
|
|
#endif
|
|
|
|
#endif
|