Changes

Summary

  1. [DSE] Extra multiblock loop tests, NFC. (details)
  2. unwind: allow building with GCC (details)
  3. Fix misspelled instruction in X86 assembly parser (details)
  4. [ms] [llvm-ml] Fix capitalization of the ignored CPU directives (details)
  5. [ms] [llvm-ml] When parsing MASM, "jmp short" instructions are case insensitive (details)
  6. [lld-macho][nfc] Remove InputSection::outSecFileOff (details)
  7. [lld-macho][nfc] Represent the image loader cache with a ConcatInputSection (details)
  8. [lld-macho][nfc] Add `final` to classes where possible (details)
Commit 562593ff82f89961c2fb9cf89eb9524ec51425e9 by david.green
[DSE] Extra multiblock loop tests, NFC.

Some of these can be DSE'd, some of which cannot. Useful in D100464.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll
Commit e03be2efe564026ad3b04d459794c89c674e1ed9 by Saleem Abdulrasool
unwind: allow building with GCC

This was regressed in adf1561d6ce8.  Since gcc does not support
`__has_feature`, this adjusts the build to use the
`__SANITIZE_ADDRESS__` macro which GCC defines to identify if ASAN is
enabled (similar to `__has_feature`).  This allows building libunwind
with gcc again.

Patch by Daniel Levin!

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D104176
The file was modifiedlibunwind/src/libunwind.cpp
Commit 56edcbc2ad8c15b01fd8b47c1f2665d274d0e896 by epastor
Fix misspelled instruction in X86 assembly parser

Did not correctly handle "jecxz short <address>".

Discovered while working on LLVM-ML; shows up in z_Windows_NT-586_asm.asm from the OpenMP runtime

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104194
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/test/MC/X86/intel-syntax.s
Commit d81c059c3ed22e7f52eb995599e576abd30eb895 by epastor
[ms] [llvm-ml] Fix capitalization of the ignored CPU directives

These directives are matched in lowercase, so make sure to use lowercase for their P suffix.

Differential Revision: https://reviews.llvm.org/D104206
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
The file was addedllvm/test/tools/llvm-ml/ml32-context.asm
Commit f09e200b31f443d972f6723fb9d78638bb38b45c by epastor
[ms] [llvm-ml] When parsing MASM, "jmp short" instructions are case insensitive

Handle "short" in a case-insensitive fashion in MASM.

Required to correctly parse z_Windows_NT-586_asm.asm from the OpenMP runtime.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D104195
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was addedllvm/test/tools/llvm-ml/jmp_short.asm
Commit b2a0739012163f5433c0f069e842ee4cea3100f7 by jezng
[lld-macho][nfc] Remove InputSection::outSecFileOff

`outSecFileOff` and the associated `getFileOffset()` accessors were
unnecessary.

For all the cases we care about, `outSecFileOff` is the same as
`outSecOff`. The only time they deviate is if there are zerofill
sections within a given segment. But since zerofill sections are always
at the end of a segment, the only sections where the two values deviate
are zerofill sections themselves. And we never actually query the
outSecFileOff of zerofill sections.

As for `getFileOffset()`, the only place it was being used was to
calculate the offset of the entry symbol. However, we can compute that
value by just taking the difference between the address of the entry
symbol and the address of the Mach-O header. In fact, this appears to be
what ld64 itself does. This difference is the same as the file offset as
long as there are no intervening zerofill sections, but since `__text`
is the first section in `__TEXT`, this never happens, so our previous
use of `getFileOffset()` was not wrong -- just inefficient.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104177
The file was modifiedlld/MachO/ConcatOutputSection.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/Symbols.cpp
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/UnwindInfoSection.cpp
Commit c5c05ffa4562223cae7db537ca7772afaeccd009 by jezng
[lld-macho][nfc] Represent the image loader cache with a ConcatInputSection

We don't need to define any special behavior for this section,
so creating a subclass for it is redundant.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104199
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/Writer.cpp
Commit da24e6d43e3fdc07aa84f55b35ec50f6b96545ad by jezng
[lld-macho][nfc] Add `final` to classes where possible

I wanted to see if we would get any perf wins out of this, but
it doesn't seem to be the case. But it still seems worth committing.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104200
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/InputFiles.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/ConcatOutputSection.h
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/InputSection.h