[PATCH] D86841: [clang] Add noprogress attribute deduction for infinite loops

Atmn Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 3 20:52:36 PDT 2020


atmnpatel updated this revision to Diff 289849.
atmnpatel added a comment.

In Summary:

- I changed the llvm loop metadata name to `mustprogress`, to indicate that loops with this attribute are required to have side-effects.
- The `mayprogress` function attribute is applied to functions where an infinite loop is found with a constant conditional.
- The `mustprogress` attribute is applied to loops within a `mayprogress` function that do not have a constant conditional.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86841/new/

https://reviews.llvm.org/D86841

Files:
  clang/lib/CodeGen/CGLoopInfo.cpp
  clang/lib/CodeGen/CGLoopInfo.h
  clang/lib/CodeGen/CGStmt.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/test/CodeGen/attr-noprogress.c
  clang/test/CodeGen/attr-noprogress.cpp
  clang/test/CodeGenCXX/fno-unroll-loops-metadata.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86841.289849.patch
Type: text/x-patch
Size: 23266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200904/f560f410/attachment-0001.bin>


More information about the cfe-commits mailing list