[PATCH] [NVPTX] Emit .pragma "nounroll" for loops marked with nounroll

Jingyue Wu jingyue at google.com
Fri Jan 30 19:35:05 PST 2015


================
Comment at: lib/Target/NVPTX/NVPTXAsmPrinter.cpp:426
@@ +425,3 @@
+// TODO(jingyue): consider "#pragma unroll 1" which is equivalent to "#pragma
+// nounroll".
+bool NVPTXAsmPrinter::isLoopHeaderOfNoUnroll(
----------------
meheff wrote:
> FYI the loop unrolling pass should replace instances of "llvm.loop.unroll.count 1" from "#pragma unroll 1" with llvm.loop.unroll.disable.
Ack'ed.

================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:237
@@ -236,3 +236,3 @@
 // returned.
 static const MDNode *GetUnrollMetadata(const Loop *L, StringRef Name) {
   MDNode *LoopID = L->getLoopID();
----------------
meheff wrote:
> How about calling this function GetUnrollMetadataForLoop to avoid colliding with the new function you added?
Done.

http://reviews.llvm.org/D7041

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list