SuccessChanges

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

Summary

  1. [lldb] Remove 'use_synthetic' parameters in ValueObject code (details)
  2. [libcxx] Delete pointer in shared_ptr deduction test. (details)
  3. [InstCombine] add helper for known exact cast to FP; NFC (details)
  4. [InstCombine] add/adjust tests for fpext of casted value; NFC (details)
  5. Re-commit: Mark values as trivially dead when their only use is a start or end lifetime intrinsic. (details)
  6. [InstCombine] fix typo in comment; NFC (details)
  7. [X86] Remove the mayLoad and mayStore flags from vzeroupper/vzeroall. (details)
  8. Reland [libc++] Move abs and div into stdlib.h to fix header cycle. (details)
  9. [lldb/Test] Update TestProcessList.py for reproducer replay (details)
  10. [VectorCombine] scalarize binop of inserted elements into vector constants (details)
  11. [GlobalISel] Don't add duplicate successors to MBBs when translating indirectbr (details)
  12. [AIX] Avoid structor alias; die before bad alias codegen (details)
  13. [XCOFF] XCOFF constants, MCObjectFileInfo placeholder code for DWARF; NFC (details)
  14. [Target][XCOFF] Correctly halt when mixing AIX or XCOFF with ppc64le (details)
  15. [WebAssembly] Disallow 'shared-mem' rather than 'atomics' (details)
  16. [clang][WebAssembly] Only expose wait and notify builtins with atomics (details)
  17. [COFF] Migrate COFFObjectFile to Expected<T> (details)
  18. [COFF] Use Expected in COFFObjectFile creation (details)
Commit 7b1f1cf1cf71ed143673a981074da642cfcde56e by Raphael Isemann
[lldb] Remove 'use_synthetic' parameters in ValueObject code

Summary:
`CalculateSyntheticValue` and `GetSyntheticValue` have a `use_synthetic` parameter
that makes the function do nothing when it's false. We obviously always pass true
to the function (or check that the value we pass is true), because there really isn't
any point calling with function with a `false`. This just removes all of this.

Reviewers: labath, JDevlieghere, davide

Reviewed By: davide

Subscribers: davide

Differential Revision: https://reviews.llvm.org/D79568
The file was modifiedlldb/include/lldb/Core/ValueObject.h
The file was modifiedlldb/source/Core/ValueObject.cpp
The file was modifiedlldb/include/lldb/Core/ValueObjectSyntheticFilter.h
The file was modifiedlldb/source/API/SBValue.cpp
Commit afc8b49782f37524ccde82c54a9a2eb09a40f869 by zoecarver
[libcxx] Delete pointer in shared_ptr deduction test.

Updates the dummy deleter in deduction.pass.cpp to delete the pointer argument. This will fix the asan bots.
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/deduction.pass.cpp
Commit 5cf17034e53777ec1b1874fbbaf0b579634734fc by spatel
[InstCombine] add helper for known exact cast to FP; NFC

As suggested in D79116 - there's shared logic between the
existing code and potential new folds. This could go in
ValueTracking if it seems generally useful.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 1aa8cef97a7b00845d50aa148dbf4847ee4886fd by spatel
[InstCombine] add/adjust tests for fpext of casted value; NFC
The file was modifiedllvm/test/Transforms/InstCombine/fpextend.ll
Commit f65f566aeb799f35f48c5c9bbc54b05bafec4f08 by zoecarver
Re-commit: Mark values as trivially dead when their only use is a start or end lifetime intrinsic.

Summary:
If the only use of a value is a start or end lifetime intrinsic then mark the intrinsic as trivially dead. This should allow for that value to then be removed as well.

Currently, this only works for allocas, globals, and arguments.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79355
The file was modifiedllvm/test/Transforms/Attributor/memory_locations.ll
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/test/Analysis/BasicAA/modref.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/lifetime.ll
The file was modifiedllvm/test/Transforms/InstCombine/vararg.ll
The file was modifiedllvm/test/Transforms/DCE/basic.ll
Commit 46d6f76be309ef5348af861ac80ba1b6b5985b16 by spatel
[InstCombine] fix typo in comment; NFC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 465f5648ee271c9ded9401cee58c84532c4a5c46 by craig.topper
[X86] Remove the mayLoad and mayStore flags from vzeroupper/vzeroall.

But leave the hasUnmodelledSideEffects flag.
The file was modifiedllvm/test/tools/llvm-mca/X86/Znver2/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/Generic/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/BdVer2/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/SandyBridge/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/SkylakeServer/resources-avx1.s
The file was modifiedllvm/include/llvm/IR/IntrinsicsX86.td
The file was modifiedllvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/Znver1/resources-avx1.s
The file was modifiedllvm/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s
Commit c490c5e81ac90cbf079c7cee18cd56171f1e27af by Raphael Isemann
Reland [libc++] Move abs and div into stdlib.h to fix header cycle.

