dberlin added a comment. For the cases that are always true, can you just use PostDominatorTree instead? IE why is it: PDT.reset(new DominatorTreeBase<BasicBlock, true>()); Instead of PDT.reset(new PostDominatorTree()); https://reviews.llvm.org/D35315