SuccessChanges

Summary

  1. Revert D71539 "Recommit "[SCEV] Look through single value PHIs."" (details)
  2. Fix reporting the lack of global variables in "target var". (details)
  3. [libc++] Fix copy/paste error that broke a test (details)
  4. Include sstream after D85705 (details)
  5. [NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM (details)
  6. [Delinearization][NewPM] Port delinearization to NPM (details)
  7. [UnifyLoopExits] Pin tests with -unify-loop-exits to legacy PM (details)
  8. [lldb] Delete two unneeded <regex> (details)
  9. Implement a new kind of Pass: dynamic pass pipeline (details)
  10. [mlir] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D85869 (details)
  11. [LoopUnswitch] Trivial simplification: remove trivial dead condition after unswitch (details)
Commit 8fdac7cb7abbeeaed016ef9eb7a087458e41e33f by i
Revert D71539 "Recommit "[SCEV] Look through single value PHIs.""

This reverts commit 11dccf8d3aa5d55210f8b886fb21926c7a8353ca.

A bootstrapped clang crashes (due to ArrayRef::front called on an empty
ArrayRef) when compiling some files.  Very strangely, this only reproduces with
modules.

```
13 0x0000564d3349e968 llvm::ArrayRef<llvm::BasicBlock*>::front() const /proc/self/cwd/llvm/include/llvm/ADT/ArrayRef.h:160:7
14 0x0000564d3349e896 llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getHeader() const /proc/self/cwd/llvm/include/llvm/Analysis/LoopInfo.h:104:50
15 0x0000564d3349fd9d llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getLoopLatch() const /proc/self/cwd/llvm/include/llvm/Analysis/LoopInfoImpl.h:210:11
16 0x0000564d33593c8a llvm::ScalarEvolution::computeBackedgeTakenCount(llvm::Loop const*, bool) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:6933:15
17 0x0000564d33592ebc llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:0:30
18 0x0000564d33593a54 llvm::ScalarEvolution::getBackedgeTakenCount(llvm::Loop const*, llvm::ScalarEvolution::ExitCountKind) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:6487:36
19 0x0000564d32be2402 llvm::ScalarEvolution::getConstantMaxBackedgeTakenCount(llvm::Loop const*) /proc/self/cwd/llvm/include/llvm/Analysis/ScalarEvolution.h:768:5
20 0x0000564d33590807 llvm::ScalarEvolution::getRangeRef(llvm::SCEV const*, llvm::ScalarEvolution::RangeSignHint) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:5495:19
21 0x0000564d320abab7 llvm::ScalarEvolution::getSignedRange(llvm::SCEV const*) /proc/self/cwd/llvm/include/llvm/Analysis/ScalarEvolution.h:840:12
22 0x0000564d335a03aa llvm::ScalarEvolution::isKnownPredicateViaConstantRanges(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:9239:60
23 0x0000564d33586a80 llvm::ScalarEvolution::isKnownViaNonRecursiveReasoning(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /proc/self/cwd/llvm/lib/Analysis/ScalarEvolution.cpp:10284:60
```
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/funclet.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll
Commit 94b0d836a105116220052313df5a58473f706cdf by jingham
Fix reporting the lack of global variables in "target var".

There was a little thinko which meant when stopped in a frame with
debug information but whose CU didn't have any global variables we
report:

no debug info for frame <N>

This patch fixes that error message to say the intended:

no global variables in current compile unit

<rdar://problem/69086361>
The file was modifiedlldb/source/Commands/CommandObjectTarget.cpp
The file was addedlldb/test/API/functionalities/target_var/no_vars/Makefile
The file was addedlldb/test/API/functionalities/target_var/no_vars/main.c
The file was addedlldb/test/API/functionalities/target_var/no_vars/TestTargetVarNoVars.py
Commit ac65e3d2ce10d6867b62faf107ff2aed05086ecf by Louis Dionne
[libc++] Fix copy/paste error that broke a test
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
Commit 0b9f9eced9c532ee9bbf320216a2e85b314eb5f0 by i
Include sstream after D85705
The file was modifiedlldb/source/Target/TraceSettingsParser.cpp
Commit 84a8ca1e6ce1400345e693fe7495e5d271fb2dc6 by aeubanks
[NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM

NPM passes just use the normal versions of these analyses instead.
Also pin any tests with -analyze to legacy PM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D87857
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/bad_input.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/irreducible_loop_crash.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/basic.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/irreducible.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/redundant_edges.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll
The file was modifiedllvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/loops_with_profile_info.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/double_backedge.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/double_exit.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/loop.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
The file was modifiedllvm/test/Analysis/BranchProbabilityInfo/switch.ll
The file was modifiedllvm/test/Analysis/BlockFrequencyInfo/basic.ll
Commit 9db0c572c1fc07fef5e2ed46203da3772c2d7765 by aeubanks
[Delinearization][NewPM] Port delinearization to NPM

Also make tests in Analysis/Delinearization work under NPM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D87741
The file was modifiedllvm/test/Analysis/Delinearization/multidim_only_ivs_2d.ll
The file was modifiedllvm/test/Analysis/Delinearization/parameter_addrec_product.ll
The file was modifiedllvm/test/Analysis/Delinearization/constant_functions_multi_dim.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_ivs_and_parameteric_offsets_3d.ll
The file was modifiedllvm/test/Analysis/Delinearization/himeno_2.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_only_ivs_3d.ll
The file was modifiedllvm/lib/Analysis/Delinearization.cpp
The file was modifiedllvm/test/Analysis/Delinearization/undef.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was addedllvm/include/llvm/Analysis/Delinearization.h
The file was modifiedllvm/test/Analysis/Delinearization/a.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_only_ivs_3d_cast.ll
The file was modifiedllvm/test/Analysis/Delinearization/type_mismatch.ll
The file was modifiedllvm/test/Analysis/Delinearization/divide_by_one.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_two_accesses_different_delinearization.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Analysis/Delinearization/iv_times_constant_in_subscript.ll
The file was modifiedllvm/test/Analysis/Delinearization/multidim_only_ivs_2d_nested.ll
The file was modifiedllvm/test/Analysis/Delinearization/gcd_multiply_expr.ll
The file was modifiedllvm/test/Analysis/Delinearization/himeno_1.ll
The file was modifiedllvm/test/Analysis/Delinearization/terms_with_identity_factor.ll
Commit 89df0fda1767d9f91cb9bfaf6d0e839bbc04c76f by aeubanks
[UnifyLoopExits] Pin tests with -unify-loop-exits to legacy PM

The pass is not used in tree, so no reason to port it.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D88058
The file was modifiedllvm/test/Transforms/UnifyLoopExits/switch.ll
The file was modifiedllvm/test/Transforms/UnifyLoopExits/restore-ssa.ll
The file was modifiedllvm/test/Transforms/UnifyLoopExits/nested.ll
The file was modifiedllvm/test/Transforms/UnifyLoopExits/basic.ll
The file was modifiedllvm/test/Transforms/StructurizeCFG/workarounds/needs-unified-loop-exits.ll
The file was modifiedllvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll
Commit 95bfeb5903c7b75a0a9ddf5c4b53e4308bb05486 by i
[lldb] Delete two unneeded <regex>
The file was modifiedlldb/source/Target/Trace.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
Commit 385c3f43fceba227be2e4dce84a59075733541c1 by joker.eph
Implement a new kind of Pass: dynamic pass pipeline

Instead of performing a transformation, such pass yields a new pass pipeline
to run on the currently visited operation.
This feature can be used for example to implement a sub-pipeline that
would run only on an operation with specific attributes. Another example
would be to compute a cost model and dynamic schedule a pipeline based
on the result of this analysis.

Discussion: https://llvm.discourse.group/t/rfc-dynamic-pass-pipeline/1637

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D86392
The file was addedmlir/test/Pass/dynamic-pipeline.mlir
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/include/mlir/Pass/Pass.h
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was addedmlir/test/Pass/dynamic-pipeline-nested.mlir
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was addedmlir/test/Pass/dynamic-pipeline-fail-on-parent.mlir
The file was addedmlir/test/lib/Transforms/TestDynamicPipeline.cpp
Commit 91671e13efbc5dbd17b832d7973401350d0a6ee6 by i
[mlir] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D85869
The file was modifiedmlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
Commit 5502cfa091e0f6b35a6d96435b2ec15a43a324eb by serguei.katkov
[LoopUnswitch] Trivial simplification: remove trivial dead condition after unswitch

Non trivial loop unswitch can keep the dead condition instruction.
CL adds trivial dead code elimination for unused condition.

Reviewers: asbirlea, aqjune, fhahn, DaniilSuchkov, reames
Reviewed By: asbirlea
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D88014
The file was modifiedllvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp