1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/Transforms/OpenMP
Jose M Monsalve Diaz 5b7208da36 [OpenMP] Folding threadLimit and numThreads when single value in kernels
The device runtime contains several calls to `__kmpc_get_hardware_num_threads_in_block`
and `__kmpc_get_hardware_num_blocks`. If the thread_limit and the num_teams are constant,
these calls can be folded to the constant value.

In this patch we use the already introduced `AAFoldRuntimeCall` and the `NumTeams` and
`NumThreads` kernel attributes (to be introduced in a different patch) to fold these functions.
The code checks all the kernels, and if their attributes match, the functions are folded.

In the future we will explore specializing for multiple values of NumThreads and NumTeams.

Depends on D106390

Reviewed By: jdoerfert, JonChesterfield

Differential Revision: https://reviews.llvm.org/D106033
2021-07-27 21:47:12 -04:00
..
add_attributes_amdgcn.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
add_attributes.ll [OPENMP]Fix PR49787: Codegen for calling __tgt_target_teams_nowait_mapper has too few arguments. 2021-07-22 08:44:37 -07:00
attributor_module_slice_reproducer.ll
custom_state_machines_remarks.ll [OpenMP] Rework OpenMP remarks 2021-07-16 14:07:00 -04:00
custom_state_machines.ll [Attributor] Delete dead stores 2021-07-26 23:33:36 -05:00
dead_use.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
deduplication_remarks.ll [OpenMP] Rework OpenMP remarks 2021-07-16 14:07:00 -04:00
deduplication_target.ll [OpenMPOpt] Move dedup runtime calls after init for target regions 2021-07-23 05:54:01 -07:00
deduplication.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
fold_generic_main_thread.ll [OpenMP] Fold __kmpc_is_generic_main_thread_id if possible 2021-07-21 21:18:22 -04:00
get_hardware_num_threads_in_block_fold.ll [OpenMP] Folding threadLimit and numThreads when single value in kernels 2021-07-27 21:47:12 -04:00
globalization_remarks.ll [OpenMP] Rework OpenMP remarks 2021-07-16 14:07:00 -04:00
gpu_kernel_detection_remarks.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
gpu_state_machine_function_ptr_replacement.ll [OpenMP] Run rewriteDeviceCodeStateMachine in the Module not CGSCC pass 2021-07-26 21:26:07 -05:00
hide_mem_transfer_latency.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
icv_remarks.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
icv_tracking.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
is_spmd_exec_mode_fold.ll [OpenMP] Add new execution mode for SPMD execution with Generic semantics 2021-07-21 20:57:28 -04:00
parallel_deletion_cg_update.ll
parallel_deletion_remarks.ll [OpenMP] Rework OpenMP remarks 2021-07-16 14:07:00 -04:00
parallel_deletion.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
parallel_level_fold.ll [AbstractAttributor] Fold __kmpc_parallel_level if possible 2021-07-26 22:46:19 -04:00
parallel_region_merging.ll [Attributor] Introduce AAPointerInfo 2021-07-19 22:48:35 -05:00
remove_globalization.ll [OpenMP] Change __kmpc_free_shared to include the paired allocation size 2021-07-21 20:56:21 -04:00
replace_globalization.ll [OpenMP] Change __kmpc_free_shared to include the paired allocation size 2021-07-21 20:56:21 -04:00
rtf_type_checking.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00
single_threaded_execution.ll [OpenMP] Create custom state machines for generic target regions 2021-07-10 17:57:08 -05:00
spmdization_remarks.ll [OpenMP] Rework OpenMP remarks 2021-07-16 14:07:00 -04:00
spmdization.ll [Attributor] Delete dead stores 2021-07-26 23:33:36 -05:00
values_in_offload_arrays.ll [OpenMP] Change OpenMPOpt to check openmp metadata 2021-06-25 16:34:22 -04:00