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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 09:02:25 PST 2021


fhahn added a comment.

In D86844#2484639 <https://reviews.llvm.org/D86844#2484639>, @atmnpatel wrote:

> I might be misunderstanding the standard here but since 1 is a non-zero constant expression, it can't be assumed to terminate by the implementation right? The relevant section from C11 at least is "An iteration statement whose controlling expression is not a constant expression that performs [explanation of what it deems as progress] may be assumed by the implementation to terminate" (C11 6.8.5 p6). I think these cases fall outside of the scope of this particular change ...

The source is C++, so the C11 standard should be irrelevant. I left a comment at D86841 <https://reviews.llvm.org/D86841>, this seems more appropriate to discuss the issue, as it is unrelated to `-loop-deletion`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86844



More information about the llvm-commits mailing list