[polly] r293378 - [BlockGenerator] Comment corretions for r293374 [NFC]

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 03:39:03 PST 2017


Author: grosser
Date: Sat Jan 28 05:39:02 2017
New Revision: 293378

URL: http://llvm.org/viewvc/llvm-project?rev=293378&view=rev
Log:
[BlockGenerator] Comment corretions for r293374 [NFC]

This addresses some additional comments from Michael Kruse for commit r293374
as expressed in https://reviews.llvm.org/D28901.

Modified:
    polly/trunk/include/polly/CodeGen/BlockGenerators.h
    polly/trunk/lib/CodeGen/BlockGenerators.cpp

Modified: polly/trunk/include/polly/CodeGen/BlockGenerators.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/BlockGenerators.h?rev=293378&r1=293377&r2=293378&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/BlockGenerators.h (original)
+++ polly/trunk/include/polly/CodeGen/BlockGenerators.h Sat Jan 28 05:39:02 2017
@@ -348,7 +348,7 @@ protected:
   /// Handle users of @p Array outside the SCoP.
   ///
   /// @param S         The current SCoP.
-  /// @param Inst      The ScopArray to handle.
+  /// @param Inst      The ScopArrayInfo to handle.
   void handleOutsideUsers(const Scop &S, ScopArrayInfo *Array);
 
   /// Find scalar statements that have outside users.

Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=293378&r1=293377&r2=293378&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Sat Jan 28 05:39:02 2017
@@ -380,12 +380,15 @@ Value *BlockGenerator::getOrCreateAlloca
     // to the parallel subfunction and each request for a scalar alloca slot
     // must be forwared to the temporary in-subfunction slot. This mapping is
     // removed when the subfunction has been generated and again normal host
-    // code is generated. As GlobalMap may be changed multiple times (for
-    // each parallel loop), is commonly only known after the initial alloca
-    // has been generated, and the original alloca value must be restored at
-    // the end, it is not possible to perform the GlobalMap lookup right after
-    // creating the alloca below, but instead we need to check GlobalMap at
-    // call to getOrCreateAlloca.
+    // code is generated. Due to the following reasons it is not possible to
+    // perform the GlobalMap lookup right after creating the alloca below, but
+    // instead we need to check GlobalMap at each call to getOrCreateAlloca:
+    //
+    //   1) GlobalMap may be changed multiple times (for each parallel loop),
+    //   2) The temporary mapping is commonly only known after the initial
+    //      alloca has already been generated, and
+    //   3) The original alloca value must be restored after leaving the
+    //      sub-function.
     if (Value *NewAddr = GlobalMap.lookup(&*Addr))
       return NewAddr;
     return Addr;




More information about the llvm-commits mailing list