Changes

Summary

  1. [zorg] Hotfix for PPC64le MLIR build issue (details)
  2. Move QEMU LAM sanitizer images to env-defined folder. (details)
Commit 5a4757532b3e92a287cce159739e36717b7ab682 by unknown
[zorg] Hotfix for PPC64le MLIR build issue

The public builder for MLIR on Power currently has an
issue choosing the correct libc. This patch provides
a environment variable to guide CMake to the correct
one.

Differential Revision: https://reviews.llvm.org/D105144
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)
Commit 1d858a5f4de4ce3d1db328b7b2ad40d96353a06b by 31459023+hctim
Move QEMU LAM sanitizer images to env-defined folder.

Also add some nice debug info as to how to build the images yourself.
This also makes the bot selector define the build dir and the QEMU image
dir, rather than these being hardcoded on the script side (which non-bot
users will want to execute to repro the bot).
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_selector.py (diff)
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_qemu.sh (diff)

Summary

  1. [RISCV] Protect the SHL/SRA/SRL handlers in LowerOperation against being called for an illegal i32 shift amount. (details)
  2. [lldb] Skip TestPairFromStdModule for now (details)
  3. [Flang][test] Fix Windows buildbot after D104930. (details)
  4. [INSTCOMBINE] Transform reduction(shuffle V, poison, unique_mask) to reduction(V). (details)
  5. [ObjC][ARC] Don't add operand bundle clang.arc.attachedcall to a call if (details)
  6. [clang][PATCH][nfc] Refactor TargetInfo::adjust to pass DiagnosticsEngine to allow diagnostics on target-unsupported options (details)
  7. [Inline] prevent inlining on noprofile mismatch (details)
  8. [libc++] NFC: Fix return-by-const-value and pass-by-const-value typos (details)
  9. [lldb] Check for the mangled symbol name for objc_copyRealizedClassList_nolock (details)
  10. [LegalizeTypes][VE] Don't Expand BITREVERSE/BSWAP during type legalization promotion if they will be promoted for NVT in op legalization. (details)
  11. [OpaquePtr] Support forward references in textual IR (details)
  12. [NFC] clang-format on InlineCost.cpp and InlineAdvisor.h. (details)
  13. [llvm-objcopy][MachO] Support ARM64_RELOC_ADDEND (details)
  14. [SanitizerCoverage] Fix global type check with opaque pointers (details)
  15. [test] Change -t to --syms and -s to -S for llvm-readobj RUN lines (details)
  16. [NFC][compiler-rt][hwasan] Move GetCurrentThread to hwasan.cpp (details)
  17. [llvm-readobj] Make -s and -t match llvm-readelf (details)
  18. [NFC][compiler-rt][hwasan] Re-use ring buffer size calculation (details)
  19. [Clang] Add option to handle behaviour of vector bool/vector pixel. (details)
  20. [mlir][Linalg] Add a ComprehensiveModuleBufferizePass and support for CallOp analysis(9/n) (details)
  21. [mlir:Async] Add an async reference counting pass based on the user defined policy (details)
  22. [mlir:Async] Change async-parallel-for block size/count calculation (details)
  23. Revert D104488 and friends since it broke the windows bot (details)
  24. [mlir] Generare .cpp.inc files for dialects. (details)
  25. [dfsan] Expose dfsan_get_track_origins to get origin tracking status (details)
  26. [lldb] Fix globals-bss.cpp which was broken in https://reviews.llvm.org/D105055 (details)
  27. [libc] Allow target architecture independent configs (details)
  28. [libomptarget] [amdgpu] Fix default setting of max flat workgroup size (details)
  29. [lldb] Fix debug_loc.s which was broken after https://reviews.llvm.org/D103502 (details)
  30. [llvm-objcopy][MachO] Code cleanup (details)
  31. OpaquePtr: Support i32** with --force-opaque-pointers (details)
  32. [CodeGen] Stop creating fake FunctionDecls when generating IR for (details)
  33. Revert "GlobalISel: Use MMO helper for getting the size in bits" (details)
  34. CodeGen: Store LLT instead of uint64_t in MachineMemOperand (details)
  35. [Test] Regenerate test checks (NFC) (details)
  36. [OpaquePtr][BitcodeWriter] Handle attributes with types (details)
  37. Thread safety analysis: Always warn when dropping locks on back edges (details)
  38. Thread safety analysis: Rename parameters of ThreadSafetyAnalyzer::intersectAndWarn (NFC) (details)
  39. Change PathMappingList::FindFile to return an optional result (NFC) (details)
  40. Express PathMappingList::FindFile() in terms of PathMappingList::RemapPath() (details)
  41. Modernize Module::RemapFile to return an Optional (NFC) (details)
  42. Improve path remapping in cross-debugging scenarios (details)
  43. [libomptarget] [amdgpu] Change default number of teams per computation unit (details)