This commit should will break libc++ without local submodule visibility, but
the LLVM+modules bots are now all using this mode. Before the Green Dragon
LLDB bot was failing to compile with a libc++ built with this commit as LSV
was disabled on macOS.

Original summary:

libc++ is careful to not fracture overload sets. When one overload
is visible to a user, all of them should be. Anything less causes
subtle bugs and ODR violations.

Previously, in order to support ::abs and ::div being supplied by
both <cmath> and <cstdlib> we had to do awful things that make
<math.h> and <stdlib.h> have header cycles and be non-modular.
This really breaks with modules.

Specifically the problem was that in C++ ::abs introduces overloads
for floating point numbers, these overloads forward to ::fabs,
which are defined in math.h. Therefore ::abs needed to be in math.h
too. But this required stdlib.h to include math.h and math.h to
include stdlib.h.

To avoid these problems the definitions have been moved to stddef.h
(which math includes), and the floating point overloads of ::abs
have been changed to call __builtin_fabs, which both Clang and GCC
support.
The file was modifiedlibcxx/include/stdlib.h
The file was modifiedlibcxx/include/math.h
Commit eb7d32e46fe184fdfcb52e0a25973e713047e305 by Jonas Devlieghere
[lldb/Test] Update TestProcessList.py for reproducer replay

Because LLDB isn't the one spawning the subprocess, the PID is different
during replay. Exclude it form the substring check during replay.

Depends on D79646 to pass with reproducer replay.
The file was modifiedlldb/test/API/commands/platform/process/list/TestProcessList.py
The file was modifiedlldb/packages/Python/lldbsuite/test/configuration.py
Commit 0d2a0b44c812e5aafa418e4806171867f3181cbe by spatel
[VectorCombine] scalarize binop of inserted elements into vector constants

As with the extractelement patterns that are currently in vector-combine,
there are going to be several possible variations on this theme. This
should be the clearest, simplest example.

Scalarization is the right direction for target-independent canonicalization,
and InstCombine has some of those folds already, but it doesn't do this.
I proposed a similar transform in D50992. Here in vector-combine, we can
check the cost model to be sure it's profitable, so there should be less risk.

Differential Revision: https://reviews.llvm.org/D79452
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
The file was modifiedllvm/test/Transforms/VectorCombine/X86/insert-binop.ll
Commit f66309deab1d99a17d6740244dfd1b9f959e9095 by Jessica Paquette
[GlobalISel] Don't add duplicate successors to MBBs when translating indirectbr

This fixes a verifier failure on a bot:

http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O0-g/

```
*** Bad machine code: MBB has duplicate entries in its successor list. ***
- function:    foo
- basic block: %bb.5 indirectgoto (0x7fe3d687ca08)
```

One of the GCC torture suite tests (pr70460.c) has an indirectbr instruction
which has duplicate blocks in its destination list.

According to the langref this is allowed:

