[PATCH] D86841: [clang] Add mustprogress and llvm.loop.mustprogress attribute deduction

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 7 09:00:51 PST 2021


fhahn added subscribers: xbolva00, fhahn.
fhahn added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmt.cpp:799
       EmitBoolCondBranch = false;
+      FnIsMustProgress = false;
+    }
----------------
Shouldn't this only apply for C? http://eel.is/c++draft/intro.progress#1 does not seem to have this escape hatch?

See the example by @xbolva00 for which we fail to eliminate the loops from a C++ source https://godbolt.org/z/jW7son


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