diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-12-20 20:18:27 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-12-20 20:18:27 +0000 |
commit | 61ebf091a07c1fd63d223d14893a50d70c0c6acd (patch) | |
tree | f05b202f5fce8854ae4dbaf3cbbfeffd6cbc11dd | |
parent | 293e62e7c884c0913c2dd58b62d4f17f9bfd6431 (diff) | |
download | llvm-61ebf091a07c1fd63d223d14893a50d70c0c6acd.tar.gz |
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@gmail.com>
Merged from: https://llvm.org/svn/llvm-project/polly/trunk@168966
llvm-svn: 170745
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 84289ed37baa..064c828df791 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -714,17 +714,10 @@ void ClastStmtCodeGen::codegenForGPGPU(const clast_for *F) { 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()); |