During switch lowering a binary search tree is created. The height of this
tree is usually small so no need for heap allocation.
BUG=
R=jvoung@chromium.org, jvoung, stichnot
Review URL: https://codereview.chromium.org/
1240323005.
SizeT Size;
typename Traits::Insts::Label *Label;
};
- std::stack<SearchSpan, std::deque<SearchSpan, CfgLocalAllocator<SearchSpan>>>
- SearchSpanStack;
+ // The stack will only grow to the height of the tree so 12 should be plenty
+ std::stack<SearchSpan, llvm::SmallVector<SearchSpan, 12>> SearchSpanStack;
SearchSpanStack.emplace(0, CaseClusters.size(), nullptr);
bool DoneCmp = false;