#define LLVM_ANALYSIS_DOMINANCEFRONTIERIMPL_H
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/Analysis/DominanceFrontier.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/GenericDomTree.h"
namespace llvm {
-namespace {
template <class BlockT>
class DFCalculateWorkObject {
public:
const DomTreeNodeT *Node;
const DomTreeNodeT *parentNode;
};
-}
template <class BlockT>
void DominanceFrontierBase<BlockT>::removeBlock(BlockT *BB) {
DomSetType &S = this->Frontiers[currentBB];
// Visit each block only once.
- if (visited.count(currentBB) == 0) {
- visited.insert(currentBB);
-
+ if (visited.insert(currentBB).second) {
// Loop over CFG successors to calculate DFlocal[currentNode]
for (auto SI = BlockTraits::child_begin(currentBB),
SE = BlockTraits::child_end(currentBB);