Commit 47dbcbd8 authored by Florian Hahn's avatar Florian Hahn
Browse files

Revert [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.

This breaks http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52310

This reverts r373430 (git commit 70f70035)

llvm-svn: 373432
parent cbefc36f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -2285,10 +2285,14 @@ OptimizeFunctions(Module &M,
    // So, remove unreachable blocks from the function, because a) there's
    // no point in analyzing them and b) GlobalOpt should otherwise grow
    // some more complicated logic to break these cycles.
    // Removing unreachable blocks might invalidate the dominator so we
    // recalculate it.
    if (!F->isDeclaration()) {
      if (removeUnreachableBlocks(*F)) {
        auto &DT = LookupDomTree(*F);
      DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy);
      Changed |= removeUnreachableBlocks(*F, nullptr, &DTU);
        DT.recalculate(*F);
        Changed = true;
      }
    }

    Changed |= processGlobal(*F, GetTLI, LookupDomTree);