Commit 3b6dfa381edfc66864cfd6dbc2769ba645858120 by craig.topper
[RISCV] Protect the SHL/SRA/SRL handlers in LowerOperation against being called for an illegal i32 shift amount.

It seems it is possible for DAG combine to create a shl with an
i64 result type and an i32 shift amount. This is ok before type
legalization since the type don't need to match in SelectionDAG.
This results in type legalization calling LowerOperation to
legalize just the amount. We weren't expecting this so we
asserted for not finding a fixed vector shift.

To fix this, I've added a check for the fixed vector case and
returned SDValue() to get the default type legalizer. I've
factored all shifts together and added a fixed vector specific
handler to avoid repeating similar code for each in
LowerOperation.

The particular case I found was exposed by D104581, but the bad
shift is created after that patch triggers.
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/aext-to-sext.ll
Commit c00032321a6ae26f9c8056d024e262abf342631e by Raphael Isemann
[lldb] Skip TestPairFromStdModule for now

I didn't get around to fix this change and the original commit itself seems
fine, so this looks like an existing LLDB/Clang bug that was just uncovered
by this change. Skipping while I'm investigating.
The file was modifiedlldb/test/API/commands/expression/import-std-module/pair/TestPairFromStdModule.py
Commit 5d933c0b0c741767f2af8218d55581557903a254 by llvm-project
[Flang][test] Fix Windows buildbot after D104930.

Add

    REQUIRES: shell

to the unpack.f90 test that executes a UNIX shell script.
The file was modifiedflang/test/Semantics/unpack.f90
Commit 129ae515fba022353050e0f313b32595de9e4b39 by a.bataev
[INSTCOMBINE] Transform reduction(shuffle V, poison, unique_mask) to reduction(V).

After SLP + LTO we may have have reduction(shuffle V, poison,
mask). This can be simplified to just reduction(V) if the mask is only
for single vector and just all elements from this vector are permuted,
  without reusing, replacing with undefs and/or other values, etc.

Differential Revision: https://reviews.llvm.org/D105053
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/reduction-shufflevector.ll
Commit 952944c12c0aa917e97805e929b5cd4e40866f91 by Akira
[ObjC][ARC] Don't add operand bundle clang.arc.attachedcall to a call if
the call already has the operand bundle

This bug was causing the call to `replaceAllUsesWith` to crash because
the old call instruction and the new call instruction were the same.

rdar://74957948

Differential Revision: https://reviews.llvm.org/D97824
The file was modifiedclang/lib/CodeGen/CGObjC.cpp
The file was addedclang/test/CodeGenObjCXX/arc-rv-attr.mm
Commit aaba37187fda7f5a7fdc4c1e6129cbaaa1bbf709 by melanie.blower
[clang][PATCH][nfc] Refactor TargetInfo::adjust to pass DiagnosticsEngine to allow diagnostics on target-unsupported options

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D104729
The file was modifiedclang/lib/Frontend/ASTUnit.cpp
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedclang/tools/clang-import-test/clang-import-test.cpp
The file was modifiedclang/lib/Interpreter/Interpreter.cpp
The file was modifiedclang/lib/Basic/Targets/SPIR.h
The file was modifiedclang/lib/Basic/Targets/WebAssembly.cpp
The file was modifiedclang/include/clang/Basic/TargetInfo.h
The file was modifiedclang/lib/Basic/Targets/PPC.h
The file was modifiedclang/lib/Basic/Targets/AMDGPU.cpp
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
The file was modifiedclang/lib/Basic/Targets/AMDGPU.h
The file was modifiedclang/lib/Basic/Targets/WebAssembly.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
The file was modifiedclang/lib/Basic/TargetInfo.cpp
Commit 3999dcae5e763adceb2c3bc1dbc8f2c005c808ef by ndesaulniers
[Inline] prevent inlining on noprofile mismatch

