SuccessChanges

Summary

  1. [JumpThreading] Add a test that duplicates insts of a basic block with cond br to preds; NFC (details)
  2. [JumpThreading] Allow duplicating a basic block into preds when its branch condition is freeze(phi) (details)
  3. [flang] Fix compilation warning in check-directive-structure.h (details)
Commit fd86d67b82830f1365e1e25fd138832b475bc1e7 by aqjune
[JumpThreading] Add a test that duplicates insts of a basic block with cond br to preds; NFC
The file was addedllvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll
Commit 9f717d7b941fbc42bef017b84c4dd0f65ce06e7a by aqjune
[JumpThreading] Allow duplicating a basic block into preds when its branch condition is freeze(phi)

This is the last JumpThreading patch for getting the performance numbers shown at
https://reviews.llvm.org/D84940#2184653 .

This patch makes ProcessBlock call ProcessBranchOnPHI when the branch condition
is freeze(phi) as well (originally it calls the function when the condition is
phi only).

Since what ProcessBranchOnPHI does is to duplicate the basic block into
predecessors if profitable, it is still valid when the condition is freeze(phi)
too.

```
    p = phi [a, pred1] [b, pred2]
    p.fr = freeze p
    br p.fr, ...
=>
  pred1:
    p.fr = freeze a
    br p.fr, ...
  pred2:
    p.fr2 = freeze b
    br p.fr2, ...
```

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D85029
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp (diff)
The file was modifiedllvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll (diff)
Commit 6d2d73059fda5a63f2b34a9482acc0445e0956a4 by tkeith
[flang] Fix compilation warning in check-directive-structure.h

Clang 9 gets the following warning after revision `D85104`.
```
../../flang/lib/Semantics/check-directive-structure.h:36:7: error: 'Fortran::semantics::DirectiveStructureChecker<llvm::omp::Directive, llvm::omp::Clause, Fortran::parser::OmpClause, 77>' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
```

The fix is the make the destructor virtual. Neither it nor the
constructor need to be public, so make them protected.

Differential Revision: https://reviews.llvm.org/D85383
The file was modifiedflang/lib/Semantics/check-directive-structure.h (diff)