Commit Graph

277 Commits

Author SHA1 Message Date
Peter Kasting b3b2538df1 [lld/coff] Make lld-link work in a non-MSVC shell, add /winsysroot:
Makes lld-link work in a non-MSVC shell by autodetecting MSVC toolchain. Also
adds support for /winsysroot and a few other switches.

All this is done by refactoring to share code with clang-cl's existing support
for the same.

Differential Revision: https://reviews.llvm.org/D118070
2022-02-11 13:55:18 -05:00
Geoffrey Martin-Noble 088fbc0cb4
[Bazel] Document continuous and pre-merge testing 2022-02-11 08:59:11 -08:00
Mehdi Amini 4e58cb18d3 Remove spurious includes and dependencies from Bazel files (NFC)
Differential Revision: https://reviews.llvm.org/D119526
2022-02-11 07:57:17 +00:00
Tres Popp 7ba3bbe8e5 Update bazel after 8d12bf4ac1 2022-02-10 10:12:13 +01:00
Benjamin Kramer 356705f94f [bazel] Sync llvm-config.h.cmake after a1862d78eb 2022-02-09 11:28:25 +01:00
Benjamin Kramer 079d847a9a [bazel] Port 46a6f5a 2022-02-09 11:28:24 +01:00
Benjamin Kramer b9f1e1c36c [bazel] Port 216575e581 2022-02-08 23:01:04 +01:00
Benjamin Kramer 6fde1afecd [Debuginfod][Symbolizer] Cut dependency cycle after 4a6553f4c2 2022-02-08 21:53:30 +01:00
Guillaume Chatelet 7e7ecef980 [libc] Replace type punning with bit_cast
Although type punning is defined for union in C, it is UB in C++.
This patch introduces a bit_cast function to convert between types in a safe way.

This is necessary to get llvm-libc compile with GCC.
This patch is extracted from D119002.

Differential Revision: https://reviews.llvm.org/D119145
2022-02-08 20:45:59 +00:00
Jacques Pienaar d15baefafa [mlir][bazel] Update post 24a1 2022-02-08 08:48:33 -08:00
Tres Popp a1f3f1d2c9 Add missing BUILD dependency to ShapeOps 2022-02-08 09:00:22 +01:00
Fangrui Song c27890b5fd [Bazel] Port e8bff9ae54 (move LLVM_ENABLE_ZLIB) 2022-02-07 11:45:31 -08:00
Jacques Pienaar 2204ac2978 [mlir][bazel] Update post ControlFlow dialect split 2022-02-06 17:21:48 -08:00
Lei Zhang 6699572705 [mlir][spirv] Fix missing dependencies in BUILD.bazel 2022-02-04 16:51:43 -05:00
Benjamin Kramer fc604825ec [bazel] Port dbed14d215 2022-02-04 22:14:45 +01:00
wren romano 4998b1a6cd [mlir][sparse] Updating sparse-compiler pipeline for python usage
Explicitly nests passes for FuncOp, adds more options to the sparse-compiler pipeline, and updates python integration tests.  This should be sufficient to close https://github.com/llvm/llvm-project/issues/51751

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D118658
2022-02-04 11:39:48 -08:00
Benjamin Kramer 309b48ca5e [mlir][vector] Sink StandardOps include to its user in VectorUtils 2022-02-03 12:34:41 +01:00
Benjamin Kramer 4a6c9b5686 [bazel] Port ead1107257 2022-02-03 01:41:03 +01:00
Siva Chandra Reddy e07100002e [libc][bazel overlay] Add a target for strncpy. 2022-02-02 20:19:32 +00:00
Geoffrey Martin-Noble ef72739eac [Bazel] Don't fail the build on usage of deprecated APIs
Build failures are not a particularly helpful way to enforce not using
deprecated APIs and that isn't the point of the Bazel build.

At the same time, this removes `-Wno-unused` this is a check that we do
enforce in the Google internal build and so are ok maintaining in our
maintenance of the upstream Bazel build (the comment about not wanting
to do so was from a time when this was in a separate repository and I was
the only one maintaining it).

