FailedChanges

Summary

  1. [AArch64][SVE] Add support for DestructiveBinary and DestructiveBinaryComm DestructiveInstTypes (details)
  2. [llvm-objcopy][MachO] Change the storage of sections (details)
  3. [lldb/test] Move `platform process list` tests to its own directory (NFC) (details)
  4. [lldb/Plugins] Add ability to fetch crash information on crashed processes (details)
  5. [AArch64][SVE] Fix -Wimplicit-fallthrough after D73711 (details)
  6. clang/Modules: Finish renaming CompilerInstance::ModuleManager, NFC. (details)
  7. [SelectionDAG] remove unused isFast() helper function; NFC (details)
  8. [AArch64][SVE] Fix -DBUILD_SHARED_LIBS=on builds after -D74808/1874dee5662603c9251228c71b66de72cec0c979 (details)
  9. [AArch64] Delete an unneeded dependency on Object after 1874dee5662603c9251228c71b66de72cec0c979 (details)
  10. [Hexagon] Define __ELF__ by default. (details)
  11. [CloneFunction] Update loop headers after cloning all blocks in loop. (details)
  12. [Attributor][FIX] Undo 16188f9 until SCC iterator bug is fixed (details)
  13. [GISel][KnownBits] Add a cache mechanism to speed compile time (details)
  14. [Attributor][FIX] Disable a test to unblock the builders (details)
  15. [Target] Remove libObject dependency in lib/Target (details)
  16. Revert "Allow customized relative PYTHONHOME" (details)
  17. [Analysis][Docs] Parents of loops documentation. (details)
  18. [mlir][DeclarativeParser] Add support for the TypesMatchWith trait. (details)
  19. [mlir][DeclarativeParser] Add basic support for optional groups in the assembly format. (details)
  20. [mlir][DeclarativeParser] Add an 'attr-dict-with-keyword' directive (details)
  21. [mlir] Add a utility iterator range that repeats a given value `n` times. (details)
  22. [mlir][ODS] Add support for specifying the successors of an operation. (details)
  23. [mlir][DeclarativeParser] Add support for formatting the successors of an operation. (details)
  24. [mlir][Tutorial] Add a section to Toy Ch.2 detailing the custom assembly format. (details)
  25. [llvm-objdump] Print method name from debug info in disassembly output. (details)
  26. [MC][ELF] Error for sh_type, sh_flags or sh_entsize change (details)
  27. [lldb/test] Tweak libcxx string test on Apple+ARM devices (details)
  28. Revert "[AMDGPU] Don’t marke the .note section as ALLOC" (details)
  29. [mlir][DeclarativeParser][NFC] Use explicit type names in TypeSwitch to (details)
  30. [Driver] Escape the program path for -frecord-command-line (details)
  31. AMDGPU/GlobalISel: Remove dead code (details)
  32. Allow customized relative PYTHONHOME (Attemp 1) (details)
  33. [llvm-objdump][test] Fix source-interleave-function-from-debug.test on Windows after D74507 (details)
  34. [WebAssembly] Fix a non-determinism problem in FixIrreducibleControlFlow (details)
  35. Flags for displaying only hot nodes in CFGPrinter graph (details)
  36. [lldb][test] Fix sh_type of .debug_cu_index and .debug_tu_index (details)
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 modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.h
The file was addedllvm/test/CodeGen/AArch64/sve-intrinsics-fp-arith-merging.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/O3-pipeline.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/test/CodeGen/AArch64/O0-pipeline.ll
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/MachOLayoutBuilder.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOReader.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.h
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 removedlldb/test/API/commands/platform/process/TestProcessList.py
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 addedlldb/test/API/commands/platform/process/list/TestProcessList.py
The file was addedlldb/test/API/commands/platform/process/list/main.cpp
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/source/Plugins/Platform/MacOSX/PlatformDarwin.h
The file was modifiedlldb/include/lldb/API/SBTarget.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
The file was modifiedlldb/include/lldb/Target/Process.h
The file was modifiedlldb/source/Commands/Options.td
The file was modifiedlldb/include/lldb/Target/Platform.h
The file was modifiedlldb/source/API/SBTarget.cpp
The file was addedlldb/test/API/functionalities/process_crash_info/main.c
The file was modifiedlldb/source/Commands/CommandObjectProcess.cpp
The file was addedlldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py
The file was modifiedlldb/bindings/interface/SBTarget.i
The file was addedlldb/test/API/functionalities/process_crash_info/Makefile
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/include/clang/Frontend/CompilerInstance.h
The file was modifiedclang/lib/Frontend/ChainedIncludesSource.cpp
The file was modifiedclang/lib/Frontend/FrontendAction.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/AArch64/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/PowerPC/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/lib/Basic/Targets/Hexagon.cpp
The file was modifiedclang/test/Preprocessor/hexagon-predefines.c
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/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
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
Commit a32d539798e4f0b97420e7b60b223b3a3fae5ff1 by francisvm
[Target] Remove libObject dependency in lib/Target

