Changes

Summary

  1. Revert "profi - a flow-based profile inference algorithm: Part I (out of 3)" (details)
  2. [gn build] Port 1392b654ff65 (details)
  3. [mlir][tosa] Separate tosa.transpose_conv decomposition and added stride support (details)
  4. [mlir][tosa] Materialize tosa.pad value and fold noop pads (details)
  5. [InstSimplify] add tests for xor logic fold; NFC (details)
  6. [NFC][sanitizer] Move StackStore::Allocated into cpp file (details)
  7. [NFC][sanitizer] Early return for empty StackTraces (details)
  8. [lldb] Move create_relative_symlink function up in CMake hierarchy (details)
  9. [NFC][sanitizer] Add StackStoreTest (details)
  10. [SampleFDO] Recompute BFI if the sample loader changes BPI (details)
  11. [NFC][sanitizer] Extract StackTraceHeader struct (details)
  12. [NFC][sanitizer] Make method const (details)
  13. [InstSimplify] fold xor logic of 2 variables (details)
  14. Improve optional formatter (details)
  15. Make some libstd++ formatters safer (details)
  16. [formatters] Capping size limitation avoidance for the libcxx and libcpp bitset data formatters. (details)
  17. Move dependency llvm:AllTargetsAsmParsers from Translation to ExecutionEngine. (details)
  18. [formatters] List and forward_list capping_size determination and application (details)
  19. Fix a48501150b9ef64fd61d24f8cef2645237facc44 (details)
  20. [LAA] Move visitPointers up in file (NFC). (details)
  21. PrologEpilogInserter: Use explicit control for scavenge slot placement (details)
  22. [PowerPC] Allow scalars for asm constraint "v" with VSX (details)
  23. [sanitizer] Add DenseMap::forEach (details)
  24. [NFC][sanitizer] Reuse forEach for operator== (details)
  25. [stack-safety] Check SCEV constraints at memory instructions. (details)
  26. [hwasan] support python3 in hwasan_sanitize (details)
  27. [mlir][spirv] Add math to OpenCL conversion (details)
  28. [AMDGPU] Remove a no-op check in the gfx90a hazard recognizer (details)
Commit 1392b654ff6573ca2dba4101f72e990822539c7d by joker.eph
Revert "profi - a flow-based profile inference algorithm: Part I (out of 3)"

This reverts commit 884b6dd311422bbfac62b8a90fbfff8e77ba8121.
The windows build is broken with a linker error.
The file was modifiedllvm/lib/Transforms/Utils/CMakeLists.txt
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was removedllvm/test/Transforms/SampleProfile/profile-inference.ll
The file was removedllvm/test/Transforms/SampleProfile/Inputs/profile-inference.prof
The file was modifiedllvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
The file was removedllvm/lib/Transforms/Utils/SampleProfileInference.cpp
The file was modifiedllvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp
The file was removedllvm/include/llvm/Transforms/Utils/SampleProfileInference.h
Commit 44bb69b1e012bdc905aa679008ee7ed3d71061b1 by llvmgnsyncbot
[gn build] Port 1392b654ff65
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
Commit 54eec7cafc396f3d1444aacf4f1ed71fceb4e503 by rob.suderman
[mlir][tosa] Separate tosa.transpose_conv decomposition and added stride support

Transpose convolution decomposition is now performed in a separate pass. This
allows padding / constant propagation to be performed at the TOSA level. It
also adds support for striding when there is no dilation.

Differential Revision: https://reviews.llvm.org/D114409
The file was modifiedmlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
The file was modifiedmlir/include/mlir/Dialect/Tosa/Transforms/Passes.h
The file was modifiedmlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
The file was addedmlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
The file was addedmlir/test/Dialect/Tosa/tosa-decompose-transpose-conv.mlir
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
Commit 0f1e52afa92fd6b687f4d69203b72e99a9228edb by rob.suderman
[mlir][tosa] Materialize tosa.pad value and fold noop pads

Padding now can explicitly specify the padding value when non-zero is wanted.
This also includes bypassing pads when the pad does nothing.

Differential Revision: https://reviews.llvm.org/D113611
The file was modifiedmlir/lib/Dialect/Tosa/IR/TosaOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
The file was modifiedmlir/test/Dialect/Tosa/canonicalize.mlir
Commit 14d743457c3d5c8154644375bac1094481ab4eaf by spatel
[InstSimplify] add tests for xor logic fold; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/xor.ll
Commit cdc80a6017076daea28e62a9efb0b3d8a53d8fce by Vitaly Buka
[NFC][sanitizer] Move StackStore::Allocated into cpp file
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
Commit b80affb8a1494560c83c6d2bf1164ff8fe031401 by Vitaly Buka
[NFC][sanitizer] Early return for empty StackTraces

Current callers should filter them out anyway,
but with this patch we don't need rely on that assumption.
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
Commit b5a927b972b2c07b4597e93ed0b57803bfc0e6ae by dimitry
[lldb] Move create_relative_symlink function up in CMake hierarchy

