[PATCH] D86841: [clang] Add mustprogress and llvm.loop.mustprogress attribute deduction
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 5 07:54:37 PDT 2020
jdoerfert added a subscriber: jyknight.
jdoerfert added a comment.
One minor nit from me.
@jyknight @aaron.ballman @rjmccall any more thoughts?
================
Comment at: clang/lib/CodeGen/CGStmt.cpp:801
+ getLangOpts().CPlusPlus11 || getLangOpts().CPlusPlus14 ||
+ getLangOpts().CPlusPlus17 || getLangOpts().C2x) {
+ LoopMustProgress = true;
----------------
atmnpatel wrote:
> aqjune wrote:
> > A silly question: does old C/C++ not guarantee that loops should make forward progress?
> Nope, it was introduced explicitly simultaneously in C11 (6.8.5p6) and C++11 has it implicitly through [intro.progress].
Move this condition into a helper function somewhere with documentation. If we use another (similar) condition the same. This has to be updated over time and that way makes it much easier (also to read).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86841/new/
https://reviews.llvm.org/D86841
More information about the cfe-commits
mailing list