gcc/ * config/nvptx/mkoffload.c (main): Check that either OpenACC or OpenMP is selected. Pass -mgomp to offload compiler in OpenMP case. * config/nvptx/nvptx-protos.h (nvptx_shuffle_kind): Move enum declaration from nvptx.c. (nvptx_gen_shuffle): Declare. (nvptx_output_set_softstack): Declare. * config/nvptx/nvptx.c (nvptx_shuffle_kind): Move to nvptx-protos.h. (need_softstack_decl): New variable. (need_unisimt_decl): New variable. (diagnose_openacc_conflict): New. Use it... (nvptx_option_override): ...here. Handle TARGET_GOMP. (nvptx_encode_section_info): Handle "shared" attribute. (write_as_kernel): Restrict to OpenACC target regions. (init_softstack_frame): New. (nvptx_init_unisimt_predicate): New. (write_omp_entry): New. Use it... (nvptx_declare_function_name): ...here to emit OpenMP target region entrypoints. Handle TARGET_SOFT_STACK. Call nvptx_init_unisimt_predicate. (nvptx_output_set_softstack): New. (nvptx_get_drap_rtx): Return %argp as the DRAP if needed. (nvptx_gen_shuffle): Export. (nvptx_output_call_insn): Handle COND_EXEC patterns. Emit instruction predicate. (nvptx_print_operand): Fix handling of instruction predicates. (nvptx_get_unisimt_master): New helper function. (nvptx_get_unisimt_predicate): Ditto. (nvptx_call_insn_is_syscall_p): Ditto. (nvptx_unisimt_handle_set): Ditto. (nvptx_reorg_uniform_simt): New. Transform code for -muniform-simt. (nvptx_reorg): Call nvptx_reorg_uniform_simt. (nvptx_handle_shared_attribute): New. Use it... (nvptx_attribute_table): ... here (new entry). (nvptx_record_offload_symbol): Handle NULL attributes. (nvptx_file_end): Handle need_softstack_decl and need_unisimt_decl. (nvptx_simt_vf): New. (TARGET_SIMT_VF): Define. * config/nvptx/nvptx.h (TARGET_CPU_CPP_BUILTINS): Define __nvptx_softstack or __nvptx_unisimt__ when -msoft-stack, or resp. -muniform-simt option is active. (STACK_SIZE_MODE): Define. (FIXED_REGISTERS): Adjust. (SOFTSTACK_SLOT_REGNUM): New. (SOFTSTACK_PREV_REGNUM): New. (REGISTER_NAMES): Adjust. (struct machine_function): New fields. * config/nvptx/nvptx.md (UNSPEC_SET_SOFTSTACK): New. (UNSPEC_VOTE_BALLOT): Ditto. (UNSPEC_LANEID): Ditto. (UNSPECV_NOUNROLL): Ditto. (atomic): New attribute. (predicable): New attribute. Generate predicated forms via define_cond_exec. (br_true): Mark as not predicable. (br_false): Ditto. (br_true_uni): Ditto. (br_false_uni): Ditto. (return): Ditto. (trap_if_true): Ditto. (trap_if_false): Ditto. (nvptx_fork): Ditto. (nvptx_forked): Ditto. (nvptx_joining): Ditto. (nvptx_join): Ditto. (nvptx_barsync): Ditto. (epilogue): Emit stack restore if TARGET_SOFT_STACK. (allocate_stack): Implement for TARGET_SOFT_STACK. Remove unused code. (allocate_stack_<mode>): Remove unused pattern. (set_softstack_insn): New pattern. (restore_stack_block): Handle for TARGET_SOFT_STACK. (nvptx_vote_ballot): New pattern. (omp_simt_lane): Ditto. (omp_simt_last_lane): Ditto. (omp_simt_ordered): Ditto. (omp_simt_vote_any): Ditto. (omp_simt_xchg_bfly): Ditto. (omp_simt_xchg_idx): Ditto. (nvptx_nounroll): Ditto. (atomic_compare_and_swap<mode>_1): Mark with atomic attribute. (atomic_exchange<mode>): Ditto. (atomic_fetch_add<mode>): Ditto. (atomic_fetch_addsf): Ditto. (atomic_fetch_<logic><mode>): Ditto. * config/nvptx/nvptx.opt: (msoft-stack): New option. (muniform-simt): Ditto. (mgomp): Ditto. * config/nvptx/t-nvptx (MULTILIB_OPTIONS): New. * doc/extend.texi (Nvidia PTX Variable Attributes): New section. * doc/invoke.texi (msoft-stack): Document. (muniform-simt): Document (mgomp): Document. * doc/tm.texi: Regenerate. * doc/tm.texi.in: (TARGET_SIMT_VF): New hook. * target.def: Define it. * target-insns.def (omp_simt_lane): New. (omp_simt_last_lane): New. (omp_simt_ordered): New. (omp_simt_vote_any): New. (omp_simt_xchg_bfly): New. (omp_simt_xchg_idx): New. libgcc/ * config/nvptx/crt0.c (__main): Setup __nvptx_stacks and __nvptx_uni. * config/nvptx/mgomp.c: New file. * config/nvptx/t-nvptx: Add mgomp.c gcc/testsuite/ * lib/target-supports.exp (check_effective_target_alloca): Use a compile test. * gcc.target/nvptx/softstack.c: New test. * gcc.target/nvptx/decl-shared.c: New test. * gcc.target/nvptx/decl-shared-init.c: New test. From-SVN: r242503
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| aarch64 | Loading commit data... | |
| alpha | Loading commit data... | |
| arc | Loading commit data... | |
| arm | Loading commit data... | |
| avr | Loading commit data... | |
| bfin | Loading commit data... | |
| c6x | Loading commit data... | |
| cr16 | Loading commit data... | |
| cris | Loading commit data... | |
| epiphany | Loading commit data... | |
| fr30 | Loading commit data... | |
| frv | Loading commit data... | |
| ft32 | Loading commit data... | |
| h8300 | Loading commit data... | |
| i386 | Loading commit data... | |
| ia64 | Loading commit data... | |
| iq2000 | Loading commit data... | |
| libbid | Loading commit data... | |
| lm32 | Loading commit data... | |
| m32c | Loading commit data... | |
| m32r | Loading commit data... | |
| m68k | Loading commit data... | |
| mcore | Loading commit data... | |
| microblaze | Loading commit data... | |
| mips | Loading commit data... | |
| mmix | Loading commit data... | |
| moxie | Loading commit data... | |
| msp430 | Loading commit data... | |
| nds32 | Loading commit data... | |
| nios2 | Loading commit data... | |
| nvptx | Loading commit data... | |
| pa | Loading commit data... | |
| pdp11 | Loading commit data... | |
| rl78 | Loading commit data... | |
| rs6000 | Loading commit data... | |
| rx | Loading commit data... | |
| s390 | Loading commit data... | |
| score | Loading commit data... | |
| sh | Loading commit data... | |
| sol2 | Loading commit data... | |
| sparc | Loading commit data... | |
| spu | Loading commit data... | |
| stormy16 | Loading commit data... | |
| tilegx | Loading commit data... | |
| tilepro | Loading commit data... | |
| v850 | Loading commit data... | |
| vax | Loading commit data... | |
| visium | Loading commit data... | |
| vms | Loading commit data... | |
| xtensa | Loading commit data... | |
| darwin-64.c | Loading commit data... | |
| darwin-crt-tm.c | Loading commit data... | |
| darwin-crt3.c | Loading commit data... | |
| gthr-lynx.h | Loading commit data... | |
| gthr-rtems.h | Loading commit data... | |
| gthr-vxworks.h | Loading commit data... | |
| hardfp.c | Loading commit data... | |
| libgcc-glibc.ver | Loading commit data... | |
| libgcc-libsystem.ver | Loading commit data... | |
| no-sfp-machine.h | Loading commit data... | |
| no-unwind.h | Loading commit data... | |
| t-crtfm | Loading commit data... | |
| t-crtstuff-pic | Loading commit data... | |
| t-darwin | Loading commit data... | |
| t-dfprules | Loading commit data... | |
| t-eh-dw2-dip | Loading commit data... | |
| t-fdpbit | Loading commit data... | |
| t-fixedpoint-gnu-prefix | Loading commit data... | |
| t-fpbit | Loading commit data... | |
| t-freebsd-thread | Loading commit data... | |
| t-gnu-prefix | Loading commit data... | |
| t-hardfp | Loading commit data... | |
| t-hardfp-sfdf | Loading commit data... | |
| t-libgcc-pic | Loading commit data... | |
| t-libunwind | Loading commit data... | |
| t-libunwind-elf | Loading commit data... | |
| t-linux | Loading commit data... | |
| t-openbsd-thread | Loading commit data... | |
| t-rtems | Loading commit data... | |
| t-slibgcc | Loading commit data... | |
| t-slibgcc-darwin | Loading commit data... | |
| t-slibgcc-elf-ver | Loading commit data... | |
| t-slibgcc-gld | Loading commit data... | |
| t-slibgcc-gld-nover | Loading commit data... | |
| t-slibgcc-hpux | Loading commit data... | |
| t-slibgcc-libgcc | Loading commit data... | |
| t-slibgcc-nolc-override | Loading commit data... | |
| t-slibgcc-sld | Loading commit data... | |
| t-slibgcc-vms | Loading commit data... | |
| t-softfp | Loading commit data... | |
| t-softfp-compat | Loading commit data... | |
| t-softfp-excl | Loading commit data... | |
| t-softfp-sfdf | Loading commit data... | |
| t-softfp-sfdftf | Loading commit data... | |
| t-softfp-tf | Loading commit data... | |
| t-stack | Loading commit data... | |
| t-tls | Loading commit data... | |
| t-vxworks | Loading commit data... | |
| unwind-dw2-fde-darwin.c | Loading commit data... | |
| vxlib-tls.c | Loading commit data... | |
| vxlib.c | Loading commit data... |