diff --git a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp index 3e3822483a1ba..024129e28d64b 100644 --- a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp +++ b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "ReduceBasicBlocks.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" @@ -25,7 +26,7 @@ using namespace llvm; /// Replaces BB Terminator with one that only contains Chunk BBs static void replaceBranchTerminator(BasicBlock &BB, - const std::set &BBsToKeep) { + const DenseSet &BBsToKeep) { auto *Term = BB.getTerminator(); std::vector ChunkSucessors; for (auto *Succ : successors(&BB)) @@ -68,7 +69,7 @@ static void replaceBranchTerminator(BasicBlock &BB, /// replace with something) static void removeUninterestingBBsFromSwitch(SwitchInst &SwInst, - const std::set &BBsToKeep) { + const DenseSet &BBsToKeep) { if (!BBsToKeep.count(SwInst.getDefaultDest())) { auto *FnRetTy = SwInst.getParent()->getParent()->getReturnType(); ReturnInst::Create(SwInst.getContext(), @@ -99,7 +100,7 @@ static void extractBasicBlocksFromModule(Oracle &O, Module &Program) { // We create a vector first, then convert it to a set, so that we don't have // to pay the cost of rebalancing the set frequently if the order we insert // the elements doesn't match the order they should appear inside the set. - std::set BBsToKeep(InitBBsToKeep.begin(), InitBBsToKeep.end()); + DenseSet BBsToKeep(InitBBsToKeep.begin(), InitBBsToKeep.end()); std::vector BBsToDelete; for (auto &F : Program)