Differential Revision: https://reviews.llvm.org/D118671
2022-01-31 18:09:44 -08:00
Fangrui Song 85dfe19b36 [ModuleUtils] Move EmbedBufferInModule to LLVMTransformsUtils
D116542 adds EmbedBufferInModule which introduces a layer violation
(https://llvm.org/docs/CodingStandards.html#library-layering).
See 2d5f857a1e for detail.

EmbedBufferInModule does not use BitcodeWriter functionality and should be moved
LLVMTransformsUtils. While here, change the function case to the prevailing
convention.

It seems that EmbedBufferInModule just follows the steps of
EmbedBitcodeInModule. EmbedBitcodeInModule calls WriteBitcodeToFile but has IR
update operations which ideally should be refactored to another library.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D118666
2022-01-31 16:33:57 -08:00
Fangrui Song 2d5f857a1e [Bazel] Add include/llvm/Transforms/Utils/ModuleUtils.h to work around layer violation after D116542
There is a layer violation and can break clang -fmodule-name=X -fmodules-strict-decluse builds:

* LLVMTransformUtils has `#include "llvm/Bitcode/BitcodeWriterPass.h"`
* LLVMBitWriter depends on LLVMTransformUtils after D116542

Temporarily work around the issue.
2022-01-31 15:41:45 -08:00
bakhtiyar 149311b405 [async] Get the number of worker threads from the runtime.
Reviewed By: ezhulenev

Differential Revision: https://reviews.llvm.org/D117751
2022-01-31 12:06:01 -08:00
Matthias Springer 5523c1455a [mlir][bufferize][NFC] Move vector BufferizableOpInterface impl to vector dialect
Differential Revision: https://reviews.llvm.org/D118540
2022-02-01 00:28:28 +09:00
Matthias Springer 99ef9eebad [mlir][vector][NFC] Split into IR, Transforms and Utils
This reduces the dependencies of the MLIRVector target and makes the dialect consistent with other dialects.

Differential Revision: https://reviews.llvm.org/D118533
2022-01-31 19:17:09 +09:00
Matthias Springer e448c793c6 [mlir][bufferize][NFC] Move std BufferizableOpInterfaceImpl to std dialect
Also reimplement `std-bufferize` in terms of BufferizableOpInterface-based bufferization. The old `std.select` bufferization pattern is no longer needed and deleted.

Differential Revision: https://reviews.llvm.org/D118559
2022-01-30 22:12:14 +09:00
Matthias Springer 19efe141f7 [mlir][bufferize][NFC] Move scf BufferizableOpInterface impl to scf dialect
Differential Revision: https://reviews.llvm.org/D118557
2022-01-30 21:53:33 +09:00
Matthias Springer 7a9765e8a8 Update BUILD.bazel.
This should have been done as part of D118483.
2022-01-30 21:49:49 +09:00
wren romano b85ed4e0e1 [mlir][sparse] Adding standard pipeline for tests.
Addresses https://bugs.llvm.org/show_bug.cgi?id=52409 aka https://github.com/llvm/llvm-project/issues/51751

Reviewed By: aartbik, mehdi_amini

Differential Revision: https://reviews.llvm.org/D117919
2022-01-28 15:11:12 -08:00
Jordan Rupprecht 282c83c323 [libc] Add missing sqrt deps for layering checks 2022-01-28 12:11:27 -08:00
Tue Ly ad4ee2d778 [libc] Refactor sqrt implementations and add tests for generic sqrt implementations.
Re-apply https://reviews.llvm.org/D118173 with fix for aarch64.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D118433
2022-01-28 13:39:03 -05:00
Adrian Kuegel f40475c7fd [mlir] Move SCF utils implementations to SCF/Utils.
BEGIN_PUBLIC
[mlir] Move SCF utils implementations to SCF/Utils.
END_PUBLIC
2022-01-28 11:54:27 +01:00
Adrian Kuegel c962b3fdf8 [mlir][Bazel][cmake] Add missing dependency.
After 2c7b0685e1 this dependency is needed.
2022-01-28 08:20:24 +01:00
Siva Chandra Reddy 4beba3a32a [libc] Revert "Refactor sqrt implementations and add tests for generic sqrt implementations."
This reverts commit 21c4c82c20.
2022-01-27 21:06:14 +00:00
Tue Ly 21c4c82c20 [libc] Refactor sqrt implementations and add tests for generic sqrt implementations.
Refactor sqrt implementations:
- Move architecture specific instructions from `src/math/<arch>` to `src/__support/FPUtil/<arch>` folder.
- Move generic implementation of `sqrt` to `src/__support/FPUtil/generic` folder and add it as a header library.
- Use `src/__support/FPUtil/sqrt.h` for architecture/generic selections.
- Add unit tests for generic implementation of `sqrt`.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D118173
2022-01-27 11:54:54 -05:00
Matthias Springer 075e3fdda1 [mlir][bufferize] Move arith BufferizableOpInterface impl to arith dialect
Also switch the implementation of `-arith-bufferize` to BufferizableOpInterface.

Differential Revision: https://reviews.llvm.org/D118325
2022-01-28 01:40:22 +09:00
Adrian Kuegel 199c2d63fd [mlir][Bazel] Add TestMemRef target.
Needed after D118285

Differential Revision: https://reviews.llvm.org/D118330
2022-01-27 09:54:01 +01:00
Adrian Kuegel a911a69408 [mlir][Bazel] Add missing dependency to ArithmeticTransforms. 2022-01-27 09:31:55 +01:00
Benjamin Kramer f32dccb9a4 [bazel] Port 480cd4cb 2022-01-26 23:24:45 +01:00
Jordan Rupprecht e7cf109587 [bazel] Enable layering_check for MLIR test directory
This would have enabled me to notice the MLIR test file needed updating too, preventing the test file of 2074eef5db from being necessary.

layering_check is already enabled in mlir/BUILD.bazel. I don't know why I didn't see the other breakage there.

Differential Revision: https://reviews.llvm.org/D118125
2022-01-26 13:37:42 -08:00
jonmeow 4691f00a63 Initialize terminfo.bzl linkopts to None
The underlying issue here is that line 125 checks if linkopts was assigned (by line 120) but it's not initialized, so that becomes a crash. This was noticed by someone trying to use Docker, so no terminfo library installed.

Reviewed By: GMNGeoffrey

Differential Revision: https://reviews.llvm.org/D118270
2022-01-26 11:03:26 -08:00
Adrian Kuegel 1a6e60d01f [Bazel] Update config.h to add the new define. 2022-01-26 18:30:38 +01:00
Adrian Kuegel b61c878fc5 [mlir][Bazel] Remove unnecessary dependencies
Differential Revision: https://reviews.llvm.org/D118221
2022-01-26 10:55:40 +01:00
Adrian Kuegel a83e9266b9 [mlir][Bazel] Update BUILD.bazel file 2022-01-25 12:33:42 +01:00
Benjamin Kramer 2074eef5db [bazel] Adjust dependencies after a70aa7bb
These are all picked up transitively, but fail with
--features=layering_check, which enforces header dependencies.
2022-01-25 11:49:45 +01:00
Jordan Rupprecht 71cb5ed03c [bazel] Update MLIR deps
I believe this is due to D117839, D117848, maybe others.

Latest build failure: https://buildkite.com/llvm-project/upstream-bazel-rbe/builds/18053
2022-01-24 21:24:36 -08:00
Clint Caywood 57eb5033cd [libc] Add bazel definition for hypot/hypotf.
Patch by Clint Caywood.

Differential Revision: https://reviews.llvm.org/D118053
2022-01-24 09:54:23 -08:00
Matthias Springer b00ee46b5e [mlir][bufferize][NFC] Implement BufferizableOpInterface on bufferization ops directly
No longer go through an external model. Also put BufferizableOpInterface into the same build target as the BufferizationDialect. This allows for some code reuse between BufferizationOps canonicalizers and BufferizableOpInterface implementations.

Differential Revision: https://reviews.llvm.org/D117987
2022-01-25 01:23:26 +09:00
Matthias Springer 49e3700069 [mlir][tensor] Move BufferizableOpInterface impl to tensor dialect
This is in preparation of unifying the existing bufferization with One-Shot bufferization.

A subsequent commit will replace `tensor-bufferize`'s implementation with the BufferizableOpInterface-based implementation and move over missing test cases.

Differential Revision: https://reviews.llvm.org/D117984
2022-01-24 23:54:49 +09:00
Alexander Belyaev fd0c6f5391 [mlir] Move linalg::PadTensorOp to tensor::PadOp.
RFC: https://llvm.discourse.group/t/rfc-move-linalg-padtensorop-to-tensor-padop/5785

Differential Revision: https://reviews.llvm.org/D117892
2022-01-21 20:02:39 +01:00