SuccessChanges

Summary

  1. libclc: Add Mesa/SPIR-V target (details)
  2. [libunwind] Remove compatibility support for macOS 10.6 (details)
  3. Fix another Wsign-comparison warning. (details)
  4. Convert to early exit (NFC) (details)
  5. Convert to early exit (NFC) (details)
  6. Convert if cascade to switch (NFC) (details)
  7. Simplify error reporting (NFC) (details)
  8. Convert to early exit (NFC) (details)
  9. [NFC][InstCombine] Add more tests for aggregate reconstruction w/ PHI handling (details)
  10. [NFC][InstCombine] PHI-aware aggregate reconstruction: insert PHI node manually (details)
  11. [NFC][InstCombine] PHI-aware aggregate reconstruction: don't capture UseBB in lambdas, take it as argument (details)
  12. [InstCombine] PHI-aware aggregate reconstruction: correctly detect "use" basic block (details)
  13. [NFC][clang] Adjust test/CodeGenCXX/nrvo.cpp after 03127f795b8244c1039c18d4391374707a3dc75e (details)
  14. [VE] Modify ISelLoweirng following clang-tidy (details)
  15. [OpenMPOpt][HideMemTransfersLatency] Update regression test with new runtime calls. (details)
  16. [Attributor][FIX] Do not request an AANonNull for non-pointer types (details)
  17. [Attributor] Properly use the call site argument position (details)
  18. [llvm-objdump] Symbolize binary addresses for low-noisy asm diff. (details)
  19. [MLInliner] In development mode, obtain the output specs from a file (details)
  20. Fix method name to start with lower case to match style guide (NFC) (details)
  21. [X86] Make PreprocessISelDAG create X86ISD::VRNDSCALE nodes with i32 constants instead of i8. (details)
  22. [X86] Truncate immediate to i8 for INTR_TYPE_3OP_IMM8 (details)
  23. [X86] Rename INTR_TYPE_4OP to INTR_TYPE_4OP_IMM8 and truncate immediates to MVT::i8 (details)
  24. [X86] When manually creating intrinsic nodes in X86ISelLowering, make sure we use getTargetConstant and pointer type for the intrinsic ID. (details)
  25. NFC: [GVNHoist] Outline functions from the class (details)
  26. [llvm-objdump] Attempt to fix html doc generation issue. (details)
  27. Revert "[libc++] Use CMake interface targets to setup benchmark flags" (details)
  28. [OpenMPOpt][HideMemTransfersLatency] Split __tgt_target_data_begin_mapper into its "issue" and "wait" counterparts. (details)
  29. [NewPM] Pin various tests under Other/ to legacy PM (details)
  30. [PowerPC] Implement Vector Extract Mask builtins in LLVM/Clang (details)
  31. Use find_library for ncurses (details)
  32. [clangd] Index refs to main-file symbols as well (details)
  33. [clang] Fix visitation of ConceptSpecializationExpr in constrained-parameter (details)
Commit c37145cab12168798a603e22af6b6bf6f606b705 by tstellar
libclc: Add Mesa/SPIR-V target

Add targets to emit SPIR-V targeted to Mesa's OpenCL support, using
SPIR-V 1.1.

Substantially based on Dave Airlie's earlier work.

libclc: spirv: remove step/smoothstep apis not defined for SPIR-V

libclc: disable inlines for SPIR-V builds

Reviewed By: jvesely, tstellar, jenatali

Differential Revision: https://reviews.llvm.org/D77589
The file was modifiedlibclc/generic/include/clc/clcfunc.h
The file was modifiedlibclc/generic/lib/common/smoothstep.cl
The file was modifiedlibclc/generic/lib/common/step.cl
The file was modifiedlibclc/CMakeLists.txt
The file was addedlibclc/spirv64/lib/subnormal_config.cl
The file was addedlibclc/spirv64/lib/SOURCES
The file was addedlibclc/spirv/lib/subnormal_config.cl
The file was addedlibclc/spirv/lib/SOURCES
Commit 4cd09374cdb163573007ccb402f5ba8970eb6134 by Steven Wu
[libunwind] Remove compatibility support for macOS 10.6

Remove `_dyld_find_unwind_sections` implementation for macOS that is
10.6 or previous. 10.6 is no longer supported for TOT libunwind after
removing its libkeymgr dependency.

Reviewed By: mstorsjo, pete, #libunwind

Differential Revision: https://reviews.llvm.org/D86104
The file was modifiedlibunwind/src/AddressSpace.hpp
Commit c6464c819e660cf8a63618f6ddeafc26559465f9 by echristo
Fix another Wsign-comparison warning.
The file was modifiedllvm/unittests/Object/XCOFFObjectFileTest.cpp
Commit 1d5e9d37c33906d2d7beb2ced62c7777482dd77e by Adrian Prantl
Convert to early exit (NFC)
The file was modifiedlldb/source/Target/Target.cpp
Commit 8bb81c29b980d7fe37527d82cdae14f7f94727b1 by Adrian Prantl
Convert to early exit (NFC)
The file was modifiedlldb/source/Target/Target.cpp
Commit a615ec9a1bfb42c2094ecd2d07586fabec03e06f by Adrian Prantl
Convert if cascade to switch (NFC)
The file was modifiedlldb/source/Target/Target.cpp
Commit fc1464c6df5f0910e0bef585e03dcce60cdd0ba7 by Adrian Prantl
Simplify error reporting (NFC)
The file was modifiedlldb/source/Target/Target.cpp
Commit a1a3b86910e49bba5fb3dbbccc44f46e5619701e by Adrian Prantl
Convert to early exit (NFC)
The file was modifiedlldb/source/Target/Target.cpp
Commit 4791cbdaf9e2ed420d61291439f1154477a2b2a2 by lebedev.ri
[NFC][InstCombine] Add more tests for aggregate reconstruction w/ PHI handling

Even without handling several layers of PHI nodes,
we can handle more cases, as `@test6` shows.
The file was modifiedllvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll
Commit 4973ca3eac998068cebe7bd23f47876e7c92b87f by lebedev.ri
[NFC][InstCombine] PHI-aware aggregate reconstruction: insert PHI node manually

This is NFC at the moment, because right now we always insert the PHI
into the same basic block in which the original `insertvalue` instruction
is, but that will change.

Also, fixes addition of the suffix to the value names.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll
Commit f4f673e0e36937954c2410b2dfd5ca8e39ccffa5 by lebedev.ri
[NFC][InstCombine] PHI-aware aggregate reconstruction: don't capture UseBB in lambdas, take it as argument

In a following patch, UseBB will be detected later,
so capturing it is potentially error-prone (capture by ref vs by val).

Also, parametrized UseBB will likely be needed
for multiple levels of PHI indirections later on anyways.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Commit 03127f795b8244c1039c18d4391374707a3dc75e by lebedev.ri
[InstCombine] PHI-aware aggregate reconstruction: correctly detect "use" basic block

While the original implementation added in D85787 / ae7f08812e0995481eb345cecc5dd4529829ba44
is not incorrect, it is known to be suboptimal.

In particular, it is not incorrect to use the basic block
in which the original `insertvalue` instruction is located
as the merge point, that is not necessarily optimal,
as `@test6` shows.

We should look at all the AggElts, and, if they are all defined
in the same basic block, then that is the basic block we should use.

On RawSpeed library, this catches +4% (+50) more cases.
On vanilla LLVM test-suits, this catches +12% (+92) more cases.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll
Commit 790878f291fa5dc58a1c560cb6cc76fd1bfd1c5a by lebedev.ri
[NFC][clang] Adjust test/CodeGenCXX/nrvo.cpp after 03127f795b8244c1039c18d4391374707a3dc75e
The file was modifiedclang/test/CodeGenCXX/nrvo.cpp
Commit 68cb29eff1de43c34cc659c3618f1f4c8474491d by marukawa
[VE] Modify ISelLoweirng following clang-tidy

