From 8142ba6bbbb3e62e275caef6271feed4511c36b1 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 5 Feb 2010 19:20:15 +0000 Subject: [PATCH] Use a SmallSetVector instead of a SetVector; this code showed up as a malloc caller in a profile. llvm-svn: 95407 --- lib/Transforms/Utils/LoopSimplify.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index e81b77974ab..57bab60e6b1 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -176,8 +176,9 @@ ReprocessLoop: SmallVector ExitBlocks; L->getExitBlocks(ExitBlocks); - SetVector ExitBlockSet(ExitBlocks.begin(), ExitBlocks.end()); - for (SetVector::iterator I = ExitBlockSet.begin(), + SmallSetVector ExitBlockSet(ExitBlocks.begin(), + ExitBlocks.end()); + for (SmallSetVector::iterator I = ExitBlockSet.begin(), E = ExitBlockSet.end(); I != E; ++I) { BasicBlock *ExitBlock = *I; for (pred_iterator PI = pred_begin(ExitBlock), PE = pred_end(ExitBlock);