SuccessChanges

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

Summary

  1. [gn build] (manually) port 49a4f3f7d88 (details)
  2. [lldb/Test] Fix replay with TestSetWatchpoint.py (details)
  3. [lldb/Reproducers] Skip test that changes the source file while debugging (details)
  4. [docs][llvm-extract] Add missing alias/bb options (details)
  5. [OPENMP] Fix mixture of omp and clang pragmas (details)
  6. [JITLink] Initial implementation of ELF / x86-64 support for JITLink. (details)
  7. [X86] Add avx512vp2intersect feature to compiler-rt's feature detection to match libgcc. (details)
  8. [X86] Allow avx512vp2intersect to be used with __builtin_cpu_supports. (details)
  9. [gn build] Port 2e40cf06df0 (details)
  10. [lldb/REPL] Fix unhandled switch case (details)
  11. [InstCombine] Sink pure instructions down to return and unreachable blocks (details)
  12. [NFC] InstCombineNegator: use auto where type is obvious from the cast (details)
  13. [lldb][NFC] Overload raw_ostream operator << for ConstString (details)
  14. [lldb] Enable C++14 when evaluating expressions in a C++14 frame (details)
  15. MILexer.h/cpp - remove unused includes. NFC. (details)
  16. Fix msvc "switch statement contains 'default' but no 'case' labels" warning. NFC. (details)
  17. StatepointLowering.h - remove unused includes. NFC. (details)
  18. Revert "[ARM] Improve codegen of volatile load/store of i64" (details)
Commit 5127d4b4ff94a98ad7504334e76a60b9fe7eb578 by thakis
[gn build] (manually) port 49a4f3f7d88
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
Commit e3a0283e5a3f7eccd82c7e090188926723e8d8c9 by Jonas Devlieghere
[lldb/Test] Fix replay with TestSetWatchpoint.py

The reproducers only track the creation of objects and not their
destruction. Therefore it keeps all objects alive indefinitely.
The file was modifiedlldb/test/API/python_api/watchpoint/TestSetWatchpoint.py
Commit 329abed10b84ce502a86dfb077710db22f4ddd01 by Jonas Devlieghere
[lldb/Reproducers] Skip test that changes the source file while debugging

The VFS is a snapshot and cannot capture changes to the file system.
The file was modifiedlldb/test/API/source-manager/TestSourceManager.py
Commit 9b7fba1421114b3af7965ac3dbe8a82640b9b5c2 by Jinsong Ji
[docs][llvm-extract] Add missing alias/bb options

llvm-extract get serveral new options, but we forgot to update doc.
This patch update the doc.

Reviewed By: volkan

Differential Revision: https://reviews.llvm.org/D80413
The file was modifiedllvm/docs/CommandGuide/llvm-extract.rst
Commit ac2c5af67f036ec810556372b16548ae9b663f36 by t-kawashima
[OPENMP] Fix mixture of omp and clang pragmas

Fixes PR45753

When a program that contains a loop to which both `omp parallel for`
pragma and `clang loop` pragma are associated is compiled with the
-fopenmp option, `clang loop` pragma did not take effect. The example
below should not be vectorized by the `clang loop` pragma but it was
actually vectorized. The cause is that `llvm.loop.vectorize.width`
was not output to the IR when -fopenmp is specified.

The fix attaches attributes if they exist for the loop.

[example.c]

```
int a[100], b[100];
void foo() {
  #pragma omp parallel for
  #pragma clang loop vectorize(disable)
  for (int i = 0; i < 100; i++)
    a[i] += b[i] * i;
}
```

[compile]

```
$ clang -O2 -fopenmp example.c -c -Rpass=vect
example.c:3:11: remark: vectorized loop (vectorization width: 4, interleaved count: 2) [-Rpass=loop-vectorize]
  #pragma omp parallel for
          ^
```

[IR with -fopenmp]

```
$ clang -O2 exmaple.c -S -emit-llvm -mllvm -disable-llvm-optzns -o - -fopenmp | grep 'vectorize\.width'
```

[IR with -fno-openmp]

```
$ clang -O2 example.c -S -emit-llvm -mllvm -disable-llvm-optzns -o - -fno-openmp | grep 'vectorize\.width'
!7 = !{!"llvm.loop.vectorize.width", i32 1}
```

Differential Revision: https://reviews.llvm.org/D79921
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was addedclang/test/OpenMP/omp_with_loop_pragma.c
Commit 2e40cf06df0cecad41e67f854cdd2b02891e6fb7 by Lang Hames
[JITLink] Initial implementation of ELF / x86-64 support for JITLink.

This initial implementation supports section and symbol parsing, but no
relocation support. It enables JITLink to link and execute ELF relocatable
objects that do not require relocations.

Patch by Jared Wyles. Thanks Jared!

Differential Revision: https://reviews.llvm.org/D79832
The file was addedllvm/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
The file was modifiedllvm/lib/ExecutionEngine/JITLink/JITLink.cpp
The file was addedllvm/include/llvm/ExecutionEngine/JITLink/ELF.h
The file was addedllvm/lib/ExecutionEngine/JITLink/ELF.cpp
The file was addedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
The file was addedllvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_relocations.s
Commit 95bc21f32faa03b2cee6ff2f4f7d0e983a2a9e00 by craig.topper
[X86] Add avx512vp2intersect feature to compiler-rt's feature detection to match libgcc.
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
Commit 4cd696f92fde5fa0bc570ca059e0f1ce7344c807 by craig.topper
[X86] Allow avx512vp2intersect to be used with __builtin_cpu_supports.

compiler-rt and trunk libgcc support this now.
The file was modifiedllvm/include/llvm/Support/X86TargetParser.def
The file was modifiedclang/test/CodeGen/target-builtin-noerror.c
Commit c7e5454acec77df5e957828ca0475aa3d566977b by llvmgnsyncbot
[gn build] Port 2e40cf06df0
The file was modifiedllvm/utils/gn/secondary/llvm/lib/ExecutionEngine/JITLink/BUILD.gn
Commit 8a6333ef38088b65224bc021a14eeeef0a123a29 by Jonas Devlieghere
[lldb/REPL] Fix unhandled switch case

Fix warning: enumeration value 'eExpressionThreadVanished' not handled
in switch [-Wswitch]
The file was modifiedlldb/source/Expression/REPL.cpp
Commit 403810557be79e36d0153a04fefff4d72028b2b4 by mkazantsev
[InstCombine] Sink pure instructions down to return and unreachable blocks

If the only user of `Instr` is in a return or unreachable block, we can
sink `Instr` to the`User` safely (unless it reads/writes memory).
Return or unreachable blocks are guaranteed to execute zero
or one time, and `Instr` always dominates `User`, so they either will
be executed together (execution of `User` always implies execution
of `Instr`) or not executed at all.

Differential Revision: https://reviews.llvm.org/D80120
Reviewed By: asbirlea, jdoerfert
The file was modifiedllvm/test/Transforms/PGOProfile/chr.ll
The file was modifiedllvm/test/Transforms/InstCombine/sink_to_unreachable.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/merge-cond-stores.ll
The file was modifiedllvm/test/Transforms/InstCombine/overflow.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/insert-extract-shuffle.ll
Commit cd921accf91a21ba91580262c92eced34622ab5f by lebedev.ri
[NFC] InstCombineNegator: use auto where type is obvious from the cast
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineNegator.cpp
Commit bca378f68a7d21f9da7d2f86a54fdbb5604b4d05 by Raphael Isemann
[lldb][NFC] Overload raw_ostream operator << for ConstString

Summary: We are not doing this very often, but sometimes it's convenient when I can just << ConstStrings into llvm::errs() during testing.

Reviewers: labath, JDevlieghere

Reviewed By: labath, JDevlieghere

Subscribers: JDevlieghere

Differential Revision: https://reviews.llvm.org/D80310
The file was modifiedlldb/include/lldb/Utility/ConstString.h
The file was modifiedlldb/source/Core/Section.cpp
The file was modifiedlldb/source/Symbol/Function.cpp
Commit 5f88f39ab8154682c3b1eb9d7050a9412a55d9e7 by Raphael Isemann
[lldb] Enable C++14 when evaluating expressions in a C++14 frame

Summary:
Currently we never enable C++14 in the expression evaluator. This enables it when the language of the program is C++14.

It seems C++17 and so on isn't yet in any of the language enums (and the DWARF standard it seems), so C++17 support will be a follow up patch.

Reviewers: labath, JDevlieghere

Reviewed By: labath, JDevlieghere

Subscribers: aprantl

Differential Revision: https://reviews.llvm.org/D80308
The file was addedlldb/test/API/lang/cpp/standards/cpp11/Makefile
The file was addedlldb/test/API/lang/cpp/standards/cpp14/TestCPP14Standard.py
The file was addedlldb/test/API/lang/cpp/standards/cpp14/Makefile
The file was addedlldb/test/API/lang/cpp/standards/cpp14/main.cpp
The file was addedlldb/test/API/lang/cpp/standards/cpp11/TestCPP11Standard.py
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
The file was addedlldb/test/API/lang/cpp/standards/cpp11/main.cpp
Commit 1041e8b8868dd9e6a4d1c3cfda5e59756a8c8ee7 by llvm-dev
MILexer.h/cpp - remove unused includes. NFC.

Remove duplicates in MILexer.cpp that are already included in MILexer.h.
The file was modifiedllvm/lib/CodeGen/MIRParser/MILexer.h
The file was modifiedllvm/lib/CodeGen/MIRParser/MILexer.cpp
Commit c9797cf98b7a86dca036cea479a2566e3b0768ff by llvm-dev
Fix msvc "switch statement contains 'default' but no 'case' labels" warning. NFC.

Stripped out the switch statement, but kept case labels as comments for future reference.
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
Commit b9def827b716a17150031b9bb3ba4d53642d68e8 by llvm-dev
StatepointLowering.h - remove unused includes. NFC.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/StatepointLowering.h
Commit 872ee78f65f47fae19d4f8db7396eb56d902aef1 by victor.campos
Revert "[ARM] Improve codegen of volatile load/store of i64"

This reverts commit 8a12553223180246eeafaa0fa7bfa11e834d34b6.

A bug has been found when generating code for Thumb2. In some very
specific cases, the prologue/epilogue emitter generates erroneous stack
offsets for the new LDRD instructions that access the stack.

This bug does not seem to be caused by the reverted patch though. Likely
the latter has made an undiscovered issue emerge in the
prologue/epilogue emission pass. Nevertheless, this reversion is
necessary since it is blocking users of the ARM backend.
The file was modifiedllvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was removedllvm/test/CodeGen/ARM/i64_volatile_load_store.ll
The file was modifiedllvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
The file was modifiedllvm/lib/Target/ARM/ARMInstrInfo.td
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.h
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td