SuccessChanges

Summary

  1. [BasicAA] Add simple depth limit to avoid stack overflow (PR49151) (details)
  2. [IR] Move willReturn() to Instruction (details)
  3. [X86][AVX] getFauxShuffleMask - decode VBROADCAST(EXTRACT_VECTOR_ELT(V,0)) (details)
  4. Remove unnecessary "using namespace llvm" inside "namespace llvm". NFCI. (details)
  5. [flang][driver] Add debug measure-parse-tree and pre-fir-tree options (details)
  6. [DCE] Don't remove non-willreturn calls (details)
  7. [AMDGPU] WQM/WWM: Fix marking of partial definitions (details)
  8. [OPENMP][AMDGCN] Improvements to print_kernel_trace (bit mask) (details)
  9. [mlir][nfc] Fix indentation in LinalgOps.td. (details)
  10. [LLD] Fix tests after D96993 (details)
  11. [RISCV] Address some clang-tidy warnings. NFCI. (details)
  12. [gn build] Port 1a2b3536efef (details)
  13. [X86][SSE] Add tests for trunc(usubsat()) patterns. (details)
  14. [clangd] Expose absoluteParent helper (details)
Commit 1d9f4903c6151f1b3f90a743eac339dde8ef5d29 by nikita.ppv
[BasicAA] Add simple depth limit to avoid stack overflow (PR49151)

This is a simpler variant of D96647. It just adds a straightforward
depth limit with a high cutoff, without introducing complex logic
for BatchAA consistency. It accepts that we may cache a sub-optimal
result if the depth limit is hit.

Eventually this should be more fully addressed by D96647 or similar,
but in the meantime this avoids stack overflows in a cheap way.

Differential Revision: https://reviews.llvm.org/D96996
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit 370addb996138a9e3634899cf264c7621307617a by nikita.ppv
[IR] Move willReturn() to Instruction

This moves the willReturn() helper from CallBase to Instruction,
so that it can be used in a more generic manner. This will make
it easier to fix additional passes (ADCE and BDCE), and will give
us one place to change if additional instructions should become
non-willreturn (e.g. there has been talk about handling volatile
operations this way).

I have also included the IntrinsicInst workaround directly in
here, so that it gets applied consistently. (As such this change
is not entirely NFC -- FuncAttrs will now use this as well.)

Differential Revision: https://reviews.llvm.org/D96992
The file was modifiedllvm/lib/Transforms/IPO/FunctionAttrs.cpp
The file was modifiedllvm/include/llvm/IR/Instruction.h
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/lib/IR/Instruction.cpp
The file was modifiedllvm/include/llvm/IR/InstrTypes.h
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 2258b367dbe9286b31ef88f5361d108c62216d00 by llvm-dev
[X86][AVX] getFauxShuffleMask - decode VBROADCAST(EXTRACT_VECTOR_ELT(V,0))

Handle the case where we're broadcasting a scalar extracted from another vector.
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-combining-avx2.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit aa44815f849f2928f998499b163c8c3230a73c95 by llvm-dev
Remove unnecessary "using namespace llvm" inside "namespace llvm". NFCI.
The file was modifiedllvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
Commit 529f71811b0475995f2d9cf766f18d897eec574c by faris.rehman
[flang][driver] Add debug measure-parse-tree and pre-fir-tree options

Add the following options:
* -fdebug-measure-parse-tree
* -fdebug-pre-fir-tree

Summary of changes:
- Add 2 new frontend actions: DebugMeasureParseTreeAction and DebugPreFIRTreeAction
- Add MeasurementVisitor to FrontendActions.h
- Make reportFatalSemanticErrors return true if there are any fatal errors
- Port most of the `-fdebug-pre-fir-tree` tests to use the new driver if built, otherwise use f18.

Differential Revision: https://reviews.llvm.org/D96884
The file was modifiedflang/test/Flang-Driver/driver-help.f90
The file was modifiedflang/test/Lower/pre-fir-tree03.f90
The file was modifiedflang/lib/Frontend/CMakeLists.txt
The file was modifiedflang/test/Lower/pre-fir-tree02.f90
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp
The file was addedflang/test/Flang-Driver/debug-measure-parse-tree.f90
The file was modifiedflang/include/flang/Frontend/FrontendActions.h
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedflang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
The file was modifiedflang/include/flang/Frontend/FrontendOptions.h
The file was modifiedflang/test/Lower/pre-fir-tree01.f90
The file was modifiedflang/lib/Frontend/FrontendActions.cpp
The file was modifiedflang/test/Lower/pre-fir-tree05.f90
Commit 2f17ed294fcd8cde505b93c9c5bbab06ba59051c by nikita.ppv
[DCE] Don't remove non-willreturn calls

