[polly] r262010 - BlockGenerators: Allow values to be removed from ScalarMap
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 05:27:02 PST 2016
Author: grosser
Date: Fri Feb 26 07:27:02 2016
New Revision: 262010
URL: http://llvm.org/viewvc/llvm-project?rev=262010&view=rev
Log:
BlockGenerators: Allow values to be removed from ScalarMap
This function is not yet used in Polly, but is useful to external projects that
generate multi-module code using Polly.
Modified:
polly/trunk/include/polly/CodeGen/BlockGenerators.h
Modified: polly/trunk/include/polly/CodeGen/BlockGenerators.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/BlockGenerators.h?rev=262010&r1=262009&r2=262010&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/BlockGenerators.h (original)
+++ polly/trunk/include/polly/CodeGen/BlockGenerators.h Fri Feb 26 07:27:02 2016
@@ -111,6 +111,17 @@ public:
/// GlobalMap.
Value *getOrCreateScalarAlloca(Value *ScalarBase);
+ /// @brief Remove a Value's allocation from the ScalarMap.
+ ///
+ /// This function allows to remove values from the ScalarMap. This is useful
+ /// if the corresponding alloca instruction will be deleted (or moved into
+ /// another module), as without removing these values the underlying
+ /// AssertingVH will trigger due to us still keeping reference to this
+ /// scalar.
+ ///
+ /// @param ScalarBase The value to remove.
+ void freeScalarAlloc(Value *ScalarBase) { ScalarMap.erase(ScalarBase); }
+
/// @brief Return the PHi-node alloca for @p ScalarBase
///
/// If no alloca was mapped to @p ScalarBase a new one is created.
More information about the llvm-commits
mailing list