[PATCH] D80316: [HardwareLoops] Intrinsic descriptions

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 23:26:17 PDT 2020


samparker added inline comments.


================
Comment at: llvm/docs/LangRef.rst:14854
+These intrinsics can be used to specify the number of iterations that the next
+(vector) loop will execute. They are placed in the loop preheader, and are marked
+as ``IntrNoDuplicate`` to avoid optimizers duplicating these instructions.
----------------
Why the mention of vector?


================
Comment at: llvm/docs/LangRef.rst:14860
+The integer operand is the loop iteration count of the hardware-loop. I.e.,
+the number of executions of the loop body, and not e.g. the loop back-edge
+taken count.
----------------
Maybe use 'trip count' instead to match the internal terminology the we use? 


================
Comment at: llvm/docs/LangRef.rst:14880
+These intrinsics can be used to specify the number of iterations that the next
+(vector) loop will execute, and also test that the given count is not zero,
+allowing it to control entry to a while-loop. They are placed in the loop
----------------
vector again


================
Comment at: llvm/docs/LangRef.rst:14882
+allowing it to control entry to a while-loop. They are placed in the loop
+preheader, and are marked as ``IntrNoDuplicate`` to avoid optimizers
+duplicating these instructions.
----------------
I think these ones are always placed in the preheader's (unique?) predecessor.


================
Comment at: llvm/docs/LangRef.rst:14912
+it is supported by SCEV, so it's the backends responsibility to handle cases where it
+may be optimised, but are not allowed to duplicate these intrinsic calls.
+
----------------
Probably worth stating that it doesn't wrap.


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

https://reviews.llvm.org/D80316





More information about the llvm-commits mailing list