Skip to content

Commit 0b550c3

Browse files
author
Andres Madrid Ucha
committed
PartialExecuter: Changed FunctionCounter to a DenseMap
The use of FunctionCounter in the code does not seem to invalidate its iterators so using a DenseMap should be safe.
1 parent a2bf1af commit 0b550c3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

llvm/lib/CheerpWriter/PartialExecuter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ class PartialInterpreter : public llvm::Interpreter {
9999
NewAlignmentData newAlignmentData;
100100
llvm::ValueMap<llvm::Constant*, int> fullyKnownCEs;
101101

102-
std::map<const llvm::Function*, uint32_t> functionCounters;
102+
llvm::DenseMap<const llvm::Function*, uint32_t> functionCounters;
103+
103104
bool isGlobalVariablePartiallyExecutable(const GlobalVariable& GVar)
104105
{
105106
if (!GVar.hasInitializer())

0 commit comments

Comments
 (0)