Changes

Summary

  1. [PowerPC] Allow -mfloat128 option for VSX targets (details)
  2. [RISCV] Add initial support for getRegUsageForType and getNumberOfRegisters (details)
  3. [ELF] De-template getAlternativeSpelling. NFC (details)
  4. [ELF] Relocations: remove some cast<Undefined>. NFC (details)
  5. [clang-format] Add a BlockIndent option to AlignAfterOpenBracket (details)
  6. [ELF] RelocationScanner::scanOne: replace rel.r_offset with offset. NFC (details)
  7. CycleInfo: Fix trivial typo. NFC. (details)
  8. [DSE] Remove alloc function check in canSkipDef() (details)
  9. [clangd] Better handling `\n` in the synthesized diagnostic message. (details)
  10. [GlobalOpt] Make global SRA offset based (details)
Commit d771cf277565f579aba24fef522355f4406323c9 by qiucofan
[PowerPC] Allow -mfloat128 option for VSX targets

Targets with VSX feature but without native float128 instructions can
also use that type with supplementary libcalls. We don't enable it by
default now because Glibc assumes long double and float128 can be
implicitly converted in between, which is not available under default
'ibmlongdouble' semantics in clang.

This commit partly relands cbd93ce.
The file was modifiedclang/test/Driver/ppc-f128-support-check.c
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
Commit cc35161dc716ab5b0e66b15ac320ebd451a2bc44 by kito.cheng
[RISCV] Add initial support for getRegUsageForType and getNumberOfRegisters

Those two TTI hooks are used during vectorization for calculating
register pressure, the default implementation isn't consider for LMUL,
and that's also definitly wrong value for register number (all register class
are 8 registers).

So in this patch we tried to:

1. Calculate right register usage for vector type and scalar type.
2. Return right number of register for general purpose register and
   vector register.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D116890
The file was addedllvm/test/Transforms/LoopVectorize/RISCV/reg-usage.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVSubtarget.h
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
Commit b8d4eb84d75d688989697487a39313ffe41ae06c by i
[ELF] De-template getAlternativeSpelling. NFC
The file was modifiedlld/ELF/Relocations.cpp
Commit 4c36567179ec7d37fd50a25cdf3800899f199c93 by i
[ELF] Relocations: remove some cast<Undefined>. NFC
The file was modifiedlld/ELF/Relocations.cpp
Commit 966f24e5a62a9f5df518357c2d4b0e361244a624 by bjoern
[clang-format] Add a BlockIndent option to AlignAfterOpenBracket

This style is similar to AlwaysBreak, but places closing brackets on new lines.

For example, if you have a multiline parameter list, clang-format currently only supports breaking per-parameter, but places the closing bracket on the line of the last parameter.

Function(
    param1,
    param2,
    param3);

A style supported by other code styling tools (e.g. rustfmt) is to allow the closing brackets to be placed on their own line, aiding the user in being able to quickly infer the bounds of the block of code.

Function(
    param1,
    param2,
    param3
);

For prior work on a similar feature, see: https://reviews.llvm.org/D33029.

Note: This currently only supports block indentation for closing parentheses.

Differential Revision: https://reviews.llvm.org/D109557
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/lib/Format/ContinuationIndenter.h
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/include/clang/Format/Format.h
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/lib/Format/ContinuationIndenter.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit 54fe70bfba230a0058ff90bcf0c459e82b0363b9 by i
[ELF] RelocationScanner::scanOne: replace rel.r_offset with offset. NFC
The file was modifiedlld/ELF/Relocations.cpp
Commit 4b22ffe0b96ab962ff454d22b8f2170c7d26b452 by carl.ritson
CycleInfo: Fix trivial typo. NFC.
The file was modifiedllvm/include/llvm/ADT/GenericCycleInfo.h
Commit 00b77d917cd8e062b93e080f35cfd5aa15348f31 by npopov
[DSE] Remove alloc function check in canSkipDef()

canSkipDef() currently skips inaccessiblememonly calls, but not
if they are allocation functions. This check was added in D103009,
but actually seems to be a leftover from a previous implementation
in D101440. canSkipDef() is not used on the storeIsNoop() path,
where the relevant transform ended up being implemented.

Differential Revision: https://reviews.llvm.org/D117005
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 64c108c9e4e0525328ceb4da55e4ab4b765d4c27 by hokein.wu
[clangd] Better handling `\n` in the synthesized diagnostic message.

The newline-eof fix was rendered as "insert '...'", this patch
special-case it.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D117294
The file was modifiedclang-tools-extra/clangd/Diagnostics.cpp
The file was modifiedclang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
Commit 4796b4ae7bccc7b75a26b666fbd554c49b274404 by npopov
[GlobalOpt] Make global SRA offset based

Currently global SRA uses the GEP structure to determine how to
split the global. This patch instead analyses the loads and stores
that are performed on the global, and collects which types are used
at which offset, and then splits the global according to those.

This is both more general, and works fine with opaque pointers.
This is also closer to how ordinary SROA is performed.

Differential Revision: https://reviews.llvm.org/D117223
The file was addedllvm/test/Transforms/GlobalOpt/globalsra-opaque-ptr.ll
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
The file was modifiedllvm/test/Transforms/GlobalOpt/externally-initialized-global-ctr.ll
The file was modifiedllvm/test/Transforms/GlobalOpt/globalsra-generic-type.ll
The file was modifiedllvm/test/Transforms/GlobalOpt/globalsra-align.ll
The file was modifiedllvm/test/DebugInfo/Generic/global-sra-array.ll
The file was addedllvm/test/Transforms/GlobalOpt/globalsra-recursive.ll