[all-commits] [llvm/llvm-project] 6c3129: [clang] Refactor mustprogress handling, add it to ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Apr 30 06:24:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c3129549374c0e81e28fd0a21e96f8087b63a78
      https://github.com/llvm/llvm-project/commit/6c3129549374c0e81e28fd0a21e96f8087b63a78
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/test/CodeGen/attr-mustprogress.c
    M clang/test/CodeGenCXX/attr-mustprogress.cpp

  Log Message:
  -----------
  [clang] Refactor mustprogress handling, add it to all loops in c++11+.

Currently Clang does not add mustprogress to inifinite loops with a
known constant condition, matching C11 behavior. The forward progress
guarantee in C++11 and later should allow us to add mustprogress to any
loop (http://eel.is/c++draft/intro.progress#1).

This allows us to simplify the code dealing with adding mustprogress a
bit.

Reviewed By: aaron.ballman, lebedev.ri

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




More information about the All-commits mailing list