Changes

Summary

  1. [RISCV] Add bitreverse tests to bswap-ctlz-cttz-ctpop.ll. Add Zbb command lines. NFC (details)
  2. [RISCV] Add tests that do a bitreverse before or after a bswap. NFC (details)
  3. [mlir] Ensure a newline at the end of a file (NFC) (details)
  4. [Sema] Fix a bugprone argument comment (NFC) (details)
  5. [Analysis] Remove a redundant const from a return type (NFC) (details)
  6. DebugInfo: Don't put types in type units if they reference internal linkage types (details)
  7. [X86] Add some basic tests for PR46809 (details)
  8. DebugInfo: Include template parameters for simplified template decls in type units (details)
Commit 88f33cff4bee87ea31e129f734df232274098a78 by craig.topper
[RISCV] Add bitreverse tests to bswap-ctlz-cttz-ctpop.ll. Add Zbb command lines. NFC

Rename to include bitreverse. Add additional tests and Zbb command lines.

There's some overlapping tests with rv32zbb.ll and rv64zbb.ll. Maybe
I'll clean that up in a future patch.
The file was addedllvm/test/CodeGen/RISCV/bswap-bitreverse-ctlz-cttz-ctpop.ll
The file was removedllvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll
Commit 3575700b286f8c3150abb3de7968a9f36dd1cceb by craig.topper
[RISCV] Add tests that do a bitreverse before or after a bswap. NFC

We don't optimize this as well as we could. Bitreverse is always
expanded to bswap and a shift/and/or sequence to swap bits within a
byte. The newly created bswap will either becomes a shift/and/or
sequence or rev8 instruction. We don't always realize the bswap is
redundant with another bswap before or after the bitreverse.

Found while thinking about the brev8 instruction from the
Cryptography extension. It's equivalent to bswap(bitreverse(x)) or
bitreverse(bswap(x)).
The file was modifiedllvm/test/CodeGen/RISCV/bswap-bitreverse-ctlz-cttz-ctpop.ll
Commit 47d7e922d8438c801198a2901a01fcd2cfbdb353 by kazu
[mlir] Ensure a newline at the end of a file (NFC)
The file was modifiedmlir/lib/CMakeLists.txt
Commit fa90fc6e0566a245cafa0afa4da4967cf4831779 by kazu
[Sema] Fix a bugprone argument comment (NFC)

Identified with bugprone-argument-comment.
The file was modifiedclang/lib/Sema/SemaTemplateDeduction.cpp
Commit 448d0dfab701ab00d081136d8373304fd91693a0 by kazu
[Analysis] Remove a redundant const from a return type (NFC)

Identified with readability-const-return-type.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit ab4756338c5b2216d52d9152b2f7e65f233c4dac by dblaikie
DebugInfo: Don't put types in type units if they reference internal linkage types

Doing this causes a declaration of the internal linkage (anonymous
namespace) type to be emitted in the type unit, which would then be
ambiguous as to which internal linkage definition it refers to (since
the name is only valid internally).

It's possible these internal linkage types could be resolved relative to
the unit the TU is referred to from - but that doesn't seem ideal, and
there's no reason to put the type in a type unit since it can only be
defined in one CU anyway (since otherwise it'd be an ODR violation) & so
avoiding the type unit should be a smaller DWARF encoding anyway.

This also addresses an issue with Simplified Template Names where the
template parameter could not be rebuilt from the declaration emitted
into the TU (specifically for an enum non-type template parameter, where
looking up the enumerators is necessary to rebuild the full template
name)
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/test/DebugInfo/X86/tu-to-non-tu.ll
Commit 7c77df1528c8ef6ab430bca18661aaf578066b96 by llvm-dev
[X86] Add some basic tests for PR46809
The file was addedllvm/test/CodeGen/X86/select-lea.ll
Commit 2e58a18910867ba6795066e044293e6daf89edf5 by dblaikie
DebugInfo: Include template parameters for simplified template decls in type units

LLVM DebugInfo CodeGen synthesizes type declarations in type units when
referencing types that are not in type units. When those synthesized
types are templates and simplified template names (or mangled simplified
template names) are in use, the template arguments must be attached to
those declarations.

A deeper fix (with a CU or DICompositeType flag) that would also support
other uses of clang's -debug-forward-template-args (such as Sony's
platform) could/should be implemented to fix this more broadly.
The file was modifiedllvm/test/DebugInfo/X86/tu-to-non-tu.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp