[all-commits] [llvm/llvm-project] ed6b57: [CodeGen] Emit a call instruction instead of an in...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Wed Jul 15 14:48:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ed6b578040a85977026c93bf4188f996148f3218
      https://github.com/llvm/llvm-project/commit/ed6b578040a85977026c93bf4188f996148f3218
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2020-07-15 (Wed, 15 Jul 2020)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/test/CodeGenCXX/debug-info-class.cpp
    M clang/test/CodeGenObjCXX/arc-list-init-destruct.mm
    M clang/test/CodeGenObjCXX/os_log.mm
    M clang/test/OpenMP/atomic_codegen.cpp
    M clang/test/OpenMP/critical_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
    M clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
    M clang/test/OpenMP/for_codegen.cpp
    M clang/test/OpenMP/for_simd_codegen.cpp
    M clang/test/OpenMP/master_codegen.cpp
    M clang/test/OpenMP/parallel_for_codegen.cpp
    M clang/test/OpenMP/parallel_for_simd_codegen.cpp
    M clang/test/OpenMP/parallel_master_codegen.cpp
    M clang/test/OpenMP/parallel_num_threads_codegen.cpp
    M clang/test/OpenMP/parallel_sections_codegen.cpp
    M clang/test/OpenMP/sections_codegen.cpp
    M clang/test/OpenMP/simd_codegen.cpp
    M clang/test/OpenMP/single_codegen.cpp
    M clang/test/OpenMP/taskgroup_codegen.cpp

  Log Message:
  -----------
  [CodeGen] Emit a call instruction instead of an invoke if the called
llvm function is marked nounwind

This fixes cases where an invoke is emitted, despite the called llvm
function being marked nounwind, because ConstructAttributeList failed to
add the attribute to the attribute list. llvm optimization passes turn
invokes into calls and optimize away the exception handling code, but
it's better to avoid emitting the code in the front-end if the called
function is known not to raise an exception.

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




More information about the All-commits mailing list