Similar to
commit bc044a88ee3c ("[Inline] prevent inlining on stack protector mismatch")

The noprofile function attribute is meant to prevent compiler
instrumentation from being inserted into a function. Inlining may defeat
the developer's intent. If the caller and callee don't either BOTH have
the attribute or BOTH lack the attribute, suppress inline substitution.

This matches behavior being proposed in GCC:
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573511.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223

Add LangRef entry for noprofile fn attr, similar to text added in D93422
and D104944.

Reviewed By: MaskRay, melver, phosek

Differential Revision: https://reviews.llvm.org/D104810
The file was modifiedllvm/docs/LangRef.rst
The file was addedllvm/test/Transforms/Inline/inline_noprofile.ll
The file was modifiedllvm/include/llvm/IR/Attributes.td
Commit a562853a511b078912f3a9fccb4a27220ce75e9e by Louis Dionne
[libc++] NFC: Fix return-by-const-value and pass-by-const-value typos

While we can debate on the value of passing by const value, there is no
arguing that it's confusing to do so in some circumstances, such as when
marking a pointer parameter as being const (did you mean a pointer-to-const?).
This commit fixes a few issues along those lines.
The file was modifiedlibcxx/src/string.cpp
The file was modifiedlibcxx/include/vector
The file was modifiedlibcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
The file was modifiedlibcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
Commit 71be4db05bbdcc8a9bbe01f54cf273b530327ec7 by Jonas Devlieghere
[lldb] Check for the mangled symbol name for objc_copyRealizedClassList_nolock

When we check whether the Objective-C SPI is available, we need to check
for the mangled symbol name. Unlike `objc_copyRealizedClassList`, which
is C exported, the `nolock` variant is not.

Differential revision: https://reviews.llvm.org/D105136
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
Commit 913229983633cd4c19b9e5534018f9a42e274b30 by craig.topper
[LegalizeTypes][VE] Don't Expand BITREVERSE/BSWAP during type legalization promotion if they will be promoted for NVT in op legalization.

We were trying to expand these if they were going to be expanded
in op legalization so that we generated the minimum number of
operations. We failed to take into account that NVT could be
promoted to another legal type in op legalization.

Hoping this fixes the issue on the VE target reported as a follow
up to D96681. The check line changes were taken from before
1e46b6f4012399a2fef5fbbb4ed06fc919835414 so this patch does
appear to improve some cases that had previously regressed.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/test/CodeGen/VE/Scalar/bitreverse.ll
Commit f8aaec19e674c44bfffd2b31611ad1eecc4698bd by nikita.ppv
[OpaquePtr] Support forward references in textual IR

Currently, LLParser will create a Function/GlobalVariable forward
reference based on the desired pointer type and then modify it when
it is declared. With opaque pointers, we generally do not know the
correct type to use until we see the declaration.

Solve this by creating the forward reference with a dummy type, and
then performing a RAUW with the correct Function/GlobalVariable when
it is declared. The approach is adopted from
https://github.com/TNorthover/llvm-project/commit/b5b55963f62038319fa7a8b1b232226ba1d8ef3c.

This results in a change to the use list order, which is why we see
test changes on some module passes that are not stable under use list
reordering.