Modify case style of function names following clang-tidy.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D86076
The file was modifiedllvm/lib/Target/VE/VEISelLowering.cpp
The file was modifiedllvm/lib/Target/VE/VEISelLowering.h
Commit ad03d0647fed02f74f811ff09341a3e7a72fdfc6 by Hamilton Tobon
[OpenMPOpt][HideMemTransfersLatency] Update regression test with new runtime calls.
The file was modifiedllvm/test/Transforms/OpenMP/hide_mem_transfer_latency.ll
Commit 5dfc207c5352e606e20399d9e15b2ade2922c0d2 by johannes
[Attributor][FIX] Do not request an AANonNull for non-pointer types
The file was modifiedllvm/test/Transforms/Attributor/undefined_behavior.ll
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 19bd4ef157a85aee0f6302165dd3eec9b341524a by johannes
[Attributor] Properly use the call site argument position
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/Transforms/Attributor/undefined_behavior.ll
Commit 819b2d9c7901d8e6a1434374701e22e15f9cd640 by hoy
[llvm-objdump] Symbolize binary addresses for low-noisy asm diff.

When diffing disassembly dump of two binaries, I see lots of noises from mismatched jump target addresses and global data references, which unnecessarily causes diffs on every function, making it impractical. I'm trying to symbolize the raw binary addresses to minimize the diff noise.
In this change, a local branch target is modeled as a label and the branch target operand will simply be printed as a label. Local labels are collected by a separate pre-decoding pass beforehand. A global data memory operand will be printed as a global symbol instead of the raw data address. Unfortunately, due to the way the disassembler is set up and to be less intrusive, a global symbol is always printed as the last operand of a memory access instruction. This is less than ideal but is probably acceptable from checking code quality point of view since on most targets an instruction can have at most one memory operand.

So far only the X86 disassemblers are supported.

Test Plan:

llvm-objdump -d  --x86-asm-syntax=intel --no-show-raw-insn --no-leading-addr :
```
Disassembly of section .text:

<_start>:
               push rax
               mov dword ptr [rsp + 4], 0
               mov dword ptr [rsp], 0
               mov eax, dword ptr [rsp]
               cmp eax, dword ptr [rip + 4112]  # 202182 <g>
               jge 0x20117e <_start+0x25>
               call 0x201158 <foo>
               inc dword ptr [rsp]
               jmp 0x201169 <_start+0x10>
               xor eax, eax
               pop rcx
               ret
```

llvm-objdump -d  **--symbolize-operands** --x86-asm-syntax=intel --no-show-raw-insn --no-leading-addr :
```
Disassembly of section .text:

<_start>:
               push rax
               mov dword ptr [rsp + 4], 0
               mov dword ptr [rsp], 0
<L1>:
               mov eax, dword ptr [rsp]
               cmp eax, dword ptr  <g>
               jge <L0>
               call <foo>
               inc dword ptr [rsp]
               jmp <L1>
<L0>:
               xor eax, eax
               pop rcx
               ret
```

Note that the jump instructions like `jge 0x20117e <_start+0x25>` without this work is printed as a real target address and an offset from the leading symbol. With a change in the optimizer that adds/deletes an instruction, the address and offset may shift for targets placed after the instruction. This will be a problem when diffing the disassembly from two optimizers where there are unnecessary false positives due to such branch target address changes. With `--symbolize-operand`, a label is printed for a branch target instead to reduce the false positives. Similarly, the disassemble of PC-relative global variable references is also prone to instruction insertion/deletion.

Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D84191
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
The file was modifiedllvm/docs/CommandGuide/llvm-objdump.rst
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
The file was modifiedllvm/tools/llvm-objdump/llvm-objdump.cpp
The file was modifiedllvm/include/llvm/MC/MCInstPrinter.h
The file was addedllvm/test/tools/llvm-objdump/X86/elf-disassemble-symbololize-operands.yaml
Commit 62fc44ca3cf66442b30e22b1be34afc492a2a388 by mtrofin
[MLInliner] In development mode, obtain the output specs from a file

