[llvm-commits] [polly] r170745 - /polly/branches/release_32/lib/CodeGen/CodeGeneration.cpp

Tobias Grosser grosser at fim.uni-passau.de
Thu Dec 20 12:18:27 PST 2012


Author: grosser
Date: Thu Dec 20 14:18:27 2012
New Revision: 170745

URL: http://llvm.org/viewvc/llvm-project?rev=170745&view=rev
Log:
Remove unneeded preservation and restore of ValueMap and ClastVars in GPGPU code
generation.

We don't use the exact same way to build loop body for GPGPU codegen as openmp
codegen and other transformations do currently, in which cases 'createLoop'
function is called recursively. GPGPU codegen may fail due to improper restore
of ValueMap and ClastVars .

Contributed by:  Yabin Hu <yabin.hwu at gmail.com>

Merged from: https://llvm.org/svn/llvm-project/polly/trunk@168966

Modified:
    polly/branches/release_32/lib/CodeGen/CodeGeneration.cpp

Modified: polly/branches/release_32/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/branches/release_32/lib/CodeGen/CodeGeneration.cpp?rev=170745&r1=170744&r2=170745&view=diff
==============================================================================
--- polly/branches/release_32/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/branches/release_32/lib/CodeGen/CodeGeneration.cpp Thu Dec 20 14:18:27 2012
@@ -714,17 +714,10 @@
     VMap.insert(std::make_pair<Value*, Value*>(OldIV, IV));
   }
 
-  // Preserve the current values.
-  const ValueMapT ValueMapCopy = ValueMap;
-  const CharMapT ClastVarsCopy = ClastVars;
-  updateWithVMap(VMap);
+  updateWithValueMap(VMap);
 
   BlockGenerator::generate(Builder, *Statement, ValueMap, P);
 
-  // Restore the original values.
-  ValueMap = ValueMapCopy;
-  ClastVars = ClastVarsCopy;
-
   if (AfterBB)
     Builder.SetInsertPoint(AfterBB->begin());
 





More information about the llvm-commits mailing list