In both ADCE and BDCE (via DemandedBits) we should not remove
instructions that are not guaranteed to return. This issue was
pointed out by fhahn in the recent llvm-dev thread.

Differential Revision: https://reviews.llvm.org/D96993
The file was modifiedllvm/test/LTO/X86/parallel.ll
The file was modifiedllvm/test/Transforms/BDCE/dead-void-ro.ll
The file was modifiedllvm/test/Transforms/BDCE/willreturn.ll
The file was modifiedllvm/lib/Analysis/DemandedBits.cpp
The file was modifiedllvm/test/tools/gold/X86/parallel.ll
The file was modifiedllvm/test/Feature/OperandBundles/adce.ll
The file was modifiedllvm/test/Transforms/BDCE/dce-pure.ll
The file was modifiedllvm/lib/Transforms/Scalar/ADCE.cpp
The file was modifiedllvm/test/Transforms/ADCE/dce_pure_call.ll
The file was modifiedllvm/test/Transforms/ADCE/willreturn.ll
Commit 8181dcd30feeb7258685cafc35e0b01c894c6f3b by carl.ritson
[AMDGPU] WQM/WWM: Fix marking of partial definitions

Track lanes when processing definitions for marking WQM/WWM.
If all lanes have been defined then marking can stop.
This prevents marking unnecessary instructions as WQM/WWM.

In particular this fixes a bug where values passing through
V_SET_INACTIVE would me marked as requiring WWM.

Reviewed By: piotr

Differential Revision: https://reviews.llvm.org/D95503
The file was modifiedllvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/wqm.mir
Commit 30c0d5b4c3f89efef8f79c47fd892d06432d87b1 by ron.lieberman
[OPENMP][AMDGCN] Improvements to print_kernel_trace (bit mask)

allow bit masking to select various trace features.
  bit 0 => Launch tracing           (stderr)
  bit 1 => timing of runtime        (stdout)
  bit 2 => detailed launch tracing  (stderr)
  bit 3 => timing goes to stdout instead of stderr

  example: LIBOMPTARGET_KERNEL_TRACE=7     does it all
           LIBOMPTARGET_KERNEL_TRACE=5     Launch + details
           LIBOMPTARGET_KERNEL_TRACE=2     timings + launch to stderr
           LIBOMPTARGET_KERNEL_TRACE=10    timings + launch to stdout

Differential Revision: https://reviews.llvm.org/D96998
The file was addedopenmp/libomptarget/plugins/amdgpu/src/print_tracing.h
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Commit 53367b8fe113d404a4adccbe61b45cae68576e1a by pifon
[mlir][nfc] Fix indentation in LinalgOps.td.
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
Commit ac065b7a37d6dd8daacd526f6c3a0d1563bc88ac by nikita.ppv
[LLD] Fix tests after D96993

We now need mustprogress to eliminate these calls. The code doesn't
really make sense, but that's not the point of the test...
The file was modifiedlld/test/wasm/lto/parallel.ll
The file was modifiedlld/test/ELF/lto/parallel.ll
Commit d9531a3097559891a4bfa4f3c2e3bba9abc2d43b by fraser
[RISCV] Address some clang-tidy warnings. NFCI.
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit 3b7580951c1ce7e3a0c7b09d0dbbc0f90d3c9cb7 by thakis
[gn build] Port 1a2b3536efef
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Transforms/Utils/BUILD.gn
Commit c1664c5a27a3218e084ca34280a6d6a2faa27659 by llvm-dev
[X86][SSE] Add tests for trunc(usubsat()) patterns.
The file was modifiedllvm/test/CodeGen/X86/combine-sub-usat.ll
Commit 6329ce75da7a44c40d4406bf48ffffe973ef5fdb by kadircet
[clangd] Expose absoluteParent helper

Will be used in other components that need ancestor traversal.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D96123
The file was modifiedclang-tools-extra/clangd/ConfigProvider.cpp
The file was modifiedclang-tools-extra/clangd/GlobalCompilationDatabase.cpp
The file was modifiedclang-tools-extra/clangd/TidyProvider.cpp
The file was modifiedclang-tools-extra/clangd/support/Path.cpp
The file was modifiedclang-tools-extra/clangd/support/Path.h