[all-commits] [llvm/llvm-project] ac73b7: [clang] Add mustprogress and llvm.loop.mustprogres...

Atmn Patel via All-commits all-commits at lists.llvm.org
Wed Nov 4 19:03:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ac73b73c16526c9e51943759ea6cab285a57e33f
      https://github.com/llvm/llvm-project/commit/ac73b73c16526c9e51943759ea6cab285a57e33f
  Author: Atmn Patel <a335pate at uwaterloo.ca>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M clang/lib/CodeGen/CGLoopInfo.cpp
    M clang/lib/CodeGen/CGLoopInfo.h
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/test/CodeGen/address-safety-attr-flavors.cpp
    M clang/test/CodeGen/address-safety-attr.cpp
    A clang/test/CodeGen/attr-mustprogress-0.c
    A clang/test/CodeGen/attr-mustprogress-0.cpp
    A clang/test/CodeGen/attr-mustprogress-1.c
    A clang/test/CodeGen/attr-mustprogress-1.cpp
    M clang/test/CodeGen/memtag-attr.cpp
    M clang/test/CodeGen/no-builtin.cpp
    M clang/test/CodeGen/pragma-do-while.cpp
    M clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp
    M clang/test/CodeGenCXX/cxx11-trivial-initializer-struct.cpp
    M clang/test/CodeGenCXX/debug-info-line-if.cpp
    M clang/test/CodeGenCXX/debug-info-loops.cpp
    M clang/test/CodeGenCXX/fno-unroll-loops-metadata.cpp
    M clang/test/CodeGenCXX/pragma-followup_inner.cpp
    M clang/test/CodeGenCXX/pragma-followup_outer.cpp
    M clang/test/CodeGenCXX/pragma-loop-distribute.cpp
    M clang/test/CodeGenCXX/pragma-loop-pr27643.cpp
    M clang/test/CodeGenCXX/pragma-loop-predicate.cpp
    M clang/test/CodeGenCXX/pragma-loop-safety-imperfectly_nested.cpp
    M clang/test/CodeGenCXX/pragma-loop-safety-nested.cpp
    M clang/test/CodeGenCXX/pragma-loop-safety-outer.cpp
    M clang/test/CodeGenCXX/pragma-loop-safety.cpp
    M clang/test/CodeGenCXX/pragma-loop.cpp
    M clang/test/CodeGenCXX/pragma-pipeline.cpp
    M clang/test/CodeGenCXX/pragma-unroll-and-jam.cpp
    M clang/test/CodeGenCXX/pragma-unroll.cpp
    M clang/test/CodeGenCXX/thunks-ehspec.cpp
    M clang/test/CodeGenCXX/thunks.cpp
    M clang/test/OpenMP/simd_metadata.c
    M clang/test/Profile/c-unprofiled-blocks.c
    M clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
    M clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
    M clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
    M clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected

  Log Message:
  -----------
  [clang] Add mustprogress and llvm.loop.mustprogress attribute deduction

Since C++11, the C++ standard has a forward progress guarantee
[intro.progress], so all such functions must have the `mustprogress`
requirement. In addition, from C11 and onwards, loops without a non-zero
constant conditional or no conditional are also required to make
progress (C11 6.8.5p6). This patch implements these attribute deductions
so they can be used by the optimization passes.

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




More information about the All-commits mailing list