[PATCH] D65718: [LangRef] Document forward-progress requirement

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 15:08:08 PDT 2019


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM w/suggested minor changes.

You might want to revise the infinite loop example used in the phi instruction section to add a call to llvm.side_effect for clarity and seachability.



================
Comment at: llvm/docs/LangRef.rst:2501
+In particular, infinite loops and infinite recursion without side-effects
+result in undefined behavior. Language frontends that do not have a
+forward-progress requirement should insert a call to `@llvm.sideeffect` as part
----------------
I'd suggest a tweak in wording here.  Rather than explicitly advising llvm.side_effect, I'd suggest phrasing this as requiring the insertion of some synthetic side effect, and then mention llvm.side_effect existing specifically for this purpose.

The hair I'm splitting is that if you already need another synthetic side effect - say a GC or deoptimization safepoint opportunity - then you don't actually need the llvm.side_effect intrinsic *too*. 


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65718





More information about the llvm-commits mailing list