This removes a couple useless includes and the dependency of X86Desc on Object,
which was useless as well.
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEMCExpr.cpp
Commit 215a31115f89c851331a822e67aa4528ba5c21e6 by stilis
Revert "Allow customized relative PYTHONHOME"

This reverts commit 0bb90628b5f7c170689d2d3f019af773772fc649 since it is causing failures on the Windows LLDB buildbot:

http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/14048
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
The file was modifiedlldb/include/lldb/Host/Config.h.cmake
Commit 393f4e8ac263d0debecb571bbab69bcf31474cdb by llvm-project
[Analysis][Docs] Parents of loops documentation.

Recently I had to use it and although one assumes it returns null if
there's no parent loop, I think it helps to doc it.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D74890
The file was modifiedllvm/docs/LoopTerminology.rst
The file was modifiedllvm/include/llvm/Analysis/LoopInfo.h
Commit 26222db01b079023d0fe3bb60f2c1b38f4f19d5a by riddleriver
[mlir][DeclarativeParser] Add support for the TypesMatchWith trait.

This allows for injecting type constraints that are not direct 1-1 mappings, for example when one type is equal to the element type of another. This allows for moving over several more parsers to the declarative form.

Differential Revision: https://reviews.llvm.org/D74648
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.td
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Dialect/VectorOps/VectorOps.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/include/mlir/IR/OpImplementation.h
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
Commit 2d0477a003687588886ae6e9b59b9355f8bb6b8c by riddleriver
[mlir][DeclarativeParser] Add basic support for optional groups in the assembly format.

When operations have optional attributes, or optional operands(i.e. empty variadic operands), the assembly format often has an optional section to represent these arguments. This revision adds basic support for defining an "optional group" in the assembly format to support this. An optional group is defined by wrapping a set of elements in `()` followed by `?` and requires the following:

* The first element of the group must be either a literal or an operand argument.
  - This is because the first element must be optionally parsable.
* There must be exactly one argument variable within the group that is marked as the anchor of the group. The anchor is the element whose presence controls whether the group should be printed/parsed. An element is marked as the anchor by adding a trailing `^`.
* The group must only contain literals, variables, and type directives.
  - Any attribute variables may be used, but only optional attributes can be marked as the anchor.
  - Only variadic, i.e. optional, operand arguments can be used.
  - The elements of a type directive must be defined within the same optional group.

An example of this can be seen with the assembly format for ReturnOp, which has a variadic number of operands.

```
def ReturnOp : ... {
  let arguments = (ins Variadic<AnyType>:$operands);

  // We only print the operands+types if there are a non-zero number
  // of operands.
  let assemblyFormat = "attr-dict ($operands^ `:` type($operands))?";
}
```

Differential Revision: https://reviews.llvm.org/D74681
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/docs/OpDefinitions.md
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/test/mlir-tblgen/op-format-spec.td
Commit ca4ea51c0af2dd3f3c73adc587c8e642c9dcdeec by riddleriver
[mlir][DeclarativeParser] Add an 'attr-dict-with-keyword' directive

This matches the '(print|parse)OptionalAttrDictWithKeyword' functionality provided by the assembly parser/printer.

Differential Revision: https://reviews.llvm.org/D74682
The file was modifiedmlir/test/mlir-tblgen/op-format-spec.td
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/mlir-tblgen/op-format.mlir
The file was modifiedmlir/docs/OpDefinitions.md
Commit 93813e5feb18ece7becd1eece24d0138c955fd53 by riddleriver
[mlir] Add a utility iterator range that repeats a given value `n` times.

This range is useful when an desired API expects a range or when comparing two different ranges for equality, but the underlying data is a splat. This range removes the need to explicitly construct a vector in those cases.

Differential Revision: https://reviews.llvm.org/D74683
The file was modifiedmlir/include/mlir/Support/STLExtras.h
Commit b1de971ba8c83c82ef63077b666aaff3ba8e56b9 by riddleriver
[mlir][ODS] Add support for specifying the successors of an operation.

This revision add support in ODS for specifying the successors of an operation. Successors are specified via the `successors` list:
```
let successors = (successor AnySuccessor:$target, AnySuccessor:$otherTarget);
```

Differential Revision: https://reviews.llvm.org/D74783
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was addedmlir/lib/TableGen/Successor.cpp
The file was modifiedmlir/include/mlir/TableGen/Operator.h
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/docs/OpDefinitions.md
The file was modifiedmlir/include/mlir/TableGen/Constraint.h
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/lib/TableGen/Operator.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
The file was modifiedmlir/lib/TableGen/Constraint.cpp
The file was addedmlir/include/mlir/TableGen/Successor.h
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/TableGen/CMakeLists.txt
Commit 9eb436feaa7f5f01dc4852396647a5b46311c8eb by riddleriver
[mlir][DeclarativeParser] Add support for formatting the successors of an operation.

This revision add support for formatting successor variables in a similar way to operands, attributes, etc.

Differential Revision: https://reviews.llvm.org/D74789
The file was modifiedmlir/include/mlir/IR/OpImplementation.h
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/test/mlir-tblgen/op-format-spec.td
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/test/mlir-tblgen/op-format.mlir
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/docs/OpDefinitions.md
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
Commit 0050e8f0cf5782217ebd78fa2b58be3aa9f8d9e2 by riddleriver
[mlir][Tutorial] Add a section to Toy Ch.2 detailing the custom assembly format.

Summary:
This details the C++ format as well as the new declarative format. This has been one of the major missing pieces from the toy tutorial.

Differential Revision: https://reviews.llvm.org/D74938
The file was modifiedmlir/test/Examples/Toy/Ch2/scalar.toy
The file was modifiedmlir/test/Examples/Toy/Ch6/affine-lowering.mlir
The file was modifiedmlir/docs/Tutorials/Toy/Ch-3.md
The file was modifiedmlir/examples/toy/Ch4/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch7/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch7/scalar.toy
The file was modifiedmlir/examples/toy/Ch3/include/toy/Ops.td
The file was modifiedmlir/test/Examples/Toy/Ch2/codegen.toy
The file was modifiedmlir/docs/Tutorials/Toy/Ch-4.md
The file was modifiedmlir/test/Examples/Toy/Ch3/scalar.toy
The file was modifiedmlir/test/Examples/Toy/Ch4/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch7/struct-codegen.toy
The file was modifiedmlir/test/Examples/Toy/Ch5/codegen.toy
The file was modifiedmlir/test/Examples/Toy/Ch5/scalar.toy
The file was modifiedmlir/docs/Tutorials/Toy/Ch-5.md
The file was modifiedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch7/struct-opt.mlir
The file was modifiedmlir/test/Examples/Toy/Ch6/scalar.toy
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch7/include/toy/Ops.td
The file was modifiedmlir/test/Examples/Toy/Ch3/codegen.toy
The file was modifiedmlir/test/Examples/Toy/Ch4/codegen.toy
The file was modifiedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch7/llvm-lowering.mlir
The file was modifiedmlir/examples/toy/Ch2/include/toy/Ops.td
The file was modifiedmlir/test/Examples/Toy/Ch7/codegen.toy
The file was modifiedmlir/examples/toy/Ch6/mlir/Dialect.cpp
The file was modifiedmlir/docs/Tutorials/Toy/Ch-6.md
The file was modifiedmlir/test/Examples/Toy/Ch6/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch4/scalar.toy
The file was modifiedmlir/test/Examples/Toy/Ch5/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch7/affine-lowering.mlir
The file was modifiedmlir/examples/toy/Ch5/include/toy/Ops.td
The file was modifiedmlir/test/Examples/Toy/Ch6/codegen.toy
The file was modifiedmlir/test/Examples/Toy/Ch7/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch5/affine-lowering.mlir
The file was modifiedmlir/examples/toy/Ch6/include/toy/Ops.td
The file was modifiedmlir/docs/Tutorials/Toy/Ch-7.md
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch6/llvm-lowering.mlir
The file was modifiedmlir/docs/Tutorials/Toy/Ch-2.md
Commit 266877a2a8b2d1939f3b08fcfb711890fefc96e3 by rupprecht
[llvm-objdump] Print method name from debug info in disassembly output.

Summary:
GNU objdump prints the method name in disassembly output, and upon further investigation this seems to come from debug info, not the symbol table.

Some additional refactoring is necessary to make this work even when the line number is 0/the filename is unknown. The added test case includes a note for this scenario.

See http://llvm.org/PR41341 for more info.

Reviewers: dblaikie, MaskRay, jhenderson

Reviewed By: MaskRay

Subscribers: ormris, jvesely, aprantl, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74507
The file was modifiedllvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test
The file was modifiedllvm/test/tools/llvm-objdump/embedded-source.test
The file was addedllvm/test/tools/llvm-objdump/X86/source-interleave-function-from-debug.test
The file was modifiedllvm/test/tools/llvm-objdump/Hexagon/source-interleave-hexagon.ll
The file was modifiedllvm/tools/llvm-objdump/llvm-objdump.cpp
The file was modifiedllvm/test/tools/llvm-objdump/AMDGPU/source-lines.ll
Commit 75af9da755721123e62b45cd0bc0c5e688a9722a by maskray
[MC][ELF] Error for sh_type, sh_flags or sh_entsize change

Heads-up message: https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html

GNU as started to emit warnings for changed sh_type or sh_flags in 2000.
GNU as>=2.35 will emit errors for most sh_type/sh_flags change, and error for entsize change.

Some cases remain warnings for legacy reasons:

   .section .init_array,"ax", @progbits
   .section .init_array,"ax", @init_array
   # And some obscure sh_flags changes (OS/Processor specific flags)

The rationale of a diagnostic (warning or error) is that sh_type,
sh_flags or sh_entsize changes usually indicate user errors. The values
are taken from the first .section directive. Successive directives are ignored.

We just try to be rigid and emit errors for all sh_type/sh_flags/sh_entsize change.

A possible improvement in the future is to reuse
llvm-readobj/ELFDumper.cpp:getSectionTypeString so that we can name the
type in the diagnostics.

Reviewed By: psmith

Differential Revision: https://reviews.llvm.org/D73999
The file was addedllvm/test/MC/ELF/section-entsize-changed.s
The file was addedllvm/test/MC/ELF/section-type-changed.s
The file was addedllvm/test/MC/ELF/section-flags-changed.s
The file was modifiedllvm/test/MC/ELF/exclude-debug-dwo.s
The file was modifiedllvm/lib/MC/MCParser/ELFAsmParser.cpp
Commit 8a0f0e2656abf76b771037c6543caf9a31744120 by Vedant Kumar
[lldb/test] Tweak libcxx string test on Apple+ARM devices

On Apple platforms, is __arm__ isn't defined and we're not on Intel, we use an
alternate std::string layout. I.e., the libcxx string test fails on phones
because the hand-crafted "garbage" string structs are actually valid strings.

See:

```
  // _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for
  // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT left here for backward compatibility.
  #if (defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) &&       \
       (!defined(__arm__) || __ARM_ARCH_7K__ >= 2)) ||                           \
      defined(_LIBCPP_ALTERNATE_STRING_LAYOUT)
  #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
  #endif
```

Disable inspection of the garbage structs on Apple+ARM devices.
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
Commit d3e170c4388693b6628fa91cbf78506a5fb45439 by mark.searles
Revert "[AMDGPU] Don’t marke the .note section as ALLOC"

This reverts commit 977cd661cf019039dec7ffdd15bf0ac500828c87.

It breaks OpenCL testing. OpenCL Runtime is using PT_LOAD information
to calculate memory for global variables. This commit should be relanded once
the OpenCL runtime stops relying on PT_LOAD information for calculating global
variable memory size.

Differential Revision: https://reviews.llvm.org/D74995
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa.ll
The file was modifiedllvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
Commit 42060c0a987076567814f97abdf485a55bf6018a by riddleriver
[mlir][DeclarativeParser][NFC] Use explicit type names in TypeSwitch to
appease older GCC.

Older versions of GCC are unable to properly capture 'this' in template lambdas,
resulting in errors.
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
Commit 340feac6721e840f88c1e77dd79931eea5eaccf3 by scott.linder
[Driver] Escape the program path for -frecord-command-line

Similar to the rest of the command line that is recorded, the program
path must also have spaces and backslashes escaped. Without this
parsing the recorded command line becomes hard on platforms like
Windows where spaces and backslashes are common.

This was originally reverted in
577d9ce35532439203411c999deefc9c80e04c69; this version makes a test
agnostic to the presence of backslashes in paths on some platforms.

Patch By: Ravi Ramaseshan
Differential Revision: https://reviews.llvm.org/D74811
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/clang_f_opts.c
Commit bf4933b4ea657128f1afcf19758866d41e5aebf9 by arsenm2
AMDGPU/GlobalISel: Remove dead code
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Commit 3ec3f62f0a0b1ac13230922c91ffc988c1b1e8d5 by hhb
Allow customized relative PYTHONHOME (Attemp 1)

Summary:
This is another attempt of 0bb90628b5f7c170689d2d3f019af773772fc649.

The difference is that g_python_home is not declared as const. Since
some versions of python do not expect that.

Subscribers: mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D74998
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
The file was modifiedlldb/include/lldb/Host/Config.h.cmake
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Commit d17123b2577e610b2a19de1f530cecea353c8c7a by maskray
[llvm-objdump][test] Fix source-interleave-function-from-debug.test on Windows after D74507
The file was modifiedllvm/test/tools/llvm-objdump/X86/source-interleave-function-from-debug.test
Commit 3648370a79235ddc7a26c2db5b968725c320f6aa by aheejin
[WebAssembly] Fix a non-determinism problem in FixIrreducibleControlFlow

Summary:
We already sorted the blocks when fixing up a set of mutual
loop entries, however, there can be multiple sets of such
mutual loop entries, and the order we encounter them
should not be random, so sort them too.

Fixes https://bugs.llvm.org/show_bug.cgi?id=44982

Patch by Alon Zakai (kripken)

Reviewers: aheejin, sbc100, dschuff

Subscribers: mgrang, sunfish, hiraditya, jgravelle-google, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74999
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
Commit e33c9bb245a0c17cdd5c06897a911f908215db50 by apilipenko
Flags for displaying only hot nodes in CFGPrinter graph

Added two flags to omit uncommon or dead paths in the CFG graphs:
  -cfg-hide-unreachable-paths
  -cfg-hide-deoptimize-paths

The main purpose is performance analysis when such block are not
"interesting" from perspective of common path performance.

Reviewed By: apilipenko, davidxl

Differential Revision: https://reviews.llvm.org/D74346
The file was modifiedllvm/include/llvm/Analysis/CFGPrinter.h
The file was modifiedllvm/lib/Analysis/CFGPrinter.cpp
The file was addedllvm/test/Other/cfg_deopt_unreach.ll
Commit ebee131259719fa9c06cd346e21ace3fa8ac0888 by maskray
[lldb][test] Fix sh_type of .debug_cu_index and .debug_tu_index

They do not have the SHF_EXCLUDE flag.
After D73999, MC errors `changed section type for .debug_cu_index, expected: 0x0`
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/dwp.s
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s