SuccessChanges

Summary

  1. [MLIR] Fix genTypeInterfaceMethods() to work correctly with InferTypeOpInterface (details)
  2. [LLD][ELF][NewPM] Add option to force legacy PM (details)
  3. [libc++] NFC: Remove unused macros in <__config> (details)
  4. Reland [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/ (details)
  5. [OpenMP51][DOCS] Claim "add present modifier in defaultmap clause", NFC. (details)
  6. RegisterInfoPOSIX_arm64 remove unused bytes from g/G packet (details)
  7. Make offset field optional in RegisterInfo packet for Arm64 (details)
  8. [lldb] [test] Reenable two passing tests on FreeBSD (details)
  9. Revert "[FastISel] Flush local value map on ever instruction" and dependent patches (details)
  10. [lld-macho] Extend PIE option handling (details)
  11. Avoid redundant inline with LLVM_ATTRIBUTE_ALWAYS_INLINE (details)
  12. [ms] [llvm-ml] Introduce command-line compatibility for ml.exe and ml64.exe (details)
  13. [libc++abi] Don't try calling __libcpp_aligned_free when aligned allocation is disabled (details)
  14. [lld][WebAssembly] Feedback from D92038. NFC (details)
  15. [clang-format] Add new option PenaltyIndentedWhitespace (details)
  16. [gn build] (manually) port 8fee2ee9a68 (details)
  17. [lld-macho] Emit STABS symbols for debugging, and drop debug sections (details)
  18. [lld-macho] Emit local symbols in symtab; record metadata in LC_DYSYMTAB (details)
  19. [lld-macho] Emit empty string as first entry of string table (details)
  20. [lld-macho] Add archive name and file modtime to STABS output (details)
  21. [lld-macho] Flesh out STABS implementation (details)
  22. [lld-macho] Add isCodeSection() (details)
  23. [mlir][PDL] Add support for PDL bytecode and expose PDL support to OwningRewritePatternList (details)
  24. [ms] [llvm-ml] Support command-line defines (details)
  25. [gn build] Manually port 8fee2ee9 (details)
  26. [gn build] Format all gn files (details)
  27. [gn build] Port 3fcb0eeb152 (details)
Commit 6b043ecdb71bb0354cbd64d766cc21b7d20dca84 by jurahul
[MLIR] Fix genTypeInterfaceMethods() to work correctly with InferTypeOpInterface

- Change InferTypeOpInterface::inferResultTypes to use fully qualified types matching
  the ones generated by genTypeInterfaceMethods, so the redundancy can be detected.
- Move genTypeInterfaceMethods() before genOpInterfaceMethods() so that the
  inferResultTypes method generated by genTypeInterfaceMethods() takes precedence
  over the declaration that might be generated by genOpInterfaceMethods()
- Modified an op in the test dialect to exercise this (the modified op would fail to
  generate valid C++ code due to duplicate inferResultTypes methods).

Differential Revision: https://reviews.llvm.org/D92414
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/include/mlir/Interfaces/InferTypeOpInterface.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit 99d82412f822190a6caa3e3a5b9f87b71f56de47 by aeubanks
[LLD][ELF][NewPM] Add option to force legacy PM

In preparation for the NPM switch.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D92417
The file was modifiedlld/test/ELF/lto/new-pass-manager.ll
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/ELF/Options.td
Commit 2671fccf0381769276ca8246ec0499adcb9b0355 by Louis Dionne
[libc++] NFC: Remove unused macros in <__config>
The file was modifiedlibcxx/include/__config
Commit aafb3662103f4b3df315967c0cf4f6eec6bff0c4 by aeubanks
Reland [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

This allows us to use its value everywhere, rather than just clang. Some
other places, like opt and lld, will use its value soon.

Rename it internally to LLVM_ENABLE_NEW_PASS_MANAGER.

The #define for it is now in llvm-config.h.

The initial land accidentally set the value of
LLVM_ENABLE_NEW_PASS_MANAGER to the string
ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER instead of its value.

Reviewed By: rnk, hans

Differential Revision: https://reviews.llvm.org/D92072
The file was modifiedclang/CMakeLists.txt
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedllvm/utils/gn/secondary/clang/test/BUILD.gn
The file was modifiedclang/include/clang/Config/config.h.cmake
The file was modifiedclang/test/lit.site.cfg.py.in
The file was modifiedllvm/CMakeLists.txt
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedllvm/include/llvm/Config/llvm-config.h.cmake
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn
The file was modifiedclang/test/CMakeLists.txt
Commit 1b8ed1d03dee63fd0b787ab52d0b195df9c35b9c by cchen
[OpenMP51][DOCS] Claim "add present modifier in defaultmap clause", NFC.
The file was modifiedclang/docs/OpenMPSupport.rst
Commit 26b8ea2e3782890be96612701866d8ccec616bdc by omair.javaid
RegisterInfoPOSIX_arm64 remove unused bytes from g/G packet

This came up while putting together our new strategy to create g/G packets
in compliance with GDB RSP protocol where register offsets are calculated in
increasing order of register numbers without any unused spacing.

RegisterInfoPOSIX_arm64::GPR size was being calculated after alignment
correction to 8 bytes which meant there was a 4 bytes unused space between
last gpr (cpsr) and first vector register V. We have put LLVM_PACKED_START
decorator on RegisterInfoPOSIX_arm64::GPR to make sure single byte
alignment is enforced. Moreover we are now doing to use arm64 user_pt_regs
struct defined in ptrace.h for accessing ptrace user registers.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D92063
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
Commit 78cb4562faa7315fff030593bc6bca4dc033f803 by omair.javaid
Make offset field optional in RegisterInfo packet for Arm64

This patch carries forward our aim to remove offset field from qRegisterInfo
packets and XML register description. I have created a new function which
returns if offset fields are dynamic meaning client can calculate offset on
its own based on register number sequence and register size. For now this
function only returns true for NativeRegisterContextLinux_arm64 but we can
test this for other architectures and make it standard later.

As a consequence we do not send offset field from lldb-server (arm64 for now)
while other stubs dont have an offset field so it wont effect them for now.
On the client side we have replaced previous offset calculation algorithm
with a new scheme, where we sort all primary registers in increasing
order of remote regnum and then calculate offset incrementally.

This committ also includes a test to verify all of above functionality
on Arm64.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D91241
The file was modifiedlldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
The file was modifiedlldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
The file was modifiedlldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
The file was addedlldb/test/API/functionalities/gdb_remote_client/TestAArch64XMLRegOffsets.py
The file was modifiedlldb/unittests/tools/lldb-server/tests/TestClient.cpp
The file was modifiedlldb/include/lldb/Host/common/NativeRegisterContext.h
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Commit e1f613ce3c61d0664fd3cff663f290cf1c2b9696 by mgorny
[lldb] [test] Reenable two passing tests on FreeBSD

[Reenable TestReproducerAttach and TestThreadSpecificBpPlusCondition
on FreeBSD -- both seem to pass correctly now.
The file was modifiedlldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
The file was modifiedlldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py
Commit 615f63e149f31d6a97b5233b4fe634db92e19aa9 by dblaikie
Revert "[FastISel] Flush local value map on ever instruction" and dependent patches

This reverts commit cf1c774d6ace59c5adc9ab71b31e762c1be695b1.

This change caused several regressions in the gdb test suite - at least
a sample of which was due to line zero instructions making breakpoints
un-lined. I think they're worth investigating/understanding more (&
possibly addressing) before moving forward with this change.

Revert "[FastISel] NFC: Clean up unnecessary bookkeeping"
This reverts commit 3fd39d3694d32efa44242c099e923a7f4d982095.

Revert "[FastISel] NFC: Remove obsolete -fast-isel-sink-local-values option"
This reverts commit a474657e30edccd9e175d92bddeefcfa544751b2.

Revert "Remove static function unused after cf1c774."
This reverts commit dc35368ccf17a7dca0874ace7490cc3836fb063f.

Revert "[lldb] Fix TestThreadStepOut.py after "Flush local value map on every instruction""
This reverts commit 53a14a47ee89dadb8798ca8ed19848f33f4551d5.
The file was modifiedllvm/test/DebugInfo/X86/prologue-stack.ll
The file was modifiedlld/test/wasm/debug-removed-fn.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-elf-globals.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/logopm.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/fastalloca.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fast-isel-intrinsic.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/callabi.ll
The file was modifiedllvm/test/CodeGen/X86/atomic64.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-13.ll
The file was modifiedllvm/test/CodeGen/X86/avx512-mask-zext-bugfix.ll
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-6.ll
The file was modifiedllvm/test/DebugInfo/Mips/delay-slot.ll
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-call.ll
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-intrinsic.ll
The file was modifiedllvm/test/CodeGen/X86/lvi-hardening-loads.ll
The file was modifiedllvm/test/CodeGen/ARM/swifterror.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/overflt.ll
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-vararg.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/simplestore.ll
The file was modifiedllvm/test/CodeGen/X86/volatile.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fast-isel-gv.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll
The file was modifiedllvm/test/CodeGen/X86/fast-isel-mem.ll
The file was modifiedllvm/include/llvm/CodeGen/FastISel.h
The file was modifiedllvm/test/CodeGen/X86/pr44749.ll
The file was modifiedllvm/test/CodeGen/X86/atomic-unordered.ll
The file was modifiedllvm/test/CodeGen/X86/sink-local-value.ll
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/load-pdb.cpp
The file was modifiedllvm/test/CodeGen/X86/membarrier.ll
The file was modifiedllvm/test/CodeGen/X86/pr32241.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fast-isel.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/icmpa.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fast-isel-call.ll
The file was modifiedllvm/test/CodeGen/X86/pr32284.ll
The file was modifiedllvm/test/CodeGen/AArch64/large-stack.ll
The file was modifiedllvm/test/CodeGen/X86/inreg.ll
The file was modifiedllvm/test/CodeGen/AArch64/swifterror.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/simplestorei.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/shftopm.ll
The file was modifiedllvm/test/CodeGen/X86/pr32345.ll
The file was modifiedllvm/test/DebugInfo/X86/fission-ranges.ll
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-9.ll
The file was modifiedllvm/test/CodeGen/Mips/emergency-spill-slot-near-fp.ll
The file was modifiedlldb/test/API/functionalities/thread/step_out/main.cpp
The file was modifiedllvm/test/CodeGen/X86/bmi-intrinsics-fast-isel.ll
The file was modifiedllvm/test/CodeGen/X86/pr32484.ll
The file was modifiedllvm/test/CodeGen/X86/pr32340.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-2.ll
The file was modifiedllvm/test/CodeGen/X86/fast-isel-select.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-1.ll
The file was modifiedllvm/test/DebugInfo/COFF/lines-bb-start.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FastISel.cpp
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-ldr-str-thumb-neg-index.ll
The file was modifiedlldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py
The file was modifiedllvm/test/CodeGen/X86/sse-intrinsics-fast-isel.ll
The file was modifiedllvm/test/CodeGen/X86/fast-isel-call-cleanup.ll
The file was modifiedllvm/test/CodeGen/X86/crash-O0.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-3.ll
The file was modifiedllvm/test/CodeGen/Mips/Fast-ISel/fpcmpa.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-abi_align.ll
The file was modifiedllvm/test/CodeGen/ARM/fast-isel.ll
The file was modifiedllvm/test/CodeGen/PowerPC/elf-common.ll
The file was modifiedllvm/test/CodeGen/PowerPC/fast-isel-load-store.ll
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-select.ll
The file was modifiedllvm/test/CodeGen/AArch64/cfguard-checks.ll
The file was modifiedllvm/test/CodeGen/X86/pr32256.ll
The file was addedllvm/test/CodeGen/X86/fast-isel-constant.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mcm-default.ll
Commit 6b3eecd22ab2afd16be412d19eed0e01f10e6cc8 by jezng
[lld-macho] Extend PIE option handling

* Enable PIE by default if targeting 10.6 or above on x86-64. (The
  manpage says 10.7, but that actually applies only to i386, and in
  general varies based on the target platform. I didn't update the
  manpage because listing all the different behaviors would make for a
  pretty long description.)
* Add support for `-no_pie`
* Remove `HelpHidden` from `-pie`

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D92362
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/test/MachO/x86-64-reloc-unsigned.s
Commit 78b0ec3d1c5cc198093bb03ecb86bca25fe570ca by dblaikie
Avoid redundant inline with LLVM_ATTRIBUTE_ALWAYS_INLINE

Fix MSVC warning when __forceinline is paired with inline.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D85264
The file was modifiedllvm/include/llvm/Support/Compiler.h
The file was modifiedllvm/include/llvm/IR/User.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit 8fee2ee9a689276eaea61d4c3f124aa80a81b6f7 by epastor
[ms] [llvm-ml] Introduce command-line compatibility for ml.exe and ml64.exe

Switch to OptParser for command-line handling

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D90058
The file was addedllvm/test/tools/llvm-ml/named_operators.asm
The file was addedllvm/test/tools/llvm-ml/struct_alignment.asm
The file was addedllvm/test/tools/llvm-ml/proc.asm
The file was addedllvm/test/tools/llvm-ml/radix.asm
The file was removedllvm/test/tools/llvm-ml/struct_alignment.test
The file was addedllvm/test/tools/llvm-ml/macro.asm
The file was addedllvm/test/tools/llvm-ml/struct.asm
The file was addedllvm/test/tools/llvm-ml/alias.asm
The file was removedllvm/test/tools/llvm-ml/struct.test
The file was addedllvm/test/tools/llvm-ml/variable.asm
The file was removedllvm/test/tools/llvm-ml/expansion.test
The file was addedllvm/test/tools/llvm-ml/size_inference.asm
The file was removedllvm/test/tools/llvm-ml/basic_data.test
The file was removedllvm/test/tools/llvm-ml/macro.test
The file was addedllvm/tools/llvm-ml/Opts.td
The file was removedllvm/test/tools/llvm-ml/alias_errors.test
The file was removedllvm/test/tools/llvm-ml/type_operators.test
The file was modifiedllvm/test/tools/llvm-ml/basic.test
The file was removedllvm/test/tools/llvm-ml/struct_errors.test
The file was addedllvm/test/tools/llvm-ml/run.asm
The file was addedllvm/test/tools/llvm-ml/strings_errors.asm
The file was addedllvm/test/tools/llvm-ml/line_continuations.asm
The file was removedllvm/test/tools/llvm-ml/run.test
The file was removedllvm/test/tools/llvm-ml/alias.test
The file was modifiedllvm/tools/llvm-ml/CMakeLists.txt
The file was removedllvm/test/tools/llvm-ml/builtin_types.test
The file was removedllvm/test/tools/llvm-ml/feat00.test
The file was removedllvm/test/tools/llvm-ml/repeat_directives.test
The file was removedllvm/test/tools/llvm-ml/strings_errors.test
The file was addedllvm/test/tools/llvm-ml/feat00.asm
The file was removedllvm/test/tools/llvm-ml/variable.test
The file was addedllvm/test/tools/llvm-ml/proc_frame.asm
The file was removedllvm/test/tools/llvm-ml/radix_errors.test
The file was addedllvm/test/tools/llvm-ml/radix_errors.asm
The file was addedllvm/test/tools/llvm-ml/basic_data.asm
The file was removedllvm/test/tools/llvm-ml/named_operators.test
The file was removedllvm/test/tools/llvm-ml/line_continuations.test
The file was removedllvm/test/tools/llvm-ml/macro_errors.test
The file was addedllvm/test/tools/llvm-ml/struct_errors.asm
The file was removedllvm/test/tools/llvm-ml/proc.test
The file was modifiedllvm/tools/llvm-ml/llvm-ml.cpp
The file was removedllvm/test/tools/llvm-ml/dot_operator.test
The file was addedllvm/test/tools/llvm-ml/dot_operator.asm
The file was removedllvm/test/tools/llvm-ml/macro_function.test
The file was addedllvm/test/tools/llvm-ml/macro_function.asm
The file was addedllvm/test/tools/llvm-ml/expansion.asm
The file was removedllvm/test/tools/llvm-ml/rip-relative-addressing.test
The file was addedllvm/test/tools/llvm-ml/macro_errors.asm
The file was removedllvm/test/tools/llvm-ml/strings.test
The file was modifiedllvm/test/tools/llvm-ml/lit.local.cfg
The file was addedllvm/test/tools/llvm-ml/builtin_types.asm
The file was removedllvm/test/tools/llvm-ml/size_inference.test
The file was addedllvm/test/tools/llvm-ml/strings.asm
The file was addedllvm/test/tools/llvm-ml/alias_errors.asm
The file was addedllvm/test/tools/llvm-ml/feat00_override.asm
The file was removedllvm/test/tools/llvm-ml/proc_frame.test
The file was addedllvm/test/tools/llvm-ml/rip-relative-addressing.asm
The file was removedllvm/test/tools/llvm-ml/feat00_override.test
The file was removedllvm/test/tools/llvm-ml/radix.test
The file was addedllvm/test/tools/llvm-ml/type_operators.asm
The file was addedllvm/test/tools/llvm-ml/repeat_directives.asm
Commit d67e58f23a8232ee17dba3cd8c5b4c1378ddbc59 by Louis Dionne
[libc++abi] Don't try calling __libcpp_aligned_free when aligned allocation is disabled

See https://reviews.llvm.org/rGa78aaa1ad512#962077 for details.
The file was modifiedlibcxxabi/src/fallback_malloc.cpp
Commit a38ed62ea803a41c2e1f3fa12edbc176e474056f by sbc
[lld][WebAssembly] Feedback from D92038. NFC

Differential Revision: https://reviews.llvm.org/D92429
The file was modifiedlld/wasm/Symbols.h
The file was modifiedlld/test/wasm/weak-undefined-pic.s
Commit 1e4d6d1c1ff3f5a4d6e7dda053386ff411fd7de4 by mark.nauwelaerts
[clang-format] Add new option PenaltyIndentedWhitespace

Reviewed By: MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D90534
The file was modifiedclang/lib/Format/ContinuationIndenter.cpp
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/include/clang/Format/Format.h
Commit ba4e45a0aa6596e156b27a620281d7befc5297fc by thakis
[gn build] (manually) port 8fee2ee9a68
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
Commit 3fcb0eeb152beb4320c7632bcfa2b1e7c2e5ca00 by jezng
[lld-macho] Emit STABS symbols for debugging, and drop debug sections

Debug sections contain a large amount of data. In order not to bloat the size
of the final binary, we remove them and instead emit STABS symbols for
`dsymutil` and the debugger to locate their contents in the object files.

With this diff, `dsymutil` is able to locate the debug info. However, we need
a few more features before `lldb` is able to work well with our binaries --
e.g. having `LC_DYSYMTAB` accurately reflect the number of local symbols,
emitting `LC_UUID`, and more. Those will be handled in follow-up diffs.

Note also that the STABS we emit differ slightly from what ld64 does. First, we
emit the path to the source file as one `N_SO` symbol instead of two. (`ld64`
emits one `N_SO` for the dirname and one of the basename.) Second, we do not
emit `N_BNSYM` and `N_ENSYM` STABS to mark the start and end of functions,
because the `N_FUN` STABS already serve that purpose. @clayborg recommended
these changes based on his knowledge of what the debugging tools look for.

Additionally, this current implementation doesn't accurately reflect the size
of function symbols. It uses the size of their containing sectioins as a proxy,
but that is only accurate if `.subsections_with_symbols` is set, and if there
isn't an `N_ALT_ENTRY` in that particular subsection. I think we have two
options to solve this:

1. We can split up subsections by symbol even if `.subsections_with_symbols`
   is not set, but include constraints to ensure those subsections retain
   their order in the final output. This is `ld64`'s approach.
2. We could just add a `size` field to our `Symbol` class. This seems simpler,
   and I'm more inclined toward it, but I'm not sure if there are use cases
   that it doesn't handle well. As such I'm punting on the decision for now.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D89257
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/CMakeLists.txt
The file was addedlld/MachO/Dwarf.cpp
The file was modifiedlld/MachO/OutputSegment.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/InputFiles.h
The file was addedlld/test/MachO/stabs.s
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was addedlld/MachO/Dwarf.h
The file was modifiedlld/MachO/InputFiles.cpp
Commit 51629abce0e2f9d1376eb0b5070532a2bbec6766 by jezng
[lld-macho] Emit local symbols in symtab; record metadata in LC_DYSYMTAB

Symbols of the same type must be laid out contiguously: following ld64's
lead, we choose to emit all local symbols first, then external symbols,
and finally undefined symbols. For each symbol type, the LC_DYSYMTAB
load command will record the range (start index and total number) of
those symbols in the symbol table.

This work was motivated by the fact that LLDB won't search for debug
info if LC_DYSYMTAB says there are no local symbols (since STABS symbols
are all local symbols). With this change, LLDB is now able to display
the source lines at a given breakpoint when debugging our binaries.

Some tests had to be updated due to local symbol names now appearing in
`llvm-objdump`'s output.

Reviewed By: #lld-macho, smeenai, clayborg

Differential Revision: https://reviews.llvm.org/D89285
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/test/MachO/symtab.s
The file was modifiedlld/test/MachO/tlv.s
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/test/MachO/stabs.s
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/test/MachO/subsections-symbol-relocs.s
Commit d0c4be42e35d8cff069f91a45b76ea24187c233d by jezng
[lld-macho] Emit empty string as first entry of string table

ld64 emits string tables which start with a space and a zero byte. We
match its behavior here since some tools depend on it.

Similar rationale as {D89561}.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D89639
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/test/MachO/symtab.s
Commit b768d57b368781e6737c403e425bd835850f3a0a by jezng
[lld-macho] Add archive name and file modtime to STABS output

We should also set the modtime when running LTO. That will be done in a
future diff, together with support for the `-object_path_lto` flag.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D91318
The file was modifiedlld/MachO/LTO.cpp
The file was modifiedlld/MachO/Driver.h
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/test/MachO/stabs.s
The file was modifiedlld/MachO/InputFiles.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/InputFiles.cpp
Commit 78f6498cdcdb5a7644b1c32615cfe2fdfd9c2545 by jezng
[lld-macho] Flesh out STABS implementation

This addresses a lot of the comments in {D89257}. Ideally it'd have been
done in the same diff, but the commits in between make that difficult.

This diff implements:
* N_GSYM and N_STSYM, the STABS for global and static symbols
* Has the STABS reflect the section IDs of their referent symbols
* Ensures we don't fail when encountering absolute symbols or files with
  no debug info
* Sorts STABS symbols by file to minimize the number of N_OSO entries

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D92366
The file was modifiedlld/MachO/InputFiles.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/test/MachO/stabs.s
Commit c7dbaec396ef98b8bc6acb7631d2919449986add by jezng
[lld-macho] Add isCodeSection()

This is the same logic that ld64 uses to determine which sections
contain functions. This was added so that we could determine which
STABS entries should be N_FUN.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D92430
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/test/MachO/stabs.s
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit abfd1a8b3bc5ad8516a83c3ae7ba9f16032525ad by riddleriver
[mlir][PDL] Add support for PDL bytecode and expose PDL support to OwningRewritePatternList

PDL patterns are now supported via a new `PDLPatternModule` class. This class contains a ModuleOp with the pdl::PatternOp operations representing the patterns, as well as a collection of registered C++ functions for native constraints/creations/rewrites/etc. that may be invoked via the pdl patterns. Instances of this class are added to an OwningRewritePatternList in the same fashion as C++ RewritePatterns, i.e. via the `insert` method.

The PDL bytecode is an in-memory representation of the PDL interpreter dialect that can be efficiently interpreted/executed. The representation of the bytecode boils down to a code array(for opcodes/memory locations/etc) and a memory buffer(for storing attributes/operations/values/any other data necessary). The bytecode operations are effectively a 1-1 mapping to the PDLInterp dialect operations, with a few exceptions in cases where the in-memory representation of the bytecode can be more efficient than the MLIR representation. For example, a generic `AreEqual` bytecode op can be used to represent AreEqualOp, CheckAttributeOp, and CheckTypeOp.

The execution of the bytecode is split into two phases: matching and rewriting. When matching, all of the matched patterns are collected to avoid the overhead of re-running parts of the matcher. These matched patterns are then considered alongside the native C++ patterns, which rewrite immediately in-place via `RewritePattern::matchAndRewrite`,  for the given root operation. When a PDL pattern is matched and has the highest benefit, it is passed back to the bytecode to execute its rewriter.

Differential Revision: https://reviews.llvm.org/D89107
The file was modifiedmlir/lib/Rewrite/FrozenRewritePatternList.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/lib/Rewrite/CMakeLists.txt
The file was addedmlir/test/lib/Rewrite/CMakeLists.txt
The file was addedmlir/test/lib/Rewrite/TestPDLByteCode.cpp
The file was modifiedmlir/include/mlir/Rewrite/FrozenRewritePatternList.h
The file was modifiedmlir/test/lib/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/BlockSupport.h
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was addedmlir/lib/Rewrite/ByteCode.h
The file was addedmlir/test/Rewrite/pdl-bytecode.mlir
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
The file was modifiedmlir/lib/Rewrite/PatternApplicator.cpp
The file was modifiedmlir/include/mlir/IR/Operation.h
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/include/mlir/IR/StorageUniquerSupport.h
The file was modifiedmlir/lib/IR/PatternMatch.cpp
The file was addedmlir/lib/Rewrite/ByteCode.cpp
The file was modifiedmlir/lib/IR/Block.cpp
The file was modifiedmlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td
The file was modifiedmlir/include/mlir/Rewrite/PatternApplicator.h
Commit c64037b784aeae63b1863ee1abd5601c2c6a8102 by epastor
[ms] [llvm-ml] Support command-line defines

Enable command-line defines as textmacros

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D90059
The file was addedllvm/test/tools/llvm-ml/command_line_defines.asm
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/tools/llvm-ml/llvm-ml.cpp
The file was modifiedllvm/tools/llvm-ml/Opts.td
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmParser.h
Commit ea7b07187b273059d503b3b35539668d3c1f5412 by aeubanks
[gn build] Manually port 8fee2ee9
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
Commit ec13b391170e5984894e1c8635a6964e79572205 by aeubanks
[gn build] Format all gn files

$ git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
The file was modifiedllvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/concurrency/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/test/BUILD.gn
Commit e8b816ad19c728e1c8393df92d7e87b4bc9a38cc by llvmgnsyncbot
[gn build] Port 3fcb0eeb152
The file was modifiedllvm/utils/gn/secondary/lld/MachO/BUILD.gn