SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. AMDGPU/GlobalISel: Better code for one case of G_SHUFFLE_VECTOR on v2i16 (details)
  2. [AArch64][SVE] Add support for DestructiveBinary and DestructiveBinaryComm DestructiveInstTypes (details)
  3. [llvm-objcopy][MachO] Change the storage of sections (details)
  4. [lldb/test] Move `platform process list` tests to its own directory (NFC) (details)
  5. [lldb/Plugins] Add ability to fetch crash information on crashed processes (details)
  6. [AArch64][SVE] Fix -Wimplicit-fallthrough after D73711 (details)
  7. clang/Modules: Finish renaming CompilerInstance::ModuleManager, NFC. (details)
  8. [SelectionDAG] remove unused isFast() helper function; NFC (details)
  9. [AArch64][SVE] Fix -DBUILD_SHARED_LIBS=on builds after -D74808/1874dee5662603c9251228c71b66de72cec0c979 (details)
  10. [AArch64] Delete an unneeded dependency on Object after 1874dee5662603c9251228c71b66de72cec0c979 (details)
  11. [Hexagon] Define __ELF__ by default. (details)
  12. [CloneFunction] Update loop headers after cloning all blocks in loop. (details)
  13. [Attributor][FIX] Undo 16188f9 until SCC iterator bug is fixed (details)
  14. [GISel][KnownBits] Add a cache mechanism to speed compile time (details)
  15. [Attributor][FIX] Disable a test to unblock the builders (details)
Commit b72f1448ce42f4e38f0c2a33418089f2320ab8f3 by jay.foad
AMDGPU/GlobalISel: Better code for one case of G_SHUFFLE_VECTOR on v2i16

Reviewers: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74987
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-shuffle-vector.v2s16.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Commit a5b22b768f5a6f34c8f41eea6a32880794c1690b by mcinally
[AArch64][SVE] Add support for DestructiveBinary and DestructiveBinaryComm DestructiveInstTypes

Add support for DestructiveBinaryComm DestructiveInstType, as well as the lowering code to expand the new Pseudos into the final movprfx+instruction pairs.

Differential Revision: https://reviews.llvm.org/D73711
The file was addedllvm/test/CodeGen/AArch64/sve-intrinsics-fp-arith-merging.ll
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.h
The file was modifiedllvm/test/CodeGen/AArch64/O3-pipeline.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/O0-pipeline.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
Commit dc046c70de96784772050e2704141c9e2a478220 by alexshap
[llvm-objcopy][MachO] Change the storage of sections

In this diff we change the storage of a section to unique_ptr.
This refactoring was factored out from D71647.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D74946
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.h
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOReader.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.cpp
Commit 1f04d1b7069bf6c513526f36b8c7327c8dec6604 by medismail.bennani
[lldb/test] Move `platform process list` tests to its own directory (NFC)

Since the `platform process` commamnd has more tests now, this commits
separates each of the `platform process` subcommand's test in its own directory.

Differential Revision: https://reviews.llvm.org/D74836

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was addedlldb/test/API/commands/platform/process/list/TestProcessList.py
The file was addedlldb/test/API/commands/platform/process/list/main.cpp
The file was removedlldb/test/API/commands/platform/process/main.cpp
The file was removedlldb/test/API/commands/platform/process/Makefile
The file was addedlldb/test/API/commands/platform/process/list/Makefile
The file was removedlldb/test/API/commands/platform/process/TestProcessList.py
Commit d7c403e64043281b9c5883e3e034da5ebaf4985a by medismail.bennani
[lldb/Plugins] Add ability to fetch crash information on crashed processes

Currently, in macOS, when a process crashes, lldb halts inside the
implementation disassembly without yielding any useful information.
The only way to get more information is to detach from the process, then wait
for ReportCrash to generate a report, find the report, then see what error
message was included in it. Instead of waiting for this to happen, lldb could
locate the error_string and make it available to the user.

This patch addresses this issue by enabling the user to fetch extended
crash information for crashed processes using `process status --verbose`.

Depending on the platform, this will try to gather different crash information
into an structured data dictionnary. This dictionnary is generic and extensible,
as it contains an array for each different type of crash information.

On Darwin Platforms, lldb will iterate over each of the target's images,
extract their `__crash_info` section and generated a StructuredData::Array
containing, in each entry, the module spec, its UUID, the crash messages
and the abort cause. The array will be inserted into the platform's
`m_extended_crash_info` dictionnary and `FetchExtendedCrashInformation` will
return its JSON representation like this:

```
{
  "crash-info annotations": [
    {
      "abort-cause": 0,
      "image": "/usr/lib/system/libsystem_malloc.dylib",
      "message": "main(76483,0x1000cedc0) malloc: *** error for object 0x1003040a0: pointer being freed was not allocated",
      "message2": "",
      "uuid": "5747D0C9-900D-3306-8D70-1E2EA4B7E821"
    },
    ...
  ],
  ...
}
```

This crash information can also be fetched using the SB API or lldb-rpc protocol
using SBTarget::GetExtendedCrashInformation().

rdar://37736535

Differential Revision: https://reviews.llvm.org/D74657

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/include/lldb/API/SBTarget.h
The file was modifiedlldb/include/lldb/Target/Process.h
The file was modifiedlldb/source/API/SBTarget.cpp
The file was modifiedlldb/source/Commands/Options.td
The file was addedlldb/test/API/functionalities/process_crash_info/Makefile
The file was modifiedlldb/bindings/interface/SBTarget.i
The file was modifiedlldb/source/Commands/CommandObjectProcess.cpp
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
The file was addedlldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py
The file was addedlldb/test/API/functionalities/process_crash_info/main.c
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
The file was modifiedlldb/include/lldb/Target/Platform.h
Commit 5c33a81b7a46373aa695ab676bec8b70b1abd0e2 by maskray
[AArch64][SVE] Fix -Wimplicit-fallthrough after D73711
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
Commit a6c8698924d2b31a2f096e0f4c06a7015ecccb5e by vsapsai
clang/Modules: Finish renaming CompilerInstance::ModuleManager, NFC.

Follow-up to 20d51b2f14ac4488f684f8fc57cb0ba718a6b91d, rename the setter to
make it consistent with the getter. Also fixed a few comments along the
way, didn't try to find all references to a module manager.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D74939
The file was modifiedclang/lib/Frontend/FrontendAction.cpp
The file was modifiedclang/include/clang/Frontend/CompilerInstance.h
The file was modifiedclang/lib/Frontend/ChainedIncludesSource.cpp
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
Commit 0ad6fc9928d8a5e3bd148a112d6e772248e515ae by spatel
[SelectionDAG] remove unused isFast() helper function; NFC

We want flag users to check individual fast-math flags,
not that all of them are set. This was also probably
not working as intended because NoFPExcept isn't always
set on non-strict nodes.
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGNodes.h
Commit fad1c750f16c5f7a7ef8ec7d78ae1df4bc473c4a by maskray
[AArch64][SVE] Fix -DBUILD_SHARED_LIBS=on builds after -D74808/1874dee5662603c9251228c71b66de72cec0c979
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt
Commit fddbff147357a7f5618fb6166b716ad60c3eb9fc by maskray
[AArch64] Delete an unneeded dependency on Object after 1874dee5662603c9251228c71b66de72cec0c979

1874dee5662603c9251228c71b66de72cec0c979 moved CPU_(SUB_)TYPE logic to
BinaryFormat. Object is not directly referenced.
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt
Commit d37cbda5f9a47a4206439632ef4fa1534e66f856 by sidneym
[Hexagon] Define __ELF__ by default.

Differential Revision: https://reviews.llvm.org/D74972
The file was modifiedclang/test/Preprocessor/hexagon-predefines.c
The file was modifiedclang/lib/Basic/Targets/Hexagon.cpp
The file was modifiedcompiler-rt/lib/builtins/CMakeLists.txt
Commit 0a70edd696264ba69914f4d4ecb28d559cbe5444 by whitneyt
[CloneFunction] Update loop headers after cloning all blocks in loop.

Summary:
Blocks in a loop can be in any order as long as the loop header is the
first block in Blocks.
With some order of Blocks, cloneLoopWithPreheader would trigger the
assertion in addBasicBlockToLoop.

Example:

define void @test(i64 %N) {
preheader.i:
  br label %header.i

header.i:
  %i = phi i64 [ 0, %preheader.i ], [ %inc.i, %latch.i ]
  br label %header.j

header.j:
  %j = phi i64 [ 0, %header.i ], [ %inc.j, %latch.j ]
  br label %header.k

header.k:
  %k = phi i64 [ 0, %header.j ], [ %inc.k, %latch.k ]
  call void @baz(i64 %i, i64 %j, i64 %k)
  br label %latch.k

latch.k:
  %inc.k = add nsw i64 %k, 1
  %cmp.k = icmp slt i64 %inc.k, %N
  br i1 %cmp.k, label %header.k, label %latch.j

latch.j:
  %inc.j = add nsw i64 %j, 1
  %cmp.j = icmp slt i64 %inc.j, %N
  br i1 %cmp.j, label %header.j, label %latch.i

latch.i:
  %inc.i = add nsw i64 %i, 1
  %cmp.i = icmp slt i64 %inc.i, %N
  br i1 %cmp.i, label %header.i, label %exit.i

exit.i:
  ret void
}
declare void @baz(i64, i64, i64)
If the blocks of loop-i is in the order: header.i, latch.k, header.k,
header.j, latch.j, latch.i,
then cloneLoopWithPreheader would trigger the assertion in
addBasicBlockToLoop
assert(contains(SameHeader) && getHeader() == SameHeader->getHeader() &&
"Incorrect LI specified for this loop!");

As latch.k is in both loop-j and loop-k, it would be set as the header
of both loops after adding latch.k.
If we update loop headers during cloning blocks, then after adding
header.k,
the header of loop-k would be updated with header.k,
while the header of loop-j stays as latch.k.

When adding header.j, SameHeader is loop-k, SameHeader->getHeader() is
header.k, but getHeader() is latch.k, which trigger the assertion.
Reviewer: jdoerfert, Meinersbur, fhahn, kbarton, hfinkel, bmahjour,
etiotto
Reviewed By: Meinersbur
Subscribers: hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D74382
The file was modifiedllvm/lib/Transforms/Utils/CloneFunction.cpp
Commit 9708279c725a515c69c41130aaaa36dc6a0b34d8 by johannes
[Attributor][FIX] Undo 16188f9 until SCC iterator bug is fixed

The buildbot
  http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win
shows some strange SCC iterator bug since 16188f9 which we need to
investigate. This patch should remove the part of 16188f9 that could
have exposed the problem.
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 618dec2aeffd9d7778b581176e0897b10731e273 by qcolombet
[GISel][KnownBits] Add a cache mechanism to speed compile time

This patch adds a cache that is valid only for the duration of a call
to getKnownBits. With such short lived cache we avoid all the problems
of cache invalidation while still getting the benefits of reusing
the information we already computed.

This cache is useful whenever an instruction occurs more than once
in a chain of computation.
E.g.,
v0 = G_ADD v1, v2
v3 = G_ADD v0, v1

Previously we would compute the known bits for:
v1, v2, v0, then v1 again and finally v3.

With the patch, now we won't have to recompute v1 again.

NFC
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
Commit 528a6a1d4cceda58d57c28a75a524dcdd8d35f3e by johannes
[Attributor][FIX] Disable a test to unblock the builders

To unblock the builders this disables a test for which the CHECK lines
need to be updated. The patch causing the failure was not reverted
because it is needed for a different problem we are investigating. Here
we just need to update the CHECK lines which will happen in the
meantime.
The file was modifiedllvm/test/Transforms/Attributor/liveness.ll