Differential Revision: https://reviews.llvm.org/D104950
The file was modifiedllvm/test/Transforms/FunctionSpecialization/function-specialization3.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/add-prototypes-conflict.ll
The file was modifiedllvm/test/Other/force-opaque-ptrs.ll
The file was modifiedllvm/lib/IR/AsmWriter.cpp
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/test/Transforms/LowerTypeTests/icall-branch-funnel.ll
The file was modifiedllvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-begin.ll
The file was modifiedllvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-end.ll
The file was modifiedllvm/test/Transforms/LowerTypeTests/function-weak.ll
The file was modifiedllvm/test/Transforms/Attributor/misc.ll
The file was modifiedllvm/test/Transforms/WholeProgramDevirt/branch-funnel.ll
The file was modifiedllvm/test/Transforms/FunctionSpecialization/function-specialization4.ll
The file was modifiedllvm/test/Transforms/OpenMP/parallel_deletion_remarks.ll
The file was modifiedllvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll
Commit 7b639f50959d046dbfe6b8d4aa9e1071594ca361 by jacobhegna
[NFC] clang-format on InlineCost.cpp and InlineAdvisor.h.
The file was modifiedllvm/lib/Analysis/InlineCost.cpp
The file was modifiedllvm/include/llvm/Analysis/InlineAdvisor.h
Commit 69937a8080bc4828f0b317cd54a03ed2704b661a by i
[llvm-objcopy][MachO] Support ARM64_RELOC_ADDEND

An ARM64_RELOC_ADDEND relocation reuses the symbol field for the addend value.
We should pass through such relocations.

Reviewed By: alexander-shaposhnikov

Differential Revision: https://reviews.llvm.org/D104967
The file was addedllvm/test/tools/llvm-objcopy/MachO/arm64-relocs.s
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOReader.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.h
Commit c4de78e91c9341b5b1abf927da15e0956a484b79 by nikita.ppv
[SanitizerCoverage] Fix global type check with opaque pointers

The code was previously relying on the fact that an incorrectly
typed global would result in the insertion of a BitCast constant
expression. With opaque pointers, this is no longer the case, so
we should check the type explicitly.
The file was modifiedllvm/test/Instrumentation/SanitizerCoverage/stack-depth-variable-declared-by-user.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
Commit a9854045f6b657ea1658d3518ac88b5eb45e2eeb by i
[test] Change -t to --syms and -s to -S for llvm-readobj RUN lines

-s and -t will be changed to improve consistency with llvm-readelf.
The inconsistency issue regularly contributes to confusion using the two tools.
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-relocs.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir
The file was modifiedllvm/test/MC/AMDGPU/elf-lds.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-gfx10.s
The file was modifiedllvm/test/CodeGen/AMDGPU/amdpal-elf.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa.ll
The file was modifiedllvm/test/MC/ELF/section-relro.ll
Commit c4a00ed85192b31b1fe9c5c3e94f96f826937825 by leonardchan
[NFC][compiler-rt][hwasan] Move GetCurrentThread to hwasan.cpp

We can reuse the same implementation for getting the current thread on fuchsia.

Differential Revision: https://reviews.llvm.org/D104824
The file was modifiedcompiler-rt/lib/hwasan/hwasan.cpp
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
Commit d4dcb55c7050fd908af2378fa551078d859d994f by i
[llvm-readobj] Make -s and -t match llvm-readelf

llvm-readobj is an internal testing tool for binary formats. Its output and
command line options do not need to be stable. It isn't supposed to be part of a
build process.

llvm-readelf was created as a user-facing utility and its interface intends to
be compatible with GNU readelf (unless there are good reasons not to).

The two tools have mostly compatible options. -s and -t are noticeable
exceptions due to history. I think the cost of keeping the inconsistency
overweighs the little history-compatible benefit and hinders transition from
cl::opt to OptTable, so let's change it.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105055
The file was modifiedllvm/test/tools/llvm-readobj/ELF/sections.test
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/test/tools/llvm-readobj/ELF/merged.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/symbols.test
The file was modifiedllvm/test/tools/llvm-readobj/basic.test
The file was modifiedllvm/docs/CommandGuide/llvm-readobj.rst
The file was modifiedllvm/tools/llvm-readobj/llvm-readobj.cpp
The file was modifiedllvm/test/tools/yaml2obj/ELF/duplicate-symbol-names.yaml
Commit 8e74668e96da5c38c7fabb1881a6510d6a09112d by leonardchan
[NFC][compiler-rt][hwasan] Re-use ring buffer size calculation

Users can call HwasanThreadList::GetRingBufferSize rather than RingBufferSize
to prevent having to do the calculation in RingBufferSize. This will be useful
for Fuchsia where we plan to initialize the stack ring buffer separately from
the rest of thread initialization.

Differential Revision: https://reviews.llvm.org/D104823
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread_list.h
Commit 90dfd059198ed94334f9b1ccfd29b566feb75e8b by stefanp
[Clang] Add option to handle behaviour of vector bool/vector pixel.

Added the option `-altivec-src-compat=[mixed,gcc,xl]`. The default at this time is `mixed`.

The default behavior for clang is for all vector compares to return a scalar unless the vectors being
compared are vector bool or vector pixel. In that case the compare returns a
vector. With the gcc case all vector compares return vectors and in the xl case
all vector compares return scalars.

This patch does not change the default behavior of clang.

This option will be used in future patches to implement behaviour compatibility for the vector bool/pixel types.

Reviewed By: bmahjour

Differential Revision: https://reviews.llvm.org/D103615
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was addedclang/test/CodeGen/vector-compat.c
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was addedclang/test/CodeGen/vector-compat-pixel-bool-ternary.c
The file was modifiedclang/include/clang/Driver/Options.td
The file was addedclang/test/CodeGen/vector-compat-pixel-bool.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was addedclang/test/CodeGen/vector-compat-ternary.c
Commit a77524cd2c20f4d0aa4ddd164f12f7af64b5bfc8 by nicolas.vasilache
[mlir][Linalg] Add a ComprehensiveModuleBufferizePass and support for CallOp analysis(9/n)

This revision adds the minimal plumbing to create a simple ComprehensiveModuleBufferizePass that can behave conservatively in the presence of CallOps.

A topological sort of caller/callee is performed and, if the call-graph is cycle-free, analysis can proceed.

Differential revision: https://reviews.llvm.org/D104859
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
The file was addedmlir/test/Dialect/Linalg/comprehensive-module-bufferize-analysis.mlir
The file was addedmlir/test/Dialect/Linalg/comprehensive-module-bufferize-invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
Commit f57b2420b2235eca00d5c085a7ef084433140452 by ezhulenev
[mlir:Async] Add an async reference counting pass based on the user defined policy

Depends On D104999

Automatic reference counting based on the liveness analysis can add a lot of reference counting overhead at runtime. If the IR is known to be constrained to few particular "shapes", it's much more efficient to provide a custom reference counting policy that will specify where it is required to update the async value reference count.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D105037
The file was addedmlir/test/Dialect/Async/async-runtime-policy-based-ref-counting.mlir
The file was modifiedmlir/include/mlir/Dialect/Async/Passes.h
The file was modifiedmlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
The file was modifiedmlir/include/mlir/Dialect/Async/Passes.td
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
Commit c1194c2ec35029f96ce75ab54555dccf2b7e8681 by ezhulenev
[mlir:Async] Change async-parallel-for block size/count calculation

Depends On D105037

Avoid creating too many tasks when the number of workers is large.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D105126
The file was modifiedmlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
Commit bb2cfca2f3237d7f722e95d4cab9f3d71f728c9c by stilis
Revert D104488 and friends since it broke the windows bot

Reverts commits:
"Fix failing tests after https://reviews.llvm.org/D104488."
"Fix buildbot failure after https://reviews.llvm.org/D104488."
"Create synthetic symbol names on demand to improve memory consumption and startup times."

This series of commits broke the windows lldb bot and then failed to fix all of the failing tests.
The file was modifiedlldb/source/Symbol/ObjectFile.cpp
The file was modifiedlldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
The file was modifiedlldb/test/Shell/ObjectFile/ELF/eh_frame-symbols.yaml
The file was modifiedlldb/include/lldb/Symbol/Symbol.h
The file was modifiedlldb/source/Symbol/Symbol.cpp
The file was modifiedlldb/test/Shell/SymbolFile/Breakpad/symtab.test
The file was modifiedlldb/include/lldb/Symbol/Symtab.h
The file was modifiedlldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
The file was modifiedlldb/source/Symbol/Symtab.cpp
The file was modifiedlldb/include/lldb/Symbol/ObjectFile.h
Commit 485cc55edfb875628e19bb6d9de4706af2865d3e by stellaraccident
[mlir] Generare .cpp.inc files for dialects.

* Previously, we were only generating .h.inc files. We foresee the need to also generate implementations and this is a step towards that.
* Discussed in https://llvm.discourse.group/t/generating-cpp-inc-files-for-dialects/3732/2
* Deviates from the discussion above by generating a default constructor in the .cpp.inc file (and adding a tablegen bit that disables this in case if this is user provided).
* Generating the destructor started as a way to flush out the missing includes (produces a link error), but it is a strict improvement on its own that is worth doing (i.e. by emitting key methods in the .cpp file, we root vtables in one translation unit, which is a non-controversial improvement).

Differential Revision: https://reviews.llvm.org/D105070
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/examples/toy/Ch4/include/toy/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/PDL/IR/PDL.cpp
The file was modifiedmlir/lib/Dialect/AMX/IR/AMXDialect.cpp
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/ArmNeon/IR/ArmNeonDialect.cpp
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/examples/toy/Ch7/include/toy/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch7/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
The file was modifiedmlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
The file was modifiedmlir/lib/Dialect/Quant/IR/QuantOps.cpp
The file was modifiedmlir/lib/Dialect/EmitC/IR/EmitC.cpp
The file was modifiedmlir/examples/standalone/lib/Standalone/StandaloneDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/OpenMP/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Math/IR/MathDialect.cpp
The file was modifiedmlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
The file was modifiedmlir/lib/Dialect/DLTI/DLTI.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp
The file was modifiedmlir/examples/toy/Ch5/include/toy/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/OpenACC/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Tosa/IR/TosaOps.cpp
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
The file was modifiedmlir/test/lib/Dialect/Test/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch3/include/toy/CMakeLists.txt
The file was modifiedmlir/cmake/modules/AddMLIR.cmake
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
The file was modifiedmlir/include/mlir/IR/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/lib/Dialect/Async/IR/Async.cpp
The file was modifiedutils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/examples/toy/Ch6/include/toy/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/lib/Dialect/X86Vector/IR/X86VectorDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineOps.cpp
The file was modifiedmlir/lib/IR/BuiltinDialect.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch2/include/toy/CMakeLists.txt
Commit ae6648cee01bc5c390b74dacd1851cf5df74599b by jianzhouzh
[dfsan] Expose dfsan_get_track_origins to get origin tracking status

This allows application code checks if origin tracking is on before
printing out traces.

-dfsan-track-origins can be 0,1,2.
The current code only distinguishes 1 and 2 in compile time, but not at runtime.
Made runtime distinguish 1 and 2 too.

Reviewed By: browneee

Differential Revision: https://reviews.llvm.org/D105128
The file was addedcompiler-rt/test/dfsan/dfsan_get_track_origins.c
The file was modifiedllvm/test/Instrumentation/DataFlowSanitizer/basic.ll
The file was modifiedcompiler-rt/lib/dfsan/done_abilist.txt
The file was modifiedcompiler-rt/include/sanitizer/dfsan_interface.h
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Commit 9952d591ccc49cbcbf9c89d5191e6111c44703a6 by stilis
[lldb] Fix globals-bss.cpp which was broken in https://reviews.llvm.org/D105055

-S replaced -s, so the test needs to be updated to use the new option
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
Commit 58af0d567d88eb5a7eec436886da066308d7a39e by sivachandra
[libc] Allow target architecture independent configs

Previously, we required entrypoints.txt for every target architecture
supported by a target OS. With this change, we allow architecture
independent config for a target OS. That is, if an architecture specific
entrypoints.txt is missing, then a generic entrypoints.txt for that
target OS will be used.

Reviewed By: caitlyncano

Differential Revision: https://reviews.llvm.org/D105147
The file was modifiedlibc/CMakeLists.txt
Commit 2240b41ee4f30fe938975677a0a5a2c5c26d271b by Dhruva.Chakrabarti
[libomptarget] [amdgpu] Fix default setting of max flat workgroup size

When max flat workgroup size is not specified, it is set to the default
workgroup size. This prevents kernel launch with a workgroup size larger
than the default. The fix is to ignore a size of 0 and treat it as
unspecified.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D105073
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Commit c8a9c78e170e3b972041b301a50d0456afe83d10 by stilis
[lldb] Fix debug_loc.s which was broken after https://reviews.llvm.org/D103502

An empty location is now printed as <empty>
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s
Commit 6d72845a8517eea6a69a493351fb4f03f3c10c21 by alexshap
[llvm-objcopy][MachO] Code cleanup

1. Remove unnecessary templates.
2. Fix potentially unaligned reads inside constructSection.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D105089
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOReader.cpp
Commit ac2bec5addd2f96e976242bc8e0d93725fe3d2fd by Duncan P. N. Exon Smith
OpaquePtr: Support i32** with --force-opaque-pointers

4506f614cb6983a16d117cf77a968608e66d7a5c fixed parsing of textual IR to
reject `ptr*`, but broke the auto-conversion of `i32**` to `ptr` with
`--force-opaque-pointers`.

Get that working again by refactoring LLParser::parseType to only send
`ptr`-spelled pointers into the type suffix logic when it's the return
of a function type. This also rejects `ptr addrspace(3) addrspace(2)`,
which 1e6303e60ca5af4fbe7ca728572fd65666a98271 invadvertently started
accepting. Just the default top-level error message for the
double-addrspace since I had trouble thinking of something nice;
probably it's fine as is (it doesn't look valid the way that `ptr*`
does).

Differential Revision: https://reviews.llvm.org/D105146
The file was modifiedllvm/test/Assembler/opaque-ptr.ll
The file was addedllvm/test/Assembler/invalid-opaque-ptr-double-addrspace.ll
The file was modifiedllvm/test/Other/force-opaque-ptrs.ll
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
Commit 8d21d5472501460933e78aead04cf59579025ba4 by Akira
[CodeGen] Stop creating fake FunctionDecls when generating IR for
functions implicitly generated by the compiler

These fake functions would cause clang to crash if the changes proposed
in https://reviews.llvm.org/D98799 were made.
The file was modifiedclang/lib/CodeGen/ItaniumCXXABI.cpp
The file was modifiedclang/test/CodeGenObjC/nontrivial-c-struct-exception.m
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/test/CodeGen/debug-info-oslog.c
The file was modifiedclang/lib/CodeGen/CGNonTrivialStruct.cpp
The file was modifiedclang/test/CodeGen/constructor-attribute.c
Commit 49fa6abf7472022d7bf1fb05df3033a7bd1ff0de by Matthew.Arsenault
Revert "GlobalISel: Use MMO helper for getting the size in bits"

This reverts commit dc98adfb448bdb845605185bb173e99614a17790.

This should still be done, but this is currently causing some commit
ordering issues.
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
Commit 990278d026d680942c859be70836ad34a9a716f7 by Matthew.Arsenault
CodeGen: Store LLT instead of uint64_t in MachineMemOperand

GlobalISel is relying on regular MachineMemOperands to track all of
the memory properties of accesses. Just the raw byte size is
insufficent to disambiguate all situations. For example, if we need to
split an unaligned extending load, we need to know the number of bits
in the original source value and can't infer it from the result
type. This is also a problem for extending vector loads.

This does decrease the maximum representable size from the full
uint64_t bytes to a maximum of 16-bits. No in tree testcases hit this,
other than places using UINT64_MAX for unknown sizes. This may be an
issue for G_MEMCPY and co., although they can just use unknown size
for large static sizes. This also has potential for backend abuse by
relying on the type when it really shouldn't be relevant after
selection.

This does not include the necessary MIR printer/parser changes to
represent this.
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/include/llvm/CodeGen/MachineMemOperand.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/udivrem.ll
The file was modifiedllvm/lib/CodeGen/MachineOperand.cpp
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMCallLowering.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
The file was modifiedllvm/lib/CodeGen/LowLevelType.cpp
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/sdivrem.ll
The file was modifiedllvm/include/llvm/Support/LowLevelTypeImpl.h
Commit b810600a93a1f426389ffe93c609af9b659a8430 by nikita.ppv
[Test] Regenerate test checks (NFC)

Make these follow the update_test_checks.py format.
The file was modifiedllvm/test/Other/force-opaque-ptrs.ll
Commit cb3580e7ad247dfdcf2ad279895f52bb73c4cee4 by aeubanks
[OpaquePtr][BitcodeWriter] Handle attributes with types

For example, byval.

Skip the type attribute auto-upgrade if we already have the type.