Configuring lldb with `LLDB_ENABLE_PYTHON=OFF` and `LLDB_ENABLE_LUA=ON` results in a CMake error:

    CMake Error at lldb/bindings/lua/CMakeLists.txt:47 (create_relative_symlink):
      Unknown CMake command "create_relative_symlink".
    Call Stack (most recent call first):
      lldb/CMakeLists.txt:117 (finish_swig_lua)

This is because the CMake function `create_relative_symlink` only exists in `lldb/bindings/python/CMakeLists.txt`, and not in `lldb/bindings/lua/CMakeLists.txt`.

Move the function to `lldb/bindings/CMakeLists.txt`, so it is available for all language bindings.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D114465
The file was modifiedlldb/bindings/python/CMakeLists.txt
The file was modifiedlldb/bindings/CMakeLists.txt
Commit 67a1c45def8a75061203461ab0060c75c864df1c by Vitaly Buka
[NFC][sanitizer] Add StackStoreTest

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D114463
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
The file was addedcompiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp
Commit bf1138491a2ba12dce0c3ff2ad6a18f093428539 by xur
[SampleFDO] Recompute BFI if the sample loader changes BPI

The MIR sample loader changes the branch probability but not BFI.
Here we force a recompute of BFI if the branch probabilities are
changed.

Also register the MIR FSAFDO passes properly.

Differential Revision: https://reviews.llvm.org/D114400
The file was modifiedllvm/lib/CodeGen/MIRSampleProfile.cpp
The file was modifiedllvm/lib/CodeGen/CodeGen.cpp
The file was addedllvm/test/CodeGen/X86/fsafdo_test3.ll
Commit abd86619cf5e389995e8cb325ddb570d86a0715f by Vitaly Buka
[NFC][sanitizer] Extract StackTraceHeader struct
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
Commit b1a68b170c44e8d5298800a080444c0b82366e51 by Vitaly Buka
[NFC][sanitizer] Make method const
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
Commit 892648b18a8cc3b8a08528112adfa74bdd432f8b by spatel
[InstSimplify] fold xor logic of 2 variables

(a & b) ^ (~a | b) --> ~a

I was looking for a shortcut to reduce some of the complex logic
folds that are currently up for review (D113216
and others in that stack), and I found this missing from
instcombine/instsimplify.

There is a trade-off in putting it into instsimplify: because
we can't create new values here, we need a strict 'not' op (no
undef elements). Otherwise, the fold is not valid:
https://alive2.llvm.org/ce/z/k_AGGj

If this was in instcombine instead, we could create the proper
'not'. But having the fold here benefits other passes like GVN
that use instsimplify as an analysis.

There is a related fold where 'and' and 'or' are swapped, and
that is planned as a follow-up commit.

Differential Revision: https://reviews.llvm.org/D114462
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/xor.ll
Commit 4ba5da8e3d38f38ed7845c22baadd8908729c520 by walter erquinigo
Improve optional formatter

As suggested by @labath in https://reviews.llvm.org/D114403, we should
make the formatter more resilient to corrupted data. The Libcxx version
explicitly checks for engaged = 1, so we can do that as well for safety.

Differential Revision: https://reviews.llvm.org/D114450
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
The file was modifiedlldb/examples/synthetic/gnu_libstdcpp.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/optional/TestDataFormatterGenericOptional.py
Commit a48501150b9ef64fd61d24f8cef2645237facc44 by walter erquinigo
Make some libstd++ formatters safer

We need to add checks that ensure that some core variables are valid, so
that we avoid printing out garbage data. The worst that could happen is
that an non-initialized variable is being printed as something with
123123432 children instead of 0.

Differential Revision: https://reviews.llvm.org/D114458
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/bitset/TestDataFormatterGenericBitset.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/main.cpp
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/forward_list/TestDataFormatterGenericForwardList.py
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/main.cpp
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
The file was modifiedlldb/examples/synthetic/gnu_libstdcpp.py
Commit 193bf2e820520dd4a2d5ed0e7d50ee45e8127071 by walter erquinigo
[formatters] Capping size limitation avoidance for the libcxx and libcpp bitset data formatters.

This diff is avoiding the size limitation introduced by the capping size for the libcxx and libcpp bitset data formatters.

Reviewed By: wallace

Differential Revision: https://reviews.llvm.org/D114461
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/bitset/main.cpp
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/bitset/TestDataFormatterGenericBitset.py
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp
Commit 4961fcfbcf688e5cd9580578b1e4eadce1dfc42e by jurahul
Move dependency llvm:AllTargetsAsmParsers from Translation to ExecutionEngine.

- Fixes a minor issue in https://reviews.llvm.org/D114338, which seems incorrectly
  added the llvm:AllTargetsAsmParsers dependency to Translation in bazel build files.

Differential Revision: https://reviews.llvm.org/D114471
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 9a9d9a9b00af5b60514ab9ada09ba02dfb86945e by walter erquinigo
[formatters] List and forward_list capping_size determination and application

This diff is adding the capping_size determination for the list and forward list, to limit the number of children to be displayed. Also it modifies and unifies tests for libcxx and libstdcpp list data formatter.

Reviewed By: wallace

Differential Revision: https://reviews.llvm.org/D114433
The file was modifiedlldb/bindings/interface/SBTarget.i
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/Makefile
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/main.cpp
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/loop/main.cpp
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
The file was modifiedlldb/examples/synthetic/gnu_libstdcpp.py
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/main.cpp
The file was modifiedlldb/include/lldb/API/SBTarget.h
The file was modifiedlldb/source/API/SBTarget.cpp
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/loop/TestDataFormatterGenericListLoop.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/forward_list/TestDataFormatterGenericForwardList.py
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/forward_list/main.cpp
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
The file was removedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/loop/Makefile
Commit 877433ad453cd1bd77497ec47828074b6e010edb by walter erquinigo
Fix a48501150b9ef64fd61d24f8cef2645237facc44

Issue in https://lab.llvm.org/buildbot/#/builders/96/builds/14682.

Making the test deterministic.
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/main.cpp
Commit 73a05cc8dfa114e29cd4d463c77a5577571c8c56 by flo
[LAA] Move visitPointers up in file (NFC).

This allows easier re-use in earlier functions.
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
Commit 273a0c8bc9c774aa0d5982c23dc3d62b68ef4338 by Matthew.Arsenault
PrologEpilogInserter: Use explicit control for scavenge slot placement

AMDGPU is unusual in that the both stack is indexed in the same
direction as stack growth (up). We therefore always need the emergency
stack slots placed as low as possible to ensure they are in range of
load/store instruction immediate offsets. The existing logic is mostly
OK, but failed if we required stack realignment.

I don't understand what the existing control isFPCloseToIncomingSP is
supposed to mean, but can only be used to stop placing the scavenge
slots earlier. Make this explicit so that targets can opt-in rather
than opt-out only.
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr-carry-out.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/store-hi16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-frame-setup.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.h
The file was modifiedllvm/test/CodeGen/AMDGPU/load-hi16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-offset-calculation.ll
The file was modifiedllvm/lib/Target/SystemZ/SystemZFrameLowering.h
The file was modifiedllvm/lib/Target/Mips/MipsFrameLowering.h
The file was modifiedllvm/test/CodeGen/AMDGPU/load-lo16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-scavenge-vgpr-spill.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/flat-scratch.ll
The file was modifiedllvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetFrameLowering.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr-gfx9.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/need-fp-from-vgpr-spills.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr.mir
The file was modifiedllvm/lib/CodeGen/PrologEpilogInserter.cpp
Commit c9cb8edc519e4fa80b28fb4e0cc2bd8423742d21 by nemanja.i.ibm
[PowerPC] Allow scalars for asm constraint "v" with VSX

Similarly to what GCC does, we should allow scalars with
the "v" constraint rather than introducing unnecessary
new constraints for scalars in Altivec registers.

Differential revision: https://reviews.llvm.org/D113635
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was addedllvm/test/CodeGen/PowerPC/scalars-in-altivec-regs.ll
Commit 09256fe980ddc46be36ab4460ae1850aa46f094e by Vitaly Buka
[sanitizer] Add DenseMap::forEach
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_dense_map.h
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/sanitizer_dense_map_test.cpp
Commit 4058637f7ac6c0c44c90604b041dafa6b24e641b by Vitaly Buka
[NFC][sanitizer] Reuse forEach for operator==
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_dense_map.h
Commit 6c06d8e310bd926f8c9ed63118c38b28075f4de3 by fmayer
[stack-safety] Check SCEV constraints at memory instructions.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D113160
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/memintrin.ll
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/local.ll
Commit 26d1edfb105bdc857733c3bb8697a9f73828bde7 by fmayer
[hwasan] support python3 in hwasan_sanitize

Verified no diff exist between previous version, new version python 2, and python 3 for an example stack.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D114404
The file was modifiedcompiler-rt/lib/hwasan/scripts/hwasan_symbolize
Commit 75a1bee05db7ca4277cf93545834110409c75bc9 by ivan.butygin
[mlir][spirv] Add math to OpenCL conversion

Differential Revision: https://reviews.llvm.org/D113780
The file was modifiedmlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
The file was addedmlir/test/Conversion/MathToSPIRV/math-to-opencl-spirv.mlir
The file was modifiedmlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
The file was modifiedmlir/test/Target/SPIRV/ocl-ops.mlir
The file was modifiedmlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/IR/SPIRVOCLOps.td
The file was addedmlir/test/Conversion/MathToSPIRV/math-to-glsl-spirv.mlir
The file was removedmlir/test/Conversion/MathToSPIRV/math-to-spirv.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td
Commit 661a232e34845a89789c4d617b9c764eded002a1 by Stanislav.Mekhanoshin
[AMDGPU] Remove a no-op check in the gfx90a hazard recognizer

Also rename helper function accordingly.

Differential Revision: https://reviews.llvm.org/D114289
The file was modifiedllvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp