SuccessChanges

Summary

  1. [lldb] Correct wording of EXP_MSG (details)
  2. [SystemZ/ZOS] Additions to the build system. (details)
  3. [llvm-readelf][test] - Refine the sections-ext.test (details)
  4. [llvm-readobj] - Don`t crash when --section-symbols is requested for an object w/o .symtab. (details)
  5. [lldb/DWARF] More DW_AT_const_value fixes (details)
  6. [obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files) (details)
  7. Copy m_plan_is_for_signal_trap member. (details)
  8. [libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling (details)
  9. [gn build] Port 357dc1ed125 (details)
  10. [RDA] Don't visit the BB of the instruction in getReachingUniqueMIDef (details)
  11. [llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values. (details)
  12. [llvm-readobj][test] - Commit trivial.obj.elf-amdhsa-gfx803 binary back. (details)
  13. [ARM] Increase MVE gather/scatter cost by MVECostFactor. (details)
  14. [llvm/Object] - Make dyn_cast<XCOFFObjectFile> work as it should. (details)
  15. [mlir][PDL] Add a PDL Interpreter Dialect (details)
  16. [Scheduling] Implement a new way to cluster loads/stores (details)
  17. [DWARFYAML] Make the unit_length and header_length fields optional. (details)
  18. [AMDGPU][GlobalISel] Eliminate barrier if workgroup size is not greater than wavefront size (details)
  19. GlobalISel: Combine G_ADD of G_PTRTOINT to G_PTR_ADD (details)
  20. AMDGPU/GlobalISel: Tolerate negated control flow intrinsic outputs (details)
  21. Add clang-cl "vctoolsdir" option to specify the location of the msvc toolchain (details)
  22. AMDGPU: Use Subtarget reference in SIInstrInfo (details)
  23. [Support] Allow printing the stack trace only for a given depth (details)
  24. [LegalizeTypes] Add ROTL/ROTR to ScalarizeVectorResult. (details)
  25. [libc] Add implementations for sqrt, sqrtf, and sqrtl. (details)
  26. [OpenMP] Fix build on macOS sdk 10.12 and newer (details)
  27. [AMDGPU] Make more use of Subtarget reference in SIInstrInfo (details)
  28. [lldb][NFC] Simplify string literal in GDBRemoteCommunicationClient (details)
  29. Fix failing tests after VCTOOLSDIR change (details)
  30. Bump -len_control value in fuzzer-custommutator.test (PR47286) (details)
  31. [clangd] Enable recovery-ast-type by default. (details)
  32. [libc++] Always run Ninja through xcrun in the macOS CI scripts (details)
  33. [clangd] Use string[] for allCommitCharacters (details)
  34. [clang][NFC] Properly fix a GCC warning in ASTImporterTest.cpp (details)
  35. [Clang] Fix tests following rG087047144210 (details)
  36. [libc++] Use xcrun to find Ninja in the macOS backdeployment CI too (details)
  37. [LiveDebugValues][NFC] Add instr-ref tests, adapt old tests (details)
  38. [LV] Fallback strategies if tail-folding fails (details)
  39. Fix frame pointer layout on AArch64 Linux. (details)
  40. Fix quiet mode in git-clang-format (details)
  41. Revert "[LiveDebugValues][NFC] Add instr-ref tests, adapt old tests" (details)
  42. [libFuzzer] Error and exit if user supplied fuzzer writeable directories don't exist (details)
  43. [SystemZ/ZOS] Add header file to encapsulate use of <sysexits.h> (details)
  44. [SyntaxTree] Migrate `ParamatersAndQualifiers` to use the new List API (details)
  45. [LegalizeTypes] Remove WidenVecRes_Shift and just use WidenVecRes_Binary (details)
  46. [profile] Add InstrProfilingVersionVar.c.o to Darwin kext builtins (details)
  47. [XCOFF][AIX] Support relocation generation for large code model (details)
  48. [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab (details)
  49. [llvm] [DAG] Fix bug in llvm.get.active.lane.mask lowering (details)
  50. Revert "Fix frame pointer layout on AArch64 Linux." (details)
  51. [NFC][InstCombine] Add tests with PHI-of-{insert,extract}value with multiple uses (details)
  52. [NFC][Value] Fixup comments, "N users" is NOT the same as "N uses". (details)
  53. [Value][InstCombine] Fix one-use checks in PHI-of-op -> Op-of-PHI[s] transforms to be one-user checks (details)
  54. [clang] Exclude invalid destructors from lookups. (details)
  55. [X86] Add assembler support for .d32 and .d8 mnemonic suffixes to control displacement size. (details)
  56. [IR] Add NoUndef attribute to Intrinsics.td (details)
  57. [SampleFDO] Enhance profile remapping support for searching inline instance (details)
  58. AMDGPU: Don't assert on misaligned DS read2/write2 offsets (details)
  59. [Hexagon] Implement llvm.masked.load and llvm.masked.store for HVX (details)
  60. [SVE] Remove calls to VectorType::getNumElements from clang (details)
  61. [Polly] Use llvm::function_ref. NFC. (details)
  62. [Polly] Inline ShoulDelete lambda. NFC. (details)
  63. [LTO] Don't apply LTOPostLink module flag during writeMergedModule (details)
  64. [MC][SVE] Fix data operand for instruction alias of `st1d`. (details)
Commit 9ad5d37fd917a5b8b3ffe5c12145c85021ee2578 by david.spickett
[lldb] Correct wording of EXP_MSG

EXP_MSG generates a message to show on assert
failure. Currently it looks like:
AssertionError: False is not True : '<cmd>'
returns expected result, got '<actual output>'

Which seems to say that the test failed but
also got the expected result.

It should say:
AssertionError: False is not True : '<cmd>'
returned unexpected result, got '<actual output>'

Reviewed By: teemperor, #lldb

Differential Revision: https://reviews.llvm.org/D86603
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit 00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097 by kai
[SystemZ/ZOS] Additions to the build system.

This change extend the CMake files with the necessary additions
to build LLVM for z/OS.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D83866
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
The file was modifiedllvm/cmake/modules/GetHostTriple.cmake
The file was modifiedllvm/CMakeLists.txt
The file was modifiedllvm/cmake/modules/HandleLLVMOptions.cmake
Commit f65ab626e549f8ddd4cdf10ac12371de3af73aa7 by grimar
[llvm-readelf][test] - Refine the sections-ext.test

The `sections-ext.test` is a test for ELF that is used
to test `--st`, `--sr` and `--sd` extension options for `-S`.

There are 2 problems with it:
1) It is broken, because for CHECK lines it contains there is
no corresponding `FileCheck` call.

2) It uses the precompiled object: `trivial.obj.elf-i386`.
This is the last ELF test where `trivial.obj.elf-i386` is used so we can get
rid of the binary and use an YAML description.

Also, there is a `Inputs/trivial.ll` file that describes how `trivial*` objects
in `Inputs` folders are created. I've removed it from `ELF`, because it is not
actual anymore (we have no more input binaries created with the use of trivial.ll there)
and copied the refined versions of it to `COFF`, `MachO` and `wasm` Input folders.

Differential revision: https://reviews.llvm.org/D86462
The file was addedllvm/test/tools/llvm-readobj/wasm/Inputs/trivial.ll
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-i386
The file was modifiedllvm/test/tools/llvm-readobj/ELF/sections-ext.test
The file was addedllvm/test/tools/llvm-readobj/COFF/Inputs/trivial.ll
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.ll
The file was addedllvm/test/tools/llvm-readobj/MachO/Inputs/trivial.ll
Commit 7749e2de20d82a6bb8b8beaa74b2a8dbd8232067 by grimar
[llvm-readobj] - Don`t crash when --section-symbols is requested for an object w/o .symtab.

llvm-readobj crashes when `-S --section-symbols` is used
on an object that has no symbol table.

The patch fixes it.

Differential revision: https://reviews.llvm.org/D86520
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/sections-ext.test
Commit 82982304d7095891b10faacdbf9b4eb73e92a92f by pavel
[lldb/DWARF] More DW_AT_const_value fixes

This fixes several issues in handling of DW_AT_const_value attributes:
- the first is that the size of the data given by data forms does not
  need to match the size of the underlying variable. We already had the
  case to handle this for DW_FORM_(us)data -- this extends the handling
  to other data forms. The main reason this was not picked up is because
  clang uses leb forms in these cases while gcc prefers the fixed-size
  ones.
- The handling of DW_AT_strp form was completely broken -- we would end
  up using the pointer value as the result. I've reorganized this code
  so that it handles all string forms uniformly.
- In case of a completely bogus form we would crash due to
  strlen(nullptr).

Depends on D86311.

Differential Revision: https://reviews.llvm.org/D86348
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value.s
The file was addedlldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value-bitfields.s
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Commit 357dc1ed125e4bf55f1e99fb141fc054c285edbf by grimar
[obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files)

This removes Error.cpp/.h files from obj2yaml.
These files are not needed because we are
using `Error`s instead of error codes widely and do
not need a logic related to obj2yaml specific
error codes anymore.

I had to adjust just a few lines of tool's code
to remove remaining dependencies.

Differential revision: https://reviews.llvm.org/D86536
The file was modifiedllvm/tools/obj2yaml/obj2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/dwarf2yaml.cpp
The file was removedllvm/tools/obj2yaml/Error.h
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/CMakeLists.txt
The file was removedllvm/tools/obj2yaml/Error.cpp
The file was modifiedllvm/tools/obj2yaml/macho2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/minidump2yaml.cpp
Commit 642cb7865f35ad7dbac78d716fcddaff561e8639 by benny.kra
Copy m_plan_is_for_signal_trap member.

Otherwise it would stay uninitialized. Found by msan.
The file was modifiedlldb/include/lldb/Symbol/UnwindPlan.h
Commit e524daa7e8719f4b43e6ebcf25fd4e7d74c5d1c4 by martin
[libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling

Currently, the assembly functions for restoring register state have
been direct implementations of the Registers_*::jumpto() method
(contrary to the functions for saving register state, which are
implementations of the extern C function __unw_getcontext). This has
included having the assembly function name match the C++ mangling of
that method name (and having the function match the C++ member
function calling convention). To simplify the interface of the assembly
implementations, make the functions have C calling conventions and
name mangling.

This fixes building the library in with a MSVC C++ ABI with clang-cl,
which uses a significantly different method name mangling scheme.
(The library might not be of much use as C++ exception unwinder in such
an environment, but the libunwind.h interface for stepwise unwinding
still is usable, as is the _Unwind_Backtrace function.)

Differential Revision: https://reviews.llvm.org/D86041
The file was modifiedlibunwind/src/UnwindRegistersRestore.S
The file was modifiedlibunwind/src/Registers.hpp
Commit fc13d3d50e60e67b485720d5b2d049e8699249cc by llvmgnsyncbot
[gn build] Port 357dc1ed125
The file was modifiedllvm/utils/gn/secondary/llvm/tools/obj2yaml/BUILD.gn
Commit 85dd852a0d46684883fe3b4b19e780ba5d915b06 by samuel.tebbs
[RDA] Don't visit the BB of the instruction in getReachingUniqueMIDef

If the basic block of the instruction passed to getUniqueReachingMIDef
is a transitive predecessor of itself and has a definition of the
register, the function will return that definition even if it is after
the instruction given to the function. This patch stops the function
from scanning the instruction's basic block to prevent this.

Differential Revision: https://reviews.llvm.org/D86607
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp
Commit cbedbd12e9837e049f0a936636a82ff39b75692b by grimar
[llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values.

We have no tests for OS/ABI values specific to
EM_TI_C6000, ELFOSABI_AMDGPU_MESA3D and ELFOSABI_ARM machines.

Also, related arrays in the code are not grouped together.
(That is why such testing was missed I guess).

The patch fixes that all.

Differential revision: https://reviews.llvm.org/D86341
The file was modifiedllvm/test/tools/llvm-readobj/ELF/file-header-os-abi.test
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 4b5460762a9634ba6a96b9589e11a1f7a9beaa3f by grimar
[llvm-readobj][test] - Commit trivial.obj.elf-amdhsa-gfx803 binary back.

It was removed in rGcbedbd12e9837e049f0a936636a82ff39b75692b by mistake.
The file was addedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
Commit 677c1590c03474c8238fbc21b9c0dae9b5e5f4d2 by david.green
[ARM] Increase MVE gather/scatter cost by MVECostFactor.

MVE Gather scatter codegeneration is looking a lot better than it used
to, but still has some issues. The instructions we currently model as 1
cycle per element, which is a bit low for some cases. Increasing the
cost by the MVECostFactor brings them in-line with our other instruction
costs. This will have the effect of only generating then when the extra
benefit is more likely to overcome some of the issues. Notably in
running out of registers and vectorizing loops that could otherwise be
SLP vectorized.

In the short-term whilst we look at other ways of dealing with those
more directly, we can increase the costs of gathers to make them more
likely to be beneficial when created.

Differential Revision: https://reviews.llvm.org/D86444
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
The file was modifiedllvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Commit 92c527e5a2b49fb1213ceda97738d4caf414666a by grimar
[llvm/Object] - Make dyn_cast<XCOFFObjectFile> work as it should.

Currently, `dyn_cast<XCOFFObjectFile>` always does cast and returns a pointer,
even when we pass `ELF`/`Wasm`/`Mach-O` or `COFF` instead of `XCOFF`.

It happens because `XCOFFObjectFile` class does not implement `classof`.
I've fixed it and added a unit test.

Differential revision: https://reviews.llvm.org/D86542
The file was modifiedllvm/include/llvm/Object/XCOFFObjectFile.h
The file was modifiedllvm/unittests/Object/XCOFFObjectFileTest.cpp
Commit d289a97f91443177b605926668512479c2cee37b by riddleriver
[mlir][PDL] Add a PDL Interpreter Dialect

The PDL Interpreter dialect provides a lower level abstraction compared to the PDL dialect, and is targeted towards low level optimization and interpreter code generation. The dialect operations encapsulates low-level pattern match and rewrite "primitives", such as navigating the IR (Operation::getOperand), creating new operations (OpBuilder::create), etc. Many of the operations within this dialect also fuse branching control flow with some form of a predicate comparison operation. This type of fusion reduces the amount of work that an interpreter must do when executing.

An example of this representation is shown below:

```mlir
// The following high level PDL pattern:
pdl.pattern : benefit(1) {
  %resultType = pdl.type
  %inputOperand = pdl.input
  %root, %results = pdl.operation "foo.op"(%inputOperand) -> %resultType
  pdl.rewrite %root {
    pdl.replace %root with (%inputOperand)
  }
}

// May be represented in the interpreter dialect as follows:
module {
  func @matcher(%arg0: !pdl.operation) {
    pdl_interp.check_operation_name of %arg0 is "foo.op" -> ^bb2, ^bb1
  ^bb1:
    pdl_interp.return
  ^bb2:
    pdl_interp.check_operand_count of %arg0 is 1 -> ^bb3, ^bb1
  ^bb3:
    pdl_interp.check_result_count of %arg0 is 1 -> ^bb4, ^bb1
  ^bb4:
    %0 = pdl_interp.get_operand 0 of %arg0
    pdl_interp.is_not_null %0 : !pdl.value -> ^bb5, ^bb1
  ^bb5:
    %1 = pdl_interp.get_result 0 of %arg0
    pdl_interp.is_not_null %1 : !pdl.value -> ^bb6, ^bb1
  ^bb6:
    pdl_interp.record_match @rewriters::@rewriter(%0, %arg0 : !pdl.value, !pdl.operation) : benefit(1), loc([%arg0]), root("foo.op") -> ^bb1
  }
  module @rewriters {
    func @rewriter(%arg0: !pdl.value, %arg1: !pdl.operation) {
      pdl_interp.replace %arg1 with(%arg0)
      pdl_interp.return
    }
  }
}
```

Differential Revision: https://reviews.llvm.org/D84579
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was addedmlir/include/mlir/Dialect/PDLInterp/IR/PDLInterp.h
The file was addedmlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
The file was addedmlir/lib/Dialect/PDLInterp/IR/CMakeLists.txt
The file was modifiedmlir/test/Dialect/PDL/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/PDL/IR/PDLOps.td
The file was modifiedmlir/lib/Parser/AttributeParser.cpp
The file was modifiedmlir/include/mlir/IR/Builders.h
The file was addedmlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td
The file was addedmlir/lib/Dialect/PDLInterp/CMakeLists.txt
The file was modifiedmlir/lib/Parser/Parser.h
The file was addedmlir/test/Dialect/PDLInterp/ops.mlir
The file was addedmlir/include/mlir/Dialect/PDLInterp/CMakeLists.txt
The file was modifiedmlir/test/Dialect/PDL/ops.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/Dialect/PDL/IR/PDLBase.td
The file was modifiedmlir/include/mlir/IR/Attributes.h
The file was modifiedmlir/include/mlir/Dialect/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/PDLInterp/IR/CMakeLists.txt
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/lib/Dialect/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/PDL/IR/PDL.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/include/mlir/IR/OpImplementation.h
Commit ebf3b188c6edcce7e90ddcacbe7c51c90d95b0ac by qshanz
[Scheduling] Implement a new way to cluster loads/stores

Before calling target hook to determine if two loads/stores are clusterable,
we put them into different groups to avoid fake cluster due to dependency.
For now, we are putting the loads/stores into the same group if they have
the same predecessor. We assume that, if two loads/stores have the same
predecessor, it is likely that, they didn't have dependency for each other.

However, one SUnit might have several predecessors and for now, we just
pick up the first predecessor that has non-data/non-artificial dependency,
which is too arbitrary. And we are struggling to fix it.

So, I am proposing some better implementation.
1. Collect all the loads/stores that has memory info first to reduce the complexity.
2. Sort these loads/stores so that we can stop the seeking as early as possible.
3. For each load/store, seeking for the first non-dependency instruction with the
   sorted order, and check if they can cluster or not.

Reviewed By: Jay Foad

Differential Revision: https://reviews.llvm.org/D85517
The file was modifiedllvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
The file was modifiedllvm/test/CodeGen/AArch64/aarch64-stp-cluster.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/max.i16.ll
The file was modifiedllvm/lib/CodeGen/MachineScheduler.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-realign.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs.ll
Commit 8daa3264a3329ad34a0b210afdd8699f27d66db2 by Xing
[DWARFYAML] Make the unit_length and header_length fields optional.

This patch makes the unit_length and header_length fields of line tables
optional. yaml2obj is able to infer them for us.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D86590
The file was modifiedllvm/test/tools/yaml2obj/ELF/DWARF/debug-line.yaml
The file was modifiedllvm/tools/obj2yaml/dwarf2yaml.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/DWARFYAML.h
The file was modifiedllvm/lib/ObjectYAML/DWARFEmitter.cpp
The file was modifiedllvm/lib/ObjectYAML/DWARFYAML.cpp
The file was modifiedllvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
Commit 831457c6d59edb0e381917b35ca6099f9b86c6e8 by jay.foad
[AMDGPU][GlobalISel] Eliminate barrier if workgroup size is not greater than wavefront size

If a workgroup size is known to be not greater than wavefront size
the s_barrier instruction is not needed since all threads are guaranteed
to come to the same point at the same time.

This is the same optimization that was implemented for SelectionDAG in
D31731.

Differential Revision: https://reviews.llvm.org/D86609
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/barrier-elimination.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
Commit eb074088c983ce6f255e0e83babdd32a4f2dd457 by Matthew.Arsenault
GlobalISel: Combine G_ADD of G_PTRTOINT to G_PTR_ADD

This produces less work for addressing mode matching. I think this is
safe since I don't think machine IR is supposed to give the same
aliasing properties as getelementptr in the IR.
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-add-to-ptradd.mir
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 21ccedc24fc49b43e84095b4773f8aa86c366dac by Matthew.Arsenault
AMDGPU/GlobalISel: Tolerate negated control flow intrinsic outputs

If the condition output is negated, swap the branch targets. This is
similar to what SelectionDAG does for when SelectionDAGBuilder
decides to invert the condition and swap the branches.

This is leaving behind a dead constant def for some reason.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-amdgcn.if-invalid.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-brcond.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit 08704714421086e775a297339fc60963cc07eec9 by hans
Add clang-cl "vctoolsdir" option to specify the location of the msvc toolchain

Add an option to directly specify where the msvc toolchain lives for
clang-cl and avoid unwanted file and registry probes.

Differential revision: https://reviews.llvm.org/D85998
The file was modifiedclang/test/Driver/cl-options.c
The file was modifiedclang/lib/Driver/ToolChains/MSVC.cpp
The file was modifiedclang/include/clang/Driver/Options.td
Commit ff34116cf022ca010d60b972dae55016cd5f7478 by Matthew.Arsenault
AMDGPU: Use Subtarget reference in SIInstrInfo
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Commit a7da7e421c54e0053628f18f3750d4a8588cd627 by alexandre.ganea
[Support] Allow printing the stack trace only for a given depth

Differential Revision: https://reviews.llvm.org/D85458
The file was modifiedllvm/lib/Support/Unix/Signals.inc
The file was modifiedllvm/lib/Support/Windows/Signals.inc
The file was modifiedllvm/unittests/Support/CrashRecoveryTest.cpp
The file was modifiedllvm/include/llvm/Support/Signals.h
Commit 75d159f924868ec93e3008b04b637412b64de29e by jay.foad
[LegalizeTypes] Add ROTL/ROTR to ScalarizeVectorResult.

We can scalarize these just like any other binary operation.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47303 caused by D77152.

Differential Revision: https://reviews.llvm.org/D86601
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Commit 5078825aa982905088502f14b5387fc5c96017fe by lntue
[libc] Add implementations for sqrt, sqrtf, and sqrtl.

Differential Revision: https://reviews.llvm.org/D84726
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
The file was modifiedlibc/src/math/CMakeLists.txt
The file was addedlibc/test/src/math/sqrtl_test.cpp
The file was addedlibc/src/math/sqrtl.cpp
The file was modifiedlibc/test/src/math/CMakeLists.txt
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was modifiedlibc/spec/stdc.td
The file was addedlibc/test/src/math/sqrt_test.cpp
The file was modifiedlibc/config/linux/api.td
The file was addedlibc/src/math/sqrtf.cpp
The file was addedlibc/src/math/sqrt.cpp
The file was addedlibc/test/src/math/sqrtf_test.cpp
The file was addedlibc/utils/FPUtil/Sqrt.h
The file was addedlibc/utils/FPUtil/SqrtLongDoubleX86.h
The file was addedlibc/src/math/sqrt.h
The file was addedlibc/src/math/sqrtl.h
The file was addedlibc/src/math/sqrtf.h
Commit 09af378f49dca98bc931ba0ff2c1cde307fe7c2c by Andrey.Churbanov
[OpenMP] Fix build on macOS sdk 10.12 and newer

Patch by nihui (Ni Hui)

Differential Revision: https://reviews.llvm.org/D76755
The file was modifiedopenmp/runtime/src/kmp_wrapper_getpid.h
Commit a75e67b3b4885efdb6a0b0b2939cccb5a9e67b72 by jay.foad
[AMDGPU] Make more use of Subtarget reference in SIInstrInfo
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Commit 4a15f51a4f7726e12c327fa30e76d90a2b90430b by Raphael Isemann
[lldb][NFC] Simplify string literal in GDBRemoteCommunicationClient
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Commit 7a34dca0f3918ab1c0397e56dd64a3c04164c8b6 by hans
Fix failing tests after VCTOOLSDIR change

Switch from hardcoded x64 arch to a regex in the target triple

Differential revision: https://reviews.llvm.org/D86622
The file was modifiedclang/test/Driver/cl-options.c
Commit 8421503300c6145480710761983f089ccbe0bb56 by hans
Bump -len_control value in fuzzer-custommutator.test (PR47286)

to make the test more stable, as suggested by mmoroz.
The file was modifiedcompiler-rt/test/fuzzer/fuzzer-custommutator.test
Commit 667867e0df26e45ed2c86e192fee69dd484167c7 by hokein.wu
[clangd] Enable recovery-ast-type by default.

Differential Revision: https://reviews.llvm.org/D86602
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
Commit 3d120b6f7be816d188bd05271fff17f0030db9b2 by Louis Dionne
[libc++] Always run Ninja through xcrun in the macOS CI scripts

Ninja isn't installed by default on OSX, so run it through xcrun to find
the one in the developer tools if needed.
The file was modifiedlibcxx/utils/ci/macos-trunk.sh
Commit 9d11e6789c477ce6104e29745ca70e13c9fafeb0 by kbobyrev
[clangd] Use string[] for allCommitCharacters

As per LSP specification, allCommitCharacters should be string[] instead of
string:

https://microsoft.github.io/language-server-protocol/specification#textDocument_completion

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D86604
The file was modifiedclang-tools-extra/clangd/test/initialize-params.test
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
Commit 677e3db5806af9c6bbe9e76c135f801e8b06a8ed by Raphael Isemann
[clang][NFC] Properly fix a GCC warning in ASTImporterTest.cpp

Follow up to c9b45ce1fd97531c228e092bedee719b971f82a3 which just defined
the function instead of just 'using' the function from the base class (thanks
David).
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
Commit 33ce275fc156c8b015acfad918937028b2cc235c by alexandre.ganea
[Clang] Fix tests following rG087047144210
The file was modifiedclang/test/Driver/cl-options.c
Commit f1a987366fb9e20abdcb5f87e2be1dabb4401cb2 by Louis Dionne
[libc++] Use xcrun to find Ninja in the macOS backdeployment CI too
The file was modifiedlibcxx/utils/ci/macos-backdeployment.sh
Commit 60db26a66d5346b2feae279f6c928bde48078893 by jeremy.morse
[LiveDebugValues][NFC] Add instr-ref tests, adapt old tests

This patch adds a few tests in DebugInfo/MIR/InstrRef/ of interesting
behaviour that the instruction referencing implementation of
LiveDebugValues has. Mostly, these tests exist to ensure that if you
give the "-experimental-debug-variable-locations" command line switch,
the right implementation runs; and to ensure it behaves the same way as
the VarLoc LiveDebugValues implementation.

I've also touched roughly 30 other tests, purely to make the tests less
rigid about what output to accept. DBG_VALUE instructions are usually
printed with a trailing !debug-location indicating its scope:

  !debug-location !1234

However InstrRefBasedLDV produces new DebugLoc instances on the fly,
meaning there sometimes isn't a numbered node when they're printed,
making the output:

  !debug-location !DILocation(line: 0, blah blah)

Which causes a ton of these tests to fail. This patch removes checks for
that final part of each DBG_VALUE instruction. None of them appear to
be actually checking the scope is correct, just that it's present, so
I don't believe there's any loss in coverage here.

Differential Revision: https://reviews.llvm.org/D83054
The file was modifiedllvm/test/DebugInfo/MIR/Mips/last-inst-bundled.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_move.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_clobber.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_outer_moved.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_two_backedge.mir
The file was addedllvm/test/DebugInfo/MIR/X86/livedebugvalues_load_in_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_move_to_clobber.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_clobbered.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond_move.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_clobber.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues-ignores-metaInstructions.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb.mir
The file was addedllvm/test/DebugInfo/MIR/X86/livedebugvalues_many_loop_heads.mir
The file was addedllvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_insensitive_downgrade.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/kill-after-spill.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_moved.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond.mir
The file was addedllvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_downgradefeedback_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_break.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop.mir
The file was addedllvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_path_lengths.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_move.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values-bad-transfer.mir
Commit bda8fbe2d2af208181efcf029b0c0bc0606da39b by sjoerd.meijer
[LV] Fallback strategies if tail-folding fails

This implements 2 different vectorisation fallback strategies if tail-folding
fails: 1) don't vectorise at all, or 2) vectorise using a scalar epilogue. This
can be controlled with option -prefer-predicate-over-epilogue, that has been
changed to take a numeric value corresponding to the tail-folding preference
and preferred fallback.

Patch by: Pierre van Houtryve, Sjoerd Meijer.

Differential Revision: https://reviews.llvm.org/D79783
The file was modifiedllvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/reduction-predselect.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/prefer-tail-loop-folding.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/memdep-fold-tail.ll
The file was addedllvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/tail-folding-prefer-flag.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/tail-folding-counting-down.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr46525-expander-insertpoint.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/tail-folding-reduces-vf.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/tail-folding-counting-down.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was addedllvm/test/Transforms/LoopVectorize/ARM/tail-folding-scalar-epilogue-fallback.ll
The file was modifiedllvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
Commit a0aed80b22d1b698b86e0c16109fdfd4d592756f by resistor
Fix frame pointer layout on AArch64 Linux.

When floating point callee-saved registers were used, the frame pointer would
incorrectly point to the bottom of the CSR space (containing saved floating-point
registers), rather than to the frame record.

While all frame offsets were calculated consistently, resulting in working code,
this prevented stack walkers from being about to traverse the frame list.
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
Commit 294e1900f281f35aff0362232225e85c2e551e55 by sguelton
Fix quiet mode in git-clang-format

Quiet mode is very useful for scripting, when only the diff format output is
required, or no output if not formatting is needed.
In case of no modified files, git-clang-format will output to screen even though
the quiet mode enabled.

This patch changes this behavior, so if quiet flag passes in - no output will be
available, even if no modified files exists.

Differential Revision: https://reviews.llvm.org/D85485
The file was modifiedclang/tools/clang-format/git-clang-format
Commit 5b9c2b1bea78cdb62bad802b7d3d32dfeb1438a7 by jeremy.morse
Revert "[LiveDebugValues][NFC] Add instr-ref tests, adapt old tests"

Asan has picked up a memory leak, which will require some investigation:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/45372/steps/check-llvm%20asan/logs/stdio

This reverts commit 60db26a66d5346b2feae279f6c928bde48078893.
The file was removedllvm/test/DebugInfo/MIR/X86/livedebugvalues_load_in_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_move.mir
The file was modifiedllvm/test/DebugInfo/MIR/Mips/last-inst-bundled.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond_move.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/kill-after-spill.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_clobbered.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_move_to_clobber.mir
The file was removedllvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_path_lengths.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_two_backedge.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_clobber.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_moved.mir
The file was removedllvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_insensitive_downgrade.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond.mir
The file was removedllvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_downgradefeedback_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_outer_moved.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues-ignores-metaInstructions.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_break.mir
The file was removedllvm/test/DebugInfo/MIR/X86/livedebugvalues_many_loop_heads.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values-bad-transfer.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_move.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_clobber.mir
Commit 2392ff093af128d5e46ce31e2ffa0b3e17185e32 by mascasa
[libFuzzer] Error and exit if user supplied fuzzer writeable directories don't exist

Currently, libFuzzer will exit with an error message if a non-existent
corpus directory is provided. However, if a user provides a non-existent
directory for the `artifact_prefix`, `exact_artifact_path`, or
`features_dir`, libFuzzer will continue execution but silently fail to
write artifacts/features.

To improve the user experience, this PR adds validation for the existence of
all user supplied directories before executing the main fuzzing loop. If they
don't exist, libFuzzer will exit with an error message.

Patch By: dgg5503

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D84808
The file was modifiedcompiler-rt/test/fuzzer/fuzzer-dirs.test
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerIO.h
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerIOPosix.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerIOWindows.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerDriver.cpp
Commit ed07e1fe0ffdb2c1dbff26ff4cf7558e0c419737 by kai
[SystemZ/ZOS] Add header file to encapsulate use of <sysexits.h>

The non-standard header file `<sysexits.h>` provides some return values.
`EX_IOERR` is used to as a special value to signal a broken pipe to the clang driver.
On z/OS Unix System Services, this header file does not exists. This patch

- adds a check for `<sysexits.h>`, removing the dependency on `LLVM_ON_UNIX`
- adds a new header file `llvm/Support/ExitCodes`, which either includes
  `<sysexits.h>` or defines `EX_IOERR`
- updates the users of `EX_IOERR` to include the new header file

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D83472
The file was addedllvm/include/llvm/Support/ExitCodes.h
The file was modifiedllvm/lib/Support/Unix/Signals.inc
The file was modifiedllvm/cmake/config-ix.cmake
The file was modifiedllvm/include/llvm/Config/config.h.cmake
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedllvm/lib/Support/CrashRecoveryContext.cpp
Commit dc3d4743277b47c0bc8cddbeb4b5e265252ee304 by ecaldas
[SyntaxTree] Migrate `ParamatersAndQualifiers` to use the new List API

Fix: Add missing `List::getTerminationKind()`, `List::canBeEmpty()`,
`List::getDelimiterTokenKind()` for `CallArguments`.

Differential Revision: https://reviews.llvm.org/D86600
The file was modifiedclang/lib/Tooling/Syntax/Nodes.cpp
The file was modifiedclang/include/clang/Tooling/Syntax/Nodes.h
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
Commit 28bd47fc47683d35ff08ad2ee2888a5709bbed8d by craig.topper
[LegalizeTypes] Remove WidenVecRes_Shift and just use WidenVecRes_Binary

This function seems to allow for the shift amount to have a different type than the result, but I don't think we do that anywhere else for vector shifts. We also don't have any support for legalizing the shift amount alone if the result is legal and the shift amount type isn't. The code coverage report here shows this code as uncovered http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp.html

Differential Revision: https://reviews.llvm.org/D86475
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Commit 1f47f89a901f438d17836b6c5341fcb55a026d61 by Vedant Kumar
[profile] Add InstrProfilingVersionVar.c.o to Darwin kext builtins

Fixes a build failure in the Darwin kernel. Tested with:

% nm -mU lib/libclang_rt.cc_kext_x86_64h_osx.a | grep __llvm_profile_raw_version

rdar://67809173
The file was modifiedcompiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
Commit 413054400d949ddd15e9bfdcb587502ea0311fcf by jasonliu
[XCOFF][AIX] Support relocation generation for large code model

Summary:
Support TOCU and TOCL relocation type for object file generation.

Reviewed by: DiggerLin

Differential Revision: https://reviews.llvm.org/D84549
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
The file was addedllvm/test/CodeGen/PowerPC/aix-xcoff-reloc-large.ll
The file was modifiedllvm/lib/MC/XCOFFObjectWriter.cpp
Commit 34b289b6dbcf1cdb328ab0a13cdedf96701394af by Steven Wu
[ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab

Instead of computing GUID based on some assumption about symbol mangling
rule from IRName to symbol name, lookup the IRName from all the symtabs
from all the input files to see if there are any matching symbols entry
provides the IRName for GUID computation.

rdar://65853754

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D84803
The file was modifiedllvm/test/ThinLTO/X86/internalize.ll
The file was addedllvm/test/ThinLTO/X86/mangled_symbol.ll
The file was modifiedllvm/test/ThinLTO/X86/weak_resolution.ll
The file was modifiedllvm/lib/LTO/ThinLTOCodeGenerator.cpp
The file was modifiedllvm/test/ThinLTO/X86/weak_resolution_single.ll
Commit 72305a08ffcb2da10a33732adfaa8757ba70904f by ajcbik
[llvm] [DAG] Fix bug in llvm.get.active.lane.mask lowering

This intrinsic only accepted proper machine vector lengths.
Fixed by this change. With unit tests.

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

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D86585
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was addedllvm/test/CodeGen/X86/pr47299.ll
Commit 9061eb8245cc1ae25e8f7865062d1d8e44406994 by resistor
Revert "Fix frame pointer layout on AArch64 Linux."

This broke stage2 of clang-cmake-aarch64-full.

This reverts commit a0aed80b22d1b698b86e0c16109fdfd4d592756f.
The file was modifiedllvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Commit 8bfe46dce22266e596370eac86b1aae799300e7e by lebedev.ri
[NFC][InstCombine] Add tests with PHI-of-{insert,extract}value with multiple uses

It is fine if the operation has multiple uses, as long as they are all
in this very PHI node.
The file was modifiedllvm/test/Transforms/InstCombine/phi-of-extractvalues.ll
The file was modifiedllvm/test/Transforms/InstCombine/phi-of-insertvalues.ll
Commit c07a430bd39cccb64712ddcba85254a5bb1cd89b by lebedev.ri
[NFC][Value] Fixup comments, "N users" is NOT the same as "N uses".

In those cases, it really means "N uses".
The file was modifiedllvm/include/llvm/IR/Value.h
Commit 95848ea101274b8bd774c63bad55f21a08080705 by lebedev.ri
[Value][InstCombine] Fix one-use checks in PHI-of-op -> Op-of-PHI[s] transforms to be one-user checks

As FIXME said, they really should be checking for a single user,
not use, so let's do that. It is not *that* unusual to have
the same value as incoming value in a PHI node, not unlike
how a PHI may have the same incoming basic block more than once.

There isn't a nice way to do that, Value::users() isn't uniqified,
and Value only tracks it's uses, not Users, so the check is
potentially costly since it does indeed potentially involes
traversing the entire use list of a value.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi-of-extractvalues.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
The file was modifiedllvm/include/llvm/IR/Value.h
The file was modifiedllvm/test/Transforms/PGOProfile/chr.ll
The file was modifiedllvm/lib/IR/Value.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi-of-insertvalues.ll
The file was modifiedllvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll
Commit eed0af6179ca4fe9e60121e0829ed8d3849b1ce5 by adamcz
[clang] Exclude invalid destructors from lookups.

This fixes a crash when declaring a destructor with a wrong name, then
writing result to pch file and loading it again. The PCH storage uses
DeclarationNameKey as key and it is the same key for both the invalid
destructor and the implicit one that was created because the other one
was invalid. When querying for the Foo::~Foo we end up getting
Foo::~Bar, which is then rejected and we end up with nullptr in
CXXRecordDecl::GetDestructor().

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

Differential Revision: https://reviews.llvm.org/D86624
The file was modifiedclang/lib/AST/DeclBase.cpp
The file was addedclang/test/PCH/cxx-invalid-destructor.cpp
The file was addedclang/test/PCH/cxx-invalid-destructor.h
Commit 09288bcbf5f124a2b0e24a6b1f2d27b66dba9adf by craig.topper
[X86] Add assembler support for .d32 and .d8 mnemonic suffixes to control displacement size.

This is an older syntax than the {disp32} and {disp8} pseudo
prefixes that were added a few weeks ago. We can reuse most of
the support for that to support .d32 and .d8 as well.
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/test/MC/X86/x86-64.s
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/test/MC/X86/x86-32.s
Commit 684b43c0cfb1092a65c237b39d0662bfe0a2c97a by aqjune
[IR] Add NoUndef attribute to Intrinsics.td

This patch adds NoUndef to Intrinsics.td.
The attribute is attached to llvm.assume's operand, because llvm.assume(undef)
is UB.
It is attached to pointer operands of several memory accessing intrinsics
as well.

This change makes ValueTracking::getGuaranteedNonPoisonOps' intrinsic check
unnecessary, so it is removed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D86576
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedmlir/test/Target/llvmir-intrinsics.mlir
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/utils/TableGen/CodeGenIntrinsics.h
The file was modifiedllvm/utils/TableGen/IntrinsicEmitter.cpp
The file was modifiedllvm/test/Transforms/EarlyCSE/invariant.start.ll
Commit c67ccf5fafc8c035f152ce30115bbdacf23530d5 by wmi
[SampleFDO] Enhance profile remapping support for searching inline instance
and indirect call promotion candidate.

Profile remapping is a feature to match a function in the module with its
profile in sample profile if the function name and the name in profile look
different but are equivalent using given remapping rules. This is a useful
feature to keep the performance stable by specifying some remapping rules
when sampleFDO targets are going through some large scale function signature
change.

However, currently profile remapping support is only valid for outline
function profile in SampleFDO. It cannot match a callee with an inline
instance profile if they have different but equivalent names. We found
that without the support for inline instance profile, remapping is less
effective for some large scale change.

To add that support, before any remapping lookup happens, all the names
in the profile will be inserted into remapper and the Key to the name
mapping will be recorded in a map called NameMap in the remapper. During
name lookup, a Key will be returned for the given name and it will be used
to extract an equivalent name in the profile from NameMap. So with the help
of the NameMap, we can translate any given name to an equivalent name in
the profile if it exists. Whenever we try to match a name in the module to
a name in the profile, we will try the match with the original name first,
and if it doesn't match, we will use the equivalent name got from remapper
to try the match for another time. In this way, the patch can enhance the
profile remapping support for searching inline instance and searching
indirect call promotion candidate.

In a planned large scale change of int64 type (long long) to int64_t (long),
we found the performance of a google internal benchmark degraded by 2% if
nothing was done. If existing profile remapping was enabled, the performance
degradation dropped to 1.2%. If the profile remapping with the current patch
was enabled, the performance degradation further dropped to 0.14% (Note the
experiment was done before searching indirect call promotion candidate was
added. We hope with the remapping support of searching indirect call promotion
candidate, the degradation can drop to 0% in the end. It will be evaluated
post commit).

Differential Revision: https://reviews.llvm.org/D86332
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
The file was modifiedllvm/lib/ProfileData/SampleProfReader.cpp
The file was modifiedllvm/unittests/ProfileData/SampleProfTest.cpp
The file was addedllvm/test/Transforms/SampleProfile/remap-2.ll
The file was addedllvm/test/Transforms/SampleProfile/Inputs/remap-2.prof
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h
The file was modifiedllvm/lib/ProfileData/SampleProf.cpp
Commit f78687df9b790b4f4177a72cbd25b49d14c437b4 by Matthew.Arsenault
AMDGPU: Don't assert on misaligned DS read2/write2 offsets

This would assert with unaligned DS access enabled. The offset may not
be aligned. Theoretically the pattern predicate should check the
memory alignment, although it is possible to have the memory be
aligned but not the immediate offset.

In this case I would expect it to use ds_{read|write}_b64 with
unaligned access, but am not clear if there's a reason it doesn't.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_read2.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_write2.ll
Commit e15143d31bca3973db51714af6361f3e77a9e058 by kparzysz
[Hexagon] Implement llvm.masked.load and llvm.masked.store for HVX
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
The file was modifiedllvm/test/CodeGen/Hexagon/store-vector-pred.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h
The file was addedllvm/test/CodeGen/Hexagon/autohvx/masked-vmem-basic.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonPatternsHVX.td
The file was modifiedllvm/test/CodeGen/Hexagon/hvx-bitcast-v64i1.ll
Commit 19e883fc59887e98a49ec03557ad2b6bc5537e03 by ctetreau
[SVE] Remove calls to VectorType::getNumElements from clang

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D82582
The file was modifiedclang/lib/CodeGen/CGAtomic.cpp
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/CodeGen/CGExprScalar.cpp
The file was modifiedclang/lib/CodeGen/CGExpr.cpp
The file was modifiedclang/lib/CodeGen/SwiftCallingConv.cpp
Commit c971b53b22a5cd43b54bf4773fe3c59ea1b805fb by llvm-project
[Polly] Use llvm::function_ref. NFC.

As suggested by David Blaike at
https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200824/822584.html
The file was modifiedpolly/include/polly/ScopInfo.h
The file was modifiedpolly/lib/Analysis/ScopInfo.cpp
Commit 6538fff37245921a0983d94c08af7e6cc120b3a9 by llvm-project
[Polly] Inline ShoulDelete lambda. NFC.

As suggested by David Blaikie at
ihttps://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200824/822584.html
The file was modifiedpolly/lib/Analysis/ScopInfo.cpp
The file was modifiedpolly/lib/Transform/Simplify.cpp
Commit 476ca330894bf42feeb6c13547d14c821f6b8e0a by Steven Wu
[LTO] Don't apply LTOPostLink module flag during writeMergedModule

For `ld64` which uses legacy LTOCodeGenerator, it relies on
writeMergedModule to perform `ld -r` (generates a linked object file).
If all the inputs to `ld -r` is fullLTO bitcode, `ld64` will linked the
bitcode module, internalize all the symbols and write out another
fullLTO bitcode object file. This bitcode file doesn't have all the
bitcode inputs and it should not have LTOPostLink module flag. It will
also cause error when this bitcode object file is linked with other LTO
object file.
Fix the issue by not applying LTOPostLink flag during writeMergedModule
function. The flag should only be added when all the bitcode are linked
and ready to be optimized.

rdar://problem/58462798

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D84789
The file was modifiedllvm/tools/llvm-lto/llvm-lto.cpp
The file was modifiedllvm/lib/LTO/LTOCodeGenerator.cpp
The file was modifiedllvm/test/LTO/ARM/lto-linking-metadata.ll
Commit 61dfa009579f10e75ef110a80c3e5b657ec5867a by francesco.petrogalli
[MC][SVE] Fix data operand for instruction alias of `st1d`.

The version of `st1d` that operates with vector plus immediate
addressing mode uses the alias `st1d { <Zn>.d }, <Pg>, [<Za>.d]` for
rendering `st1d { <Zn>.d }, <Pg>, [<Za>.d, #0]`. The disassembler was
generating `<Zn>.s` instead of `<Zn>.d>`.

Differential Revision: https://reviews.llvm.org/D86633
The file was modifiedllvm/test/MC/AArch64/SVE/st1h.s
The file was modifiedllvm/test/MC/AArch64/SVE/st1d.s
The file was modifiedllvm/test/MC/AArch64/SVE/st1b.s
The file was modifiedllvm/test/MC/AArch64/SVE/st1w.s
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td