> Blocks are allowed to occur multiple times in the destination list, though
> this isn’t particularly useful.
(https://www.llvm.org/docs/LangRef.html#indirectbr-instruction)

We don't allow this in MIR. So, when we translate such an instruction, the
verifier screams.

This patch makes `translateIndirectBr` check if a successor has already been
added to a block. If the successor is present, it is skipped rather than added
twice.

Differential Revision: https://reviews.llvm.org/D79609
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/irtranslator-indirect-br-repeated-block.ll
Commit b116ded57da3530e661f871f4191c59cd9e091cd by hubert.reinterpretcast
[AIX] Avoid structor alias; die before bad alias codegen

Summary:
`AsmPrinter::emitGlobalIndirectSymbol` is dependent on
`MCStreamer::emitAssignment` to produce `.set` directives for alias
symbols; however, the `.set` pseudo-op on AIX is documented as not
usable with external relocatable terms or expressions, which limits its
applicability in generating alias symbols.

Disable generating aliases on AIX until a different implementation
strategy is available.

Reviewers: cebowleratibm, jasonliu, sfertile, daltenty, DiggerLin

Reviewed By: jasonliu

Differential Revision: https://reviews.llvm.org/D79044
The file was addedclang/test/Driver/aix-constructor-alias.c
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedllvm/test/CodeGen/PowerPC/aix-alias.ll
Commit ab59aa6c6130e2eb632f79d4163a33c63c58b117 by hubert.reinterpretcast
[XCOFF] XCOFF constants, MCObjectFileInfo placeholder code for DWARF; NFC

Summary:
This patch introduces the constants defined to identify DWARF sections
in XCOFF into `llvm/BinaryFormat/XCOFF.h` and adds (NFC) placeholder
code to `llvm/lib/MC/MCObjectFileInfo.cpp` where the DWARF sections for
XCOFF are to be set up.

Reviewers: jasonliu, sfertile, daltenty, DiggerLin, Xiangling_L

Reviewed By: jasonliu, sfertile, DiggerLin

Differential Revision: https://reviews.llvm.org/D79220
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/XCOFF.h
Commit 601d5bd516ec7b99affb9cd4623ec3c027e63aa3 by hubert.reinterpretcast
[Target][XCOFF] Correctly halt when mixing AIX or XCOFF with ppc64le

The code to prevent using `PPCXCOFFMCAsmInfo` with little-endian targets
used an incorrect check. Also, there does not appear to be sufficient
earlier checking to prevent failing this check, so the check here is
upgraded to be a `report_fatal_error`.

`PPCAIXAsmPrinter` was also missing a check against use with
little-endian targets. This patch adds such a check in.
The file was addedllvm/test/CodeGen/PowerPC/aix-xcoff-endian-error.ll
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Commit a1ae9566ea9ce46bf7f2af9ab1253eed05b5b622 by tlively
[WebAssembly] Disallow 'shared-mem' rather than 'atomics'

Summary:
The WebAssembly backend automatically lowers atomic operations and TLS
to nonatomic operations and non-TLS data when either are present and
the atomics or bulk-memory features are not present, respectively. The
resulting object is no longer thread-safe, so the linker has to be
told not to allow it to be linked into a module with shared
memory. This was previously done by disallowing the 'atomics' feature,
which prevented any objct with its atomic operations or TLS removed
from being linked with any object containing atomics or TLS, and
therefore preventing it from being linked into a module with shared
memory since shared memory requires atomics.

However, as of https://github.com/WebAssembly/threads/issues/144, the
validation rules are relaxed to allow atomic operations to validate
with unshared memories, which makes it perfectly safe to link an
object with stripped atomics and TLS with another object that still
contains TLS and atomics as long as the resulting module has an
unshared memory. To allow this kind of link, this patch disallows a
pseudo-feature 'shared-mem' rather than 'atomics' to communicate to
the linker that the object is not thread-safe. This means that the
'atomics' feature is available to accurately reflect whether or not an
object has atomics enabled.

As a drive-by tweak, this change also requires that bulk-memory be
enabled in addition to atomics in order to use shared memory. This is
because initializing shared memories requires bulk-memory operations.

Reviewers: aheejin, sbc100

Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79542
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
The file was modifiedlld/test/wasm/shared-memory-no-atomics.yaml
The file was modifiedllvm/test/CodeGen/WebAssembly/target-features-tls.ll
Commit ebb69b8bafad6948ee6a14b4087fb7b440c73d0d by tlively
[clang][WebAssembly] Only expose wait and notify builtins with atomics

Summary:
Since the underlying wait and notify instructions are only available
when the atomics feature is enabled, it only makes sense to expose
their builtin functions when atomics are enabled.

Reviewers: aheejin, sunfish

Subscribers: dschuff, sbc100, jgravelle-google, jfb, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79534
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedclang/test/CodeGen/builtins-wasm.c
Commit 77ecf90c52641aadedf6bad7c8bea5b217b49729 by rnk
[COFF] Migrate COFFObjectFile to Expected<T>

I noticed that std::error_code() does one-time initialization. Avoid
that overhead with Expected<T> and llvm::Error. Also, it is consistent
with the virtual interface and ELF, and generally cleaner.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D79643
The file was modifiedllvm/include/llvm/Object/COFF.h
The file was modifiedlld/COFF/Chunks.cpp
The file was modifiedllvm/tools/obj2yaml/coff2yaml.cpp
The file was modifiedllvm/lib/Object/COFFObjectFile.cpp
The file was modifiedlld/COFF/Symbols.cpp
The file was modifiedllvm/tools/llvm-objcopy/COFF/Reader.cpp
The file was modifiedllvm/tools/llvm-objdump/COFFDump.cpp
The file was modifiedlld/COFF/InputFiles.cpp
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
Commit 39772063f513ef24729ed9f20830e887d89459b6 by rnk
[COFF] Use Expected in COFFObjectFile creation

The constructor error out parameter was a bit awkward. Wrap it in a
factory method which can return an error. Make the constructor private.
The file was modifiedllvm/include/llvm/Object/COFF.h
The file was modifiedllvm/lib/Object/COFFObjectFile.cpp
The file was modifiedllvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp