[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 30 22:17:57 PST 2020


xbolva00 added a comment.

Do you plan to implement gcc’s option in Clang as followup?

-ffinite-loops / -fno-finite-loops
Assume that a loop with an exit will eventually take the exit and not loop indefinitely. This allows the compiler to remove loops that otherwise have no side-effects, not considering eventual endless looping as such.

This option is enabled by default at -O2 for C++ with -std=c++11 or higher.

?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86844



More information about the cfe-commits mailing list