I've actually seen this error of the ValueEnumerator missing a type
attribute's type in a non-opaque pointer context.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D105138
The file was modifiedllvm/test/Assembler/opaque-ptr.ll
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/lib/Bitcode/Writer/ValueEnumerator.cpp
Commit f664e2ec371f61b69e11147d7f9e045083335917 by aaron.puchert
Thread safety analysis: Always warn when dropping locks on back edges

We allow branches to join where one holds a managed lock but the other
doesn't, but we can't do so for back edges: because there we can't drop
them from the lockset, as we have already analyzed the loop with the
larger lockset. So we can't allow dropping managed locks on back edges.

We move the managed() check from handleRemovalFromIntersection up to
intersectAndWarn, where we additionally check if we're on a back edge if
we're removing from the first lock set (the entry set of the next block)
but not if we're removing from the second lock set (the exit set of the
previous block). Now that the order of arguments matters, I had to swap
them in one invocation, which also causes some minor differences in the
tests.

Reviewed By: delesley

Differential Revision: https://reviews.llvm.org/D104261
The file was modifiedclang/test/SemaCXX/warn-thread-safety-analysis.cpp
The file was modifiedclang/lib/Analysis/ThreadSafety.cpp
Commit e0b90771c318625e51c34c67db3f3dfbbb686df8 by aaron.puchert
Thread safety analysis: Rename parameters of ThreadSafetyAnalyzer::intersectAndWarn (NFC)

In D104261 we made the parameters' meaning slightly more specific, this
changes their names accordingly. In all uses we're building a new lock
set by intersecting existing locksets. The first (modifiable) argument
is the new lock set being built, the second (non-modifiable) argument is
the exit set of a preceding block.

Reviewed By: aaron.ballman, delesley

Differential Revision: https://reviews.llvm.org/D104649
The file was modifiedclang/lib/Analysis/ThreadSafety.cpp
Commit a346372200e7b2b99631bd90691678d5ca03fdd1 by Adrian Prantl
Change PathMappingList::FindFile to return an optional result (NFC)

This is an NFC modernization refactoring that replaces the combination
of a bool return + reference argument, with an Optional return value.

Differential Revision: https://reviews.llvm.org/D104405
The file was modifiedlldb/include/lldb/Target/PathMappingList.h
The file was modifiedlldb/source/Target/PathMappingList.cpp
The file was modifiedlldb/source/Core/SourceManager.cpp
The file was modifiedlldb/source/Core/Module.cpp
The file was modifiedlldb/source/Symbol/LineEntry.cpp
Commit 302b1b97180907011aae610b9f51d4b9186c9821 by Adrian Prantl
Express PathMappingList::FindFile() in terms of PathMappingList::RemapPath()

NFC.

This patch replaces the function body FindFile() with a call to
RemapPath(), since the two functions implement the same functionality.

Differential Revision: https://reviews.llvm.org/D104406
The file was modifiedlldb/source/Target/PathMappingList.cpp
Commit a0e1b11fac7a1599faec21d13fae45c8571de02c by Adrian Prantl
Modernize Module::RemapFile to return an Optional (NFC)

This addresses feedback raised in https://reviews.llvm.org/D104404.

Differential Revision: https://reviews.llvm.org/D104724
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
The file was modifiedlldb/include/lldb/Core/Module.h
The file was modifiedlldb/source/Core/Module.cpp
Commit 21e013303bb7d0dbb9106283af0fb966fe45af42 by Adrian Prantl
Improve path remapping in cross-debugging scenarios

This patch implements a slight improvement when debugging across
platforms and remapping source paths that are in a non-native
format. See the unit test for examples.

rdar://79205675

Differential Revision: https://reviews.llvm.org/D104407
The file was modifiedlldb/unittests/Target/PathMappingListTest.cpp
The file was modifiedlldb/source/Target/PathMappingList.cpp
Commit e0b713a0357aa31ef906111115d4e881503e56ba by Dhruva.Chakrabarti
[libomptarget] [amdgpu] Change default number of teams per computation unit

This patch is related to https://reviews.llvm.org/D98832. Based on discussions there, I decided to separate out the teams default as this patch. This change is to increase the number of teams per computation unit so as to provide more wavefronts for hiding latency. This change improves performance for some programs, including 20-50% for some Stream benchmarks.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D99003
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp