SuccessChanges

Summary

  1. [ARM] Add missing target for Arm neon test case. (details)
  2. [AArch64][GlobalISel] NFC: Refactor G_FCMP selection code (details)
  3. [lldb] Make TestGuiBasicDebug more lenient (details)
  4. [flang] Allow record advancement in external formatted sequential READ (details)
  5. [AArch64][GlobalISel] Add some more legal types for G_PHI, G_IMPLICIT_DEF, G_FREEZE. (details)
  6. [WholeProgramDevirt][NewPM] Add NPM testing path to match legacy pass (details)
  7. Try to fix build. May have used a C++ feature too new/not supported on all platforms. (details)
  8. [lld][WebAssembly] Allow exporting of mutable globals (details)
  9. Remove `Ops` suffix from dialect library names (details)
  10. [flang] Fix Gw.d format output (details)
  11. [mlir] Split Dialect::addOperations into two functions (details)
  12. [AArch64][GlobalISel] Clamp oversize FP arithmetic vectors. (details)
  13. [flang][msvc] Avoid ReferenceVariantBase ctor ambiguity. NFC. (details)
  14. [WebAssembly] New-style command support (details)
Commit e4f50e587f077c246b7f29db0b7daddf583e2b64 by ranjeet.singh
[ARM] Add missing target for Arm neon test case.

This is a follow-up from https://reviews.llvm.org/D61717. Where Richard
described the issue with compiling arm_neon.h under
-flax-vector-conversions=none. It looks like the example reproducer does
actually work but what was missing was a test entry for that target.

Differential Revision: https://reviews.llvm.org/D88546
The file was modifiedclang/test/Headers/arm-neon-header.c
Commit bc43ddf42fff5a43f23354e25a32aca19541fec5 by Jessica Paquette
[AArch64][GlobalISel] NFC: Refactor G_FCMP selection code

Refactor this so it's similar to the existing integer comparison code.

Also add some missing 64-bit testcases to select-fcmp.mir.

Refactoring to prep for improving selection for G_FCMP-related conditional
branches etc.

Differential Revision: https://reviews.llvm.org/D88614
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fcmp.mir
Commit d689570d7dcb16ee241676e22324dc456837eb23 by Jonas Devlieghere
[lldb] Make TestGuiBasicDebug more lenient

Matt's change to the register allocator in 89baeaef2fa9 changed where we
end up after the `finish`. Before we'd end up on line 4.

* thread #1, queue = 'com.apple.main-thread', stop reason = step out
Return value: (int) $0 = 1
    frame #0: 0x0000000100003f7d a.out`main(argc=1, argv=0x00007ffeefbff630) at main.c:4:3
   1    extern int func();
   2
   3    int main(int argc, char **argv) {
-> 4      func(); // Break here
   5      func(); // Second
   6      return 0;
   7    }

Now, we end up on line 5.

* thread #1, queue = 'com.apple.main-thread', stop reason = step out
Return value: (int) $0 = 1

    frame #0: 0x0000000100003f8d a.out`main(argc=1, argv=0x00007ffeefbff630) at main.c:5:3
   2
   3    int main(int argc, char **argv) {
   4      func(); // Break here
-> 5      func(); // Second
   6      return 0;
   7    }

Given that this is not expected stable to be stable I've made the test a
bit more lenient to accept both scenarios.
The file was modifiedlldb/test/API/commands/gui/basicdebug/TestGuiBasicDebug.py
Commit e24f0ac7a389fcb5c2f5295e717d9f7d3fcd4cea by pklausler
[flang] Allow record advancement in external formatted sequential READ

The '/' control edit descriptor causes a runtime crash for an
external formatted sequential READ because the AdvanceRecord()
member function for external units implemented only the tasks
to finish reading the current record.  Split those out into
a new FinishReadingRecord() member function, call that instead
from EndIoStatement(), and change AdvanceRecord() to both
finish reading the current record and to begin reading the next
one.

Differential revision: https://reviews.llvm.org/D88607
The file was modifiedflang/runtime/unit.cpp
The file was modifiedflang/runtime/io-stmt.cpp
The file was modifiedflang/runtime/unit.h
The file was modifiedflang/runtime/io-stmt.h
Commit 4ab45cc2260d87f18e1b05517d5d366b2e754b72 by Amara Emerson
[AArch64][GlobalISel] Add some more legal types for G_PHI, G_IMPLICIT_DEF, G_FREEZE.

Also use this opportunity start to clean up the mess of vector type lists we
have in the LegalizerInfo. Unfortunately since the legalizer rule builders require
std::initializer_list objects as parameters we can't programmatically generate the
type lists.
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-freeze.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-phi.mir
Commit 460dda071e091df3b5584f21954c9209e7334c50 by aeubanks
[WholeProgramDevirt][NewPM] Add NPM testing path to match legacy pass

The legacy pass's default constructor sets UseCommandLine = true and
goes down a separate testing route. Match that in the NPM pass.

This fixes all tests in llvm/test/Transforms/WholeProgramDevirt under NPM.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D88588
The file was modifiedllvm/test/Transforms/WholeProgramDevirt/import.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
Commit 93a1fc2e18b452216be70f534da42f7702adbe1d by Amara Emerson
Try to fix build. May have used a C++ feature too new/not supported on all platforms.
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit 3c45a06f26edfb7e94003adf58cb8951ea9c2ce6 by sbc
[lld][WebAssembly] Allow exporting of mutable globals

In particular allow explict exporting of `__stack_pointer` but
exclud this from `--export-all` to avoid requiring the mutable
globals feature whenenve `--export-all` is used.

This uncovered a bug in populateTargetFeatures regarding checking
if the mutable-globals feature is allowed.

See: https://github.com/WebAssembly/binaryen/issues/2934

Differential Revision: https://reviews.llvm.org/D88506
The file was modifiedlld/docs/WebAssembly.rst
The file was addedlld/test/wasm/mutable-global-exports.s
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/test/wasm/mutable-globals.s
Commit d4e889f1f5723105dbab12b749503d2462eb1755 by stellaraccident
Remove `Ops` suffix from dialect library names

Dialects include more than just ops, so this suffix is outdated. Follows
discussion in
https://llvm.discourse.group/t/rfc-canonical-file-paths-to-dialects/621

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D88530
The file was modifiedmlir/lib/Conversion/LinalgToSPIRV/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/IR/CMakeLists.txt
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Shape/IR/CMakeLists.txt
The file was modifiedflang/lib/Lower/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/StandardOps/CMakeLists.txt
The file was modifiedmlir/lib/Transforms/Utils/CMakeLists.txt
The file was modifiedmlir/test/EDSC/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Quant/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
The file was modifiedmlir/docs/Tutorials/CreatingADialect.md
The file was modifiedmlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Affine/IR/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SCF/CMakeLists.txt
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/GPU/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/SCFToGPU/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Affine/EDSC/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/CAPI/Standard/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/LinalgToStandard/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Affine/Utils/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/AffineToStandard/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Vector/CMakeLists.txt
The file was modifiedmlir/test/lib/Dialect/Test/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
Commit 4fb679d3b159f0a5e4ff87f4e7ecf44fbbf331b9 by pklausler
[flang] Fix Gw.d format output

The estimation of the decimal exponent needs to allow for all
'd' of the requested significant digits.

Also accept a plus sign on a "+kP" scaling factor in a format.

Differential revision: https://reviews.llvm.org/D88618
The file was modifiedflang/runtime/format-implementation.h
The file was modifiedflang/runtime/edit-output.cpp
Commit f0505534900bb1fcdee368136cd733aefd20ce39 by riddleriver
[mlir] Split Dialect::addOperations into two functions

The current implementation uses a fold expression to add all of the operations at once. This is really nice, but apparently the lifetime of each of the AbstractOperation instances is for the entire expression which may lead to a stack overflow for large numbers of operations. This splits the method in two to allow for the lifetime of the AbstractOperation to be properly scoped.
The file was modifiedmlir/include/mlir/IR/Dialect.h
Commit 196c097bba8b0b3932f3fcdcd5310f78ebaa43a3 by Amara Emerson
[AArch64][GlobalISel] Clamp oversize FP arithmetic vectors.
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-fp-arith.mir
Commit b656189e6a602aaf86714ccbf89d94f2ef05b644 by llvm-project
[flang][msvc] Avoid ReferenceVariantBase ctor ambiguity. NFC.

Msvc reports the following error when a ReferenceVariantBase is constructed using an r-value reference or instantiated as std::vector template parameter.  The error message is:
```
PFTBuilder.h(59,1): error C2665: 'std::variant<...>::variant': none of the 2 overloads could convert all the argument types
variant(1248,1): message : could be 'std::variant<...>::variant(std::variant<...> &&) noexcept(false)'
variant(1248,1): message : or       'std::variant<...>::variant(const std::variant<...> &) noexcept(false)'
PFTBuilder.h(59,1): message : while trying to match the argument list '(common::Reference<lower::pft::ReferenceVariantBase<false,...>>)'
```

Work around the ambiguity by only taking `common::Reference` arguments in the constructor. That is, conversion to common::Reference has to be done be the caller instead of being done inside the ctor. Unfortunately, with this change clang/gcc (but not msvc) insist on that the ReferenceVariantBase is stored in a `std::initializer_list`-initialized variable before being used, like being passed to a function or returned.

This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D88109
The file was modifiedflang/include/flang/Lower/PFTBuilder.h
The file was modifiedflang/lib/Lower/PFTBuilder.cpp
Commit 6cd8511e5932e4a53b2bb7780f69489355fc7783 by Dev
[WebAssembly] New-style command support

This adds support for new-style command support. In this mode, all exports
are considered command entrypoints, and the linker inserts calls to
`__wasm_call_ctors` and `__wasm_call_dtors` for all such entrypoints.

This enables support for:

- Command entrypoints taking arguments other than strings and return values
   other than `int`.
- Multicall executables without requiring on the use of string-based
   command-line arguments.

This new behavior is disabled when the input has an explicit call to
`__wasm_call_ctors`, indicating code not expecting new-style command
support.

This change does mean that wasm-ld no longer supports DCE-ing the
`__wasm_call_ctors` function when there are no calls to it. If there are no
calls to it, and there are ctors present, we assume it's wasm-ld's job to
insert the calls. This seems ok though, because if there are ctors present,
the program is expecting them to be called. This change affects the
init-fini-gc.ll test.
The file was removedlld/test/wasm/init-fini-gc.ll
The file was addedlld/test/wasm/command-exports.s
The file was modifiedlld/wasm/Symbols.h
The file was addedlld/test/wasm/command-exports-no-tors.s
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/wasm/MarkLive.cpp
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedlld/wasm/InputChunks.h
The file was addedlld/test/wasm/init-fini-no-gc.ll