[all-commits] [llvm/llvm-project] 90609f: [OpenMP][NFCI] Remove effectively dead code in cla...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Dec 13 19:01:33 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90609fb68f054ded29ae1738e73c8eb4ac55bcdb
      https://github.com/llvm/llvm-project/commit/90609fb68f054ded29ae1738e73c8eb4ac55bcdb
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
    M clang/test/OpenMP/amdgcn_target_codegen.cpp
    M clang/test/OpenMP/declare_target_codegen_globalization.cpp
    M clang/test/OpenMP/nvptx_SPMD_codegen.cpp
    M clang/test/OpenMP/nvptx_data_sharing.cpp
    M clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
    M clang/test/OpenMP/nvptx_lambda_capturing.cpp
    M clang/test/OpenMP/nvptx_multi_target_parallel_codegen.cpp
    M clang/test/OpenMP/nvptx_nested_parallel_codegen.cpp
    M clang/test/OpenMP/nvptx_parallel_codegen.cpp
    M clang/test/OpenMP/nvptx_parallel_for_codegen.cpp
    M clang/test/OpenMP/nvptx_target_codegen.cpp
    M clang/test/OpenMP/nvptx_target_parallel_codegen.cpp
    M clang/test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp
    M clang/test/OpenMP/nvptx_target_parallel_reduction_codegen.cpp
    M clang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
    M clang/test/OpenMP/nvptx_target_printf_codegen.c
    M clang/test/OpenMP/nvptx_target_simd_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_simd_codegen.cpp
    M clang/test/OpenMP/nvptx_teams_codegen.cpp
    M clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp
    M clang/test/OpenMP/reduction_implicit_map.cpp
    M clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
    M clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
    M clang/test/OpenMP/target_has_device_addr_codegen.cpp
    M clang/test/OpenMP/target_parallel_debug_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_debug_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_reduction_task_codegen.cpp
    M clang/test/OpenMP/target_parallel_reduction_task_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_order_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp
    M clang/test/OpenMP/target_teams_map_codegen.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/always_inline_device.ll
    M llvm/test/Transforms/OpenMP/barrier_removal.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines_pre_lto.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines_remarks.ll
    M llvm/test/Transforms/OpenMP/deduplication_target.ll
    M llvm/test/Transforms/OpenMP/fold_generic_main_thread.ll
    M llvm/test/Transforms/OpenMP/get_hardware_num_threads_in_block_fold.ll
    M llvm/test/Transforms/OpenMP/get_hardware_num_threads_in_block_fold_optnone.ll
    M llvm/test/Transforms/OpenMP/global_constructor.ll
    M llvm/test/Transforms/OpenMP/globalization_remarks.ll
    M llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll
    M llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
    M llvm/test/Transforms/OpenMP/parallel_level_fold.ll
    M llvm/test/Transforms/OpenMP/remove_globalization.ll
    M llvm/test/Transforms/OpenMP/replace_globalization.ll
    M llvm/test/Transforms/OpenMP/single_threaded_execution.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll
    M llvm/test/Transforms/OpenMP/spmdization_assumes.ll
    M llvm/test/Transforms/OpenMP/spmdization_constant_prop.ll
    M llvm/test/Transforms/OpenMP/spmdization_guarding.ll
    M llvm/test/Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll
    M llvm/test/Transforms/OpenMP/spmdization_remarks.ll
    M openmp/libomptarget/DeviceRTL/include/Interface.h
    M openmp/libomptarget/DeviceRTL/src/Kernel.cpp

  Log Message:
  -----------
  [OpenMP][NFCI] Remove effectively dead code in clang and the runtime

Differential Revision: https://reviews.llvm.org/D136903


  Commit: 23333bb6b77544997943a63f7f97c39065fad8b8
      https://github.com/llvm/llvm-project/commit/23333bb6b77544997943a63f7f97c39065fad8b8
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/naked_functions.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/nonzero-address-spaces.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/pr27568.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/pr32917.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/global.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/naked-return.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll
    M llvm/test/Transforms/Attributor/callbacks.ll
    M llvm/test/Transforms/Attributor/callgraph.ll
    M llvm/test/Transforms/Attributor/cgscc_bugs.ll
    M llvm/test/Transforms/Attributor/chain.ll
    M llvm/test/Transforms/Attributor/depgraph.ll
    M llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
    M llvm/test/Transforms/Attributor/dereferenceable-2.ll
    M llvm/test/Transforms/Attributor/heap_to_stack.ll
    M llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll
    M llvm/test/Transforms/Attributor/internal-noalias.ll
    M llvm/test/Transforms/Attributor/liveness_chains.ll
    M llvm/test/Transforms/Attributor/lowerheap.ll
    M llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
    M llvm/test/Transforms/Attributor/lvi-for-ashr.ll
    M llvm/test/Transforms/Attributor/nodelete.ll
    M llvm/test/Transforms/Attributor/noreturn_async.ll
    M llvm/test/Transforms/Attributor/noreturn_sync.ll
    M llvm/test/Transforms/Attributor/openmp_parallel.ll
    M llvm/test/Transforms/Attributor/reachability.ll
    M llvm/test/Transforms/Attributor/reduced/crash_ptr2int_cgscc.ll
    M llvm/test/Transforms/Attributor/value-simplify-dbg.ll
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
    M llvm/test/Transforms/OpenMP/always_inline_device.ll
    M llvm/test/Transforms/OpenMP/reduced_pointer_info_assertion.ll
    M llvm/test/Transforms/OpenMP/remove_noinline_attributes.ll

  Log Message:
  -----------
  [NFC] Rerun update test checks on Attributor and OpenMP-Opt tests


  Commit: 8be3133ecdb7c34891c702030a40e6d20f3e3bd4
      https://github.com/llvm/llvm-project/commit/8be3133ecdb7c34891c702030a40e6d20f3e3bd4
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/value-simplify-assume.ll
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

  Log Message:
  -----------
  [OpenMP][FIX] Remove unsound reasoning about written to values

Even if a value is for sure written we need to visit the call sites as
they might end up inside the function that reads and writes the value.
In a follow up we can introduce correct reasoning to avoid the backwards
traversal in this case and instead check if any call site between the
write and the read might reach a potential write we want to exclude.


Compare: https://github.com/llvm/llvm-project/compare/0017dc2d0ff8...8be3133ecdb7


More information about the All-commits mailing list