Changeset 213939 in webkit for trunk/Source/JavaScriptCore/dfg/DFGLivenessAnalysisPhase.cpp
- Timestamp:
- Mar 14, 2017, 2:37:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGLivenessAnalysisPhase.cpp
r208373 r213939 1 1 /* 2 * Copyright (C) 2013 , 2015-2016Apple Inc. All rights reserved.2 * Copyright (C) 2013-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 38 38 #include <wtf/BitVector.h> 39 39 #include <wtf/IndexSparseSet.h> 40 #include <wtf/LoggingHashSet.h> 40 41 41 42 namespace JSC { namespace DFG { 43 44 // Uncomment this to log hashtable operations. 45 // static const char templateString[] = "unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>"; 46 // typedef LoggingHashSet<templateString, unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>> LiveSet; 47 48 typedef HashSet<unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>> LiveSet; 42 49 43 50 class LivenessAnalysisPhase : public Phase { … … 92 99 } 93 100 { 94 const HashSet<unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>>& liveAtTailIndices = m_liveAtTail[blockIndex];101 const LiveSet& liveAtTailIndices = m_liveAtTail[blockIndex]; 95 102 Vector<NodeFlowProjection>& liveAtTail = block->ssa->liveAtTail; 96 103 liveAtTail.resize(0); … … 158 165 bool changedPredecessor = false; 159 166 for (BasicBlock* predecessor : block->predecessors) { 160 HashSet<unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>>& 161 liveAtTail = m_liveAtTail[predecessor]; 167 LiveSet& liveAtTail = m_liveAtTail[predecessor]; 162 168 for (unsigned newValue : *m_workset) { 163 169 if (liveAtTail.add(newValue)) { … … 177 183 // Live values per block edge. 178 184 BlockMap<Vector<unsigned, 0, UnsafeVectorOverflow, 1>> m_liveAtHead; 179 BlockMap< HashSet<unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>>> m_liveAtTail;185 BlockMap<LiveSet> m_liveAtTail; 180 186 181 187 // Single sparse set allocated once and used by every basic block.
Note:
See TracChangeset
for help on using the changeset viewer.