SuccessChanges

Summary

  1. [clang][AST] Get rid of an alignment hack in DeclObjC.h [NFCI] (details)
  2. [SlotIndexes] Fix and simplify basic block splitting (details)
  3. [AMDGPU][GlobalISel] Remove some duplicate RUN lines (details)
  4. [obj2yaml,yaml2obj] - Fix issues with creating/dumping group sections. (details)
  5. [obj2yaml] - Don't crash when an object has an empty symbol table. (details)
  6. Revert "[Test] Add failing test for PR48725" (details)
  7. Change the LLVM_ATTRIBUTE_DEPRECATED macro to use C++14 attribute. (details)
  8. [RISCV] Improve scalable-vector shift tests (NFC) (details)
Commit c1e08f0073e35cf17c0a0343cf7efff914dbd66d by mikhail.maltsev
[clang][AST] Get rid of an alignment hack in DeclObjC.h [NFCI]

This code currently uses a union object to increase the
alignment of the type ObjCTypeParamList. The original intent of this
trick was to be able to use the expression `this + 1` to access the
beginning of a tail-allocated array of `ObjCTypeParamDecl *` pointers.

The code has since been refactored and uses `llvm::TrailingObjects` to
manage the tail-allocated array. This template takes care of
alignment, so the hack is no longer necessary.

This patch removes the union so that the `SourceRange` class can be
used directly instead of being re-implemented with raw representations
of source locations.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D94224
The file was modifiedclang/include/clang/AST/DeclObjC.h
The file was modifiedclang/lib/AST/DeclObjC.cpp
Commit f264f9ad7df538357dfc8c5f318c5c8b0df3d99f by jay.foad
[SlotIndexes] Fix and simplify basic block splitting

Remove the InsertionPoint argument from SlotIndexes::insertMBBInMaps
because it was confusing: what does it mean to insert a new block
between two instructions, in the middle of an existing block?

Instead, support the case that MachineBasicBlock::splitAt really needs,
where the new block contains some instructions that are already in the
maps because they have been moved there from the tail of the previous
block.

In all other use cases the new block is empty.

Based on work by Carl Ritson!

Differential Revision: https://reviews.llvm.org/D94311
The file was modifiedllvm/include/llvm/CodeGen/LiveIntervals.h
The file was modifiedllvm/unittests/MI/LiveIntervalTest.cpp
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
The file was modifiedllvm/include/llvm/CodeGen/SlotIndexes.h
Commit 794e3d94d5a97e118bc2ed10f7ba1830dbb25459 by jay.foad
[AMDGPU][GlobalISel] Remove some duplicate RUN lines

Differential Revision: https://reviews.llvm.org/D86618
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-flat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant.mir
Commit 60df7c08b1f4447309c0c07fec1c8bc7267562fc by grimar
[obj2yaml,yaml2obj] - Fix issues with creating/dumping group sections.

We have the following issues related to group sections:
1) yaml2obj is unable to set the custom `sh_entsize` value, because the `EntSize`
   key is currently ignored.
2) obj2yaml is unable to dump the group section which `sh_entsize != 4`.
3) obj2yaml always dumps the "EntSize" for group sections, though
   usually we are trying to omit dumping default values when dumping keys.
   I.e. we should not print the "EntSize" key when `sh_entsize` == 4.

This patch fixes (1),(3) and adds the test case to document the behavior of (2).

Differential revision: https://reviews.llvm.org/D93854
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
The file was modifiedllvm/test/tools/obj2yaml/ELF/section-group.yaml
The file was modifiedllvm/test/tools/yaml2obj/ELF/group.yaml
Commit c15a57cc1a86bfb72f4fa0e7d265494babc3b412 by grimar
[obj2yaml] - Don't crash when an object has an empty symbol table.

Currently we crash when we have an object with SHT_SYMTAB/SHT_DYNSYM sections
of size 0.

With this patch instead of the crash we start to dump them properly.

Differential revision: https://reviews.llvm.org/D93697
The file was modifiedllvm/test/tools/obj2yaml/ELF/no-symtab.yaml
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
Commit a06aa1037c17dd3d60f5202b9877d8988e463353 by thakis
Revert "[Test] Add failing test for PR48725"

This reverts commit e8287cb2b2923af9da72fd953e2ec5495c33861a.
Test unexpectedly passes on mac, see comment 2 on PR48725.
The file was removedllvm/test/Transforms/LoopStrengthReduce/pr48725.ll
Commit ace516fb33d1f3de85f046e96efc1048b4ee8c08 by csigg
Change the LLVM_ATTRIBUTE_DEPRECATED macro to use C++14 attribute.

C++14 attributes are superior because they can be applied to functions with inline definition and the syntax is cleaner.

I intend to convert all uses and then remove the macro.

One issue that might hold back switching uses to C++14  attributes is that
clang-format does not put long attributes on separate lines and formatted code will look like:

```
template <typename T>
[[deprecated("blah blah")]] void
    foooooooooooooooooooooooooooo() {
  ...
}
```

Putting long attributes on a separate line would be prettier.
See https://stackoverflow.com/questions/45740466/clang-format-setting-to-control-c-attributes

AttributeMacros probably won't help because it can't match the custom message.
https://clang.llvm.org/docs/ClangFormatStyleOptions.html

Reviewed By: rriddle, MaskRay

Differential Revision: https://reviews.llvm.org/D94219
The file was modifiedllvm/include/llvm/Support/Compiler.h
Commit 09db958e37b3a51942827a48a4b2f453e8fb4737 by fraser
[RISCV] Improve scalable-vector shift tests (NFC)

All i8/i16 and several i32 tests were testing immediate shift amounts
which exceeded the bits in the vector elements, creating poison values.
Amend the tests to test well-behaved shift amounts.
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vshl-sdnode-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsra-sdnode-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsrl-sdnode-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vshl-sdnode-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsra-sdnode-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsrl-sdnode-rv64.ll