Different training algorithms may produce models that, besides the main
policy output (i.e. inline/don't inline), produce additional outputs
that are necessary for the next training stage. To facilitate this, in
development mode, we require the training policy infrastructure produce
a description of the outputs that are interesting to it, in the form of
a JSON file. We special-case the first entry in the JSON file as the
inlining decision - we care about its value, so we can guide inlining
during training - but treat the rest as opaque data that we just copy
over to the training log.

Differential Revision: https://reviews.llvm.org/D85674
The file was addedllvm/lib/Analysis/models/inliner/output_spec.json
The file was modifiedllvm/test/Transforms/Inline/ML/development-training-log.ll
The file was addedllvm/test/Transforms/Inline/ML/Inputs/test_output_spec.json
The file was modifiedllvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
Commit d0e2c79b61a1e4f2cfb5a2a9842beb8aed74c522 by joker.eph
Fix method name to start with lower case to match style guide (NFC)
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/include/mlir/Interfaces/FoldInterfaces.h
Commit ab7151f1cff7b028be70d9c97181989949680f5d by craig.topper
[X86] Make PreprocessISelDAG create X86ISD::VRNDSCALE nodes with i32 constants instead of i8.

This is the type declared in X86InstrFragmentsSIMD.td. ISel pattern
matching doesn't check so it doesn't matter in practice. Maybe for
SelectionDAG CSE it would matter.
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Commit bc244f08cf5129f99fe6f7f76a373463f07e7c84 by craig.topper
[X86] Truncate immediate to i8 for INTR_TYPE_3OP_IMM8

This is used for DBPSADBW which has a i32 immediate for its
intrinsic and an i8 immediate in tablegen isel patterns.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 2ffa5d218f959ffbacf48f989b318bf68bb550f1 by craig.topper
[X86] Rename INTR_TYPE_4OP to INTR_TYPE_4OP_IMM8 and truncate immediates to MVT::i8

This makes sure VPTERNLOG is generated with MVT::i8 immediate
as its SDNode declaration in X86InstrFragmentsSIMD.td declares.
The file was modifiedllvm/lib/Target/X86/X86IntrinsicsInfo.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit b673dfbb9a0e6b3c27917e3097b19235883d606e by craig.topper
[X86] When manually creating intrinsic nodes in X86ISelLowering, make sure we use getTargetConstant and pointer type for the intrinsic ID.

Doesn't really matter in practice but that's how the nodes are
normally created by SelectionDAGBuilder. So we should match.

Found by temporarily hacking type checks into isel table.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 370330f084c05ee54f1c9bb54604dbe48f7e87dd by 1894981+hiraditya
NFC: [GVNHoist] Outline functions from the class

Reviewers: sebpop
Reviewed By: hiraditya

Differential Revision: https://reviews.llvm.org/D86032
The file was modifiedllvm/lib/Transforms/Scalar/GVNHoist.cpp
Commit de0c7a044b24ff85578e6e6773e563c02ae5e2ed by hoy
[llvm-objdump] Attempt to fix html doc generation issue.

https://reviews.llvm.org/D84191 caused a html doc build issue with the changes in `llvm-objdump.rst`. It looks like a blank line is missing from the `code-block` directives.

Test Plan:

Differential Revision: https://reviews.llvm.org/D86123
The file was modifiedllvm/docs/CommandGuide/llvm-objdump.rst
Commit 1454018dc1d980940765e2121b26de9bd980ac7f by leonardchan
Revert "[libc++] Use CMake interface targets to setup benchmark flags"

This reverts commit da0592e4c8df95efad4e42d63646f8a5336a7edc.

Reverting because this is incompatible with cmake 3.13.5, with the
minimum supported version being 3.13.4.

See https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8871967816877544224.
The file was modifiedlibcxx/benchmarks/CMakeLists.txt
Commit 496f8e5b369f091def93482578232da8c6e77a7a by Hamilton Tobon
[OpenMPOpt][HideMemTransfersLatency] Split __tgt_target_data_begin_mapper into its "issue" and "wait" counterparts.

WIP that tries to hide the latency of runtime calls that involve host to
device memory transfers by splitting them into their "issue" and "wait"
versions. The "issue" is moved upwards as much as possible. The "wait" is
moved downards as much as possible. The "issue" issues the memory transfer
asynchronously, returning a handle. The "wait" waits in the returned
handle for the memory transfer to finish. We still lack of the movement.
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedllvm/test/Transforms/OpenMP/hide_mem_transfer_latency.ll
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
Commit 2af4c2b2b1be0333a14fbf82d9e31f62d0f3106c by aeubanks
[NewPM] Pin various tests under Other/ to legacy PM

These all are legacy PM-specific or have a corresponding NPM RUN line.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D86124
The file was modifiedllvm/test/Other/opt-pipeline-vector-passes.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline.ll
The file was modifiedllvm/test/Other/opt-O0-pipeline-enable-matrix.ll
The file was modifiedllvm/test/Other/printer.ll
The file was modifiedllvm/test/Other/print-module-scope.ll
The file was modifiedllvm/test/Other/pass-pipelines.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline-enable-matrix.ll
The file was modifiedllvm/test/Other/opt-Os-pipeline.ll
The file was modifiedllvm/test/Other/cspgo-O2-pipeline.ll
The file was modifiedllvm/test/Other/time-passes.ll
The file was modifiedllvm/test/Other/opt-O0-pipeline.ll
The file was modifiedllvm/test/Other/opt-O2-pipeline.ll
The file was modifiedllvm/test/Other/optimize-options.ll
The file was modifiedllvm/test/Other/print-cfg-sccs.ll
The file was modifiedllvm/test/Other/loop-pass-printer.ll
Commit c7ec3a7e338cd8e58424a66d29162e9b6a5847f7 by amy.kwan1
[PowerPC] Implement Vector Extract Mask builtins in LLVM/Clang

This patch implements the vec_extractm function prototypes in altivec.h in
order to utilize the vector extract with mask instructions introduced in Power10.

Differential Revision: https://reviews.llvm.org/D82675
The file was modifiedllvm/include/llvm/IR/IntrinsicsPowerPC.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
The file was modifiedclang/test/CodeGen/builtins-ppc-p10vector.c
The file was modifiedclang/lib/Headers/altivec.h
The file was addedllvm/test/CodeGen/PowerPC/p10-vector-mask-ops.ll
The file was modifiedclang/include/clang/Basic/BuiltinsPPC.def
Commit a52173a3e56553d7b795bcf3cdadcf6433117107 by Jonas Devlieghere
Use find_library for ncurses

Currently it is hard to avoid having LLVM link to the system install of
ncurses, since it uses check_library_exists to find e.g. libtinfo and
not find_library or find_package.

With this change the ncurses lib is found with find_library, which also
considers CMAKE_PREFIX_PATH. This solves an issue for the spack package
manager, where we want to use the zlib installed by spack, and spack
provides the CMAKE_PREFIX_PATH for it.

This is a similar change as https://reviews.llvm.org/D79219, which just
landed in master.

Differential revision: https://reviews.llvm.org/D85820
The file was modifiedlldb/source/Core/CMakeLists.txt
The file was modifiedllvm/cmake/config-ix.cmake
The file was modifiedllvm/lib/Support/CMakeLists.txt
The file was modifiedcompiler-rt/lib/xray/tests/CMakeLists.txt
The file was modifiedllvm/lib/Support/Unix/Process.inc
The file was modifiedllvm/include/llvm/Config/config.h.cmake
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Commit 15673d748acd8f26bdeee18c0aa18f44c775d738 by zeratul976
[clangd] Index refs to main-file symbols as well

Summary: This will be needed to support call hierarchy

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83536
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
The file was modifiedclang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolCollector.h
The file was modifiedclang-tools-extra/clangd/index/FileIndex.h
The file was modifiedclang-tools-extra/clangd/index/SymbolCollector.cpp
The file was modifiedclang-tools-extra/clangd/index/FileIndex.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.h
The file was modifiedclang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
Commit 00d7b7d014f90aaaacaef6f9c778614b09356bf0 by zeratul976
[clang] Fix visitation of ConceptSpecializationExpr in constrained-parameter

Summary: RecursiveASTVisitor needs to traverse TypeConstraint::ImmediatelyDeclaredConstraint

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D84136
The file was addedclang/unittests/Tooling/RecursiveASTVisitorTests/Concept.cpp
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h
The file was modifiedclang/unittests/Tooling/CMakeLists.txt
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp