Commit Graph

725 Commits

Author SHA1 Message Date
Benjamin Kramer
23132508d9 [bazel] Port 3f050f6ac4 2022-09-29 00:12:46 +02:00
Christian Sigg
0a14f73126 [Bazel] NFC: Move ParseUtilities.h from 'hdrs' to 'srcs'.
This is slightly cleaner.
2022-09-28 08:30:08 +02:00
Christian Sigg
39bf517e01 [Bazel] Fix after 4b27825ba3. 2022-09-28 08:18:30 +02:00
bixia1
4329ca61e8 [mlir][sparse] Add sparse_tensor.sort operator.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D134482
2022-09-27 12:00:08 -07:00
Lorenzo Chelini
4db3a649ea [MLIR] Expose getAsValues in StaticValueUtils.h (NFC) [reland]
The utility function should live in `StaticValueUtils.h` as it provides
a convenient way to convert a vector of OpFoldResults into a vector of
Values.

Reviewed By: nicolasvasilache, cota

Differential Revision: https://reviews.llvm.org/D134451
2022-09-27 11:18:25 -04:00
Christian Sigg
7876469c77 [Bazel] Remove template_rule and use @bazel_skylib's expand_template instead.
Reviewed By: GMNGeoffrey

Differential Revision: https://reviews.llvm.org/D134347
2022-09-26 15:29:59 +02:00
Guillaume Chatelet
aec908f9b2 [libc][NFC] Move bzero_inline to separate file
This allows for easier discovery.
2022-09-26 12:57:51 +00:00
Oleg Shyshkov
4f1c124251 [mlir] Add IteratorType enum to StructuredOpsUtils.
Summary:
Use the new enum in TilingIterface and verify that `iterator_type` attribute in
LinalgOp interface is compatible with the enum values. Later IteratorType enum
will be used in LinalgInterface to replace the current `iterator_type` attribute
array of string.

Existing enums in Linalg are moved into a separate td file and tablegen build
target. This is necessary, have one I32EnumAttr in a shared space that generated
enum class definition and EnumAttrs is dialect-specific location. Otherwise
there might be a conflict that I32EnumAttr generates enum definitions in
multiple places.

Differential Revision: https://reviews.llvm.org/D134634
2022-09-26 11:09:46 +00:00
Adrian Kuegel
585010b4b0 Revert "[mlir][Bazel] Port 730ae80d3e1c47f93f725acb2d37f06fcba06953"
This reverts commit ec8f08ce08.

The change that needed this BUILD fix was reverted.
2022-09-26 10:09:02 +02:00
Adrian Kuegel
a096164134 Revert "[mlir][Bazel] Port 730ae80d3e part 2."
This reverts commit b4cc363e86.

The change which needed this BUILD fix was reverted.
2022-09-26 10:04:56 +02:00
Adrian Kuegel
b4cc363e86 [mlir][Bazel] Port 730ae80d3e part 2. 2022-09-26 09:51:22 +02:00
Adrian Kuegel
ec8f08ce08 [mlir][Bazel] Port 730ae80d3e 2022-09-26 09:45:24 +02:00
Adrian Kuegel
a3df255e9c [mlir][Bazel] Port afb0b21f24 2022-09-26 09:38:22 +02:00
Arthur Eubanks
7a8b9307ca [bazel] Always specify --strip=never 2022-09-25 18:49:49 -07:00
Arthur Eubanks
2698be0cc9 [bazel] Add some general build flags 2022-09-25 18:22:22 -07:00
Lei Zhang
465ec4e0b4 [mlir] NFC: move mergeOffsetsSizesAndStrides into Affine/Utils
So that these utility functions can also be used ViewLikeInterface
ops not in the memref dialect.

Reviewed By: mravishankar, christopherbate

Differential Revision: https://reviews.llvm.org/D134487
2022-09-23 13:28:11 -04:00
Arthur Eubanks
0de7c15c88 [bazel] Be consistent and say we don't support libfpm everywhere
We're inconsistent about saying whether or not we support libfpm in the bazel build.

This should perhaps be configurable via a --config.

This allows the buildbots to see when llvm-exegesis-related breakages occur.

Differential Revision: https://reviews.llvm.org/D134510
2022-09-23 09:27:55 -07:00
Jordan Rupprecht
892260d7f3 [bazel] Respect llvm_target_list in llvm-exegesis
- 47afaf2eb0 changed llvm-exegesis cmake rules
- 5b2f838db4 ported them to bazel, but did so by adding all the `lib/{target}/*.cpp` sources in exegesis to the build rule
- c7bf9d084d removed it, because it breaks users who don't build Mips and fail when building `lib/Mips/*.cpp`. But that in turn breaks those who *do* build the Mips target.

This should hopefully fix it for the final time by using selectively build subdirectories of exegesis target libs using llvm_target_exegesis, which is derived from llvm_targets, and is the list that can vary based on the downstream user.

I verified this builds with and without `Mips` in the `DEFAULT_TARGETS` configure list, and also double checked with `bazel query --output=build @llvm-project//llvm:Exegesis` that `lib/Mips/Target.cpp` is being included if and only if `Mips` is in the target list.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D134512
2022-09-22 19:20:04 -07:00
Arthur Eubanks
c068ea230b [bazel] Remove "nobuildkite" flag for targets depending on libxml2
The buildbots do have libxml2 installed.
2022-09-22 18:30:44 -07:00
Caroline Tice
c7bf9d084d [bazel] Remove Mips from Exegesis cc_library definition
Recent update added 'tools/llvm-exegesis/lib/Mips/*.cpp' to srcs for Exegesis cc_library. This was not needed, and in fact breaks things. This CL removes that one change.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D134505
2022-09-22 17:39:53 -07:00
Jordan Rupprecht
5b2f838db4 [bazel] Port 47afaf2eb0 to bazel 2022-09-22 15:00:15 -07:00
Adrian Kuegel
539fa1df46 [mlir][Bazel] Port f5fe92f693 2022-09-21 07:51:36 +02:00
Frederik Gossen
6e50d66419 [MLIR] Update bazel build files after 242d558658
Differential Revision: https://reviews.llvm.org/D134301
2022-09-20 15:20:22 -04:00
Peiming Liu
52887071ea [mlir][scf] Support simple symbolic expression without depending on AffineDialect to simply trivial loops.
Remove dependence of AffineDialect

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D134291
2022-09-20 18:13:05 +00:00
Peiming Liu
d518fc28b6 [mlir][scf] Support simple symbolic expression when simplify loops
Reviewed By: aartbik, ThomasRaoux

Differential Revision: https://reviews.llvm.org/D134204
2022-09-19 21:50:01 +00:00
Dmitri Gribenko
7b7559aa43 [bazel] Port ba8424a251 2022-09-19 21:21:08 +02:00
Benjamin Kramer
9b2a3d20f2 [bazel] Port 233de4e808 2022-09-19 16:38:20 +02:00
Christian Sigg
a6e91040ea [Bazel] Allow lit_test() macro to be used from other repos.
Wrap implicit dependencies in Label() so that they refer to @llvm-project, see https://bazel.build/rules/lib/Label#Label.

This change allows lit_test() to be used from other bazel repositories.
2022-09-17 11:06:07 +02:00
Groverkss
8c867f7827 [MLIR][Presburger] Improve unittest parsing
This patch adds better functions for parsing MultiAffineFunctions and
PWMAFunctions in Presburger unittests.

A PWMAFunction can now be parsed as:

```
PWMAFunction result = parsePWMAF({
    {"(x, y) : (x >= 10, x <= 20, y >= 1)", "(x, y) -> (x + y)"},
    {"(x, y) : (x >= 21)", "(x, y) -> (x + y)"},
    {"(x, y) : (x <= 9)", "(x, y) -> (x - y)"},
    {"(x, y) : (x >= 10, x <= 20, y <= 0)", "(x, y) -> (x - y)"},
});
```

which is much more readable than the old format since the output can be
described as an AffineMap, instead of coefficients.

This patch also adds support for parsing divisions in MultiAffineFunctions
and PWMAFunctions which was previously not possible.

Reviewed By: arjunp

Differential Revision: https://reviews.llvm.org/D133654
2022-09-15 19:28:49 +01:00
Haojian Wu
6c9d2ee490 Revert "Fix bazel build after 84d07d021333f7b5716f0444d5c09105557272e0."
This reverts commit 10250c5a2a as the
related patch is being reverted.
2022-09-15 20:02:27 +02:00
Haojian Wu
10250c5a2a Fix bazel build after 84d07d0213. 2022-09-15 13:52:46 +02:00
Christian Sigg
70ac466676 [Bazel] Add lit tests to bazel builds.
Add BUILD.bazel files for most of the MLIR tests and lit tests itself.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D133455
2022-09-15 07:49:37 +02:00
Christian Sigg
d308113354 [Bazel] Bump bazel version to 5.0.
See https://discourse.llvm.org/t/use-bazelisk-for-bazel-buildbots/65188.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D133750
2022-09-13 20:09:13 +02:00
Haojian Wu
6a49c801a7 Fix Bazel build for llvm-lipo (61e5438498) 2022-09-13 10:26:43 +02:00
Fangrui Song
0845969a28 [Bazel] Port eb65327fe9 2022-09-09 15:35:52 -07:00
Benjamin Kramer
f055d9c549 [bazel] Port 7fa1d743d0 2022-09-09 09:31:13 +02:00
Christopher Bate
f4a478cd01 [mlir][Tensor] Add rewrites to extract slices through tensor.collape_shape
This change adds a set of utilities to replace the result of a
`tensor.collapse_shape -> tensor.extract_slice` chain with the
equivalent result formed by aggregating slices of the
`tensor.collapse_shape` source. In general, it is not possible to
commute `extract_slice` and `collapse_shape` if linearized dimensions
are sliced. The i-th dimension of the `tensor.collapse_shape`
result is a "linearized sliced dimension" if:

1) Reassociation indices of tensor.collapse_shape in the i'th position
   is greater than size 1 (multiple dimensions of the input are collapsed)
2) The i-th dimension is sliced by `tensor.extract_slice`.

We can work around this by stitching together the result of
`tensor.extract_slice` by iterating over any linearized sliced dimensions.
This is equivalent to "tiling" the linearized-and-sliced dimensions of
the `tensor.collapse_shape` operation in order to manifest the result
tile (the result of the `tensor.extract_slice`). The user of the
utilities must provide the mechanism to create the tiling (e.g. a loop).
In the tests, it is demonstrated how to apply the utilities using either
`scf.for` or `scf.foreach_thread`.

The below example illustrates the pattern using `scf.for`:

```
%0 = linalg.generic ... -> tensor<3x7x11x10xf32>
%1 = tensor.collapse_shape %0 [[0, 1, 2], [3]] : ... to tensor<341x10xf32>
%2 = tensor.extract_slice %1 [13, 0] [10, 10] [2, 1] : .... tensor<10x10xf32>
```

We can construct %2 by generating the following IR:

```
%dest = linalg.init_tensor() : tensor<10x10xf32>
%2 = scf.for %iv = %c0 to %c10 step %c1 iter_args(%arg0) -> tensor<10x10xf32> {
   // Step 1: Map this output idx (%iv) to a multi-index for the input (%3):
   %linear_index = affine.apply affine_map<(d0)[]->(d0*2 + 11)>(%iv)
   %3:3 = arith.delinearize_index %iv into (3, 7, 11)
   // Step 2: Extract the slice from the input
   %4 = tensor.extract_slice %0 [%3#0, %3#1, %3#2, 0] [1, 1, 1, 10] [1, 1, 1, 1] :
         tensor<3x7x11x10xf32> to tensor<1x1x1x10xf32>
   %5 = tensor.collapse_shape %4 [[0, 1, 2], [3]] :
         tensor<1x1x1x10xf32> into tensor<1x10xf32>
   // Step 3: Insert the slice into the destination
   %6 = tensor.insert_slice %5 into %arg0 [%iv, 0] [1, 10] [1, 1] :
         tensor<1x10xf32> into tensor<10x10xf32>
   scf.yield %6 : tensor<10x10xf32>
}
```

The pattern was discussed in the RFC here: https://discourse.llvm.org/t/rfc-tensor-extracting-slices-from-tensor-collapse-shape/64034

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D129699
2022-09-08 21:58:21 -06:00
rdzhabarov
fba411aa47 Revert "Fix bazel deps.". Original change has been reverted.
This reverts commit b3999fd261.
2022-09-08 22:11:44 +00:00
rdzhabarov
b3999fd261 Fix bazel deps. 2022-09-08 21:21:20 +00:00
Quentin Colombet
e833fdcd05 [mlir] Add missing dependency in bazel build
The MemRefTransform library now depends on ArithmeticUtils because
of the newly added SimplifyExtractStridedMetadata pass.
2022-09-08 18:51:14 +00:00
Christian Sigg
250cde6ea9 [MLIR] NFC: add back exports_files(["run_lit.sh"]). 2022-09-08 07:46:10 +02:00
Christian Sigg
482aff4576 [MLIR] NFC: add back exports_files(["LICENSE.txt"]). 2022-09-07 22:14:12 +02:00
Christian Sigg
c69c780aef [MLIR] NFC: expand comment in bazel BUILD file
... and remove unnecessry `exports_files()`.
2022-09-07 22:00:18 +02:00
Fangrui Song
98fe49c463 [Bazel] Make clang/unittests:lex_tests depend on //llvm:TestingSupport 2022-09-07 12:51:31 -07:00
Oleg Shyshkov
fcab0a04c5 [mlir] Change CombiningKind in Vector dialect to EnumAttr.
CombiningKind was implemented before EnumAttr, so it reimplements the same behaviour with the custom code. Except for a few places, EnumAttr is a drop-in replacement.

Reviewed By: nicolasvasilache, pifon2a

Differential Revision: https://reviews.llvm.org/D133343
2022-09-07 13:40:45 +02:00
Benjamin Kramer
a7c6cdc5cf [bazel] port 5dbc7cf7ca 2022-09-06 17:43:04 +02:00
Christian Sigg
0f2ec35691 [MLIR] Switch lit tests to %mlir_lib_dir and %mlir_src_dir replacements.
The old replacements will be removed soon:
- `%linalg_test_lib_dir`
- `%cuda_wrapper_library_dir`
- `%spirv_wrapper_library_dir`
- `%vulkan_wrapper_library_dir`
- `%mlir_runner_utils_dir`
- `%mlir_integration_test_dir`

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D133270
2022-09-06 12:34:14 +02:00
Mehdi Amini
89418ddcb5 Plumb write_bytecode to the Python API
This adds a `write_bytecode` method to the Operation class.
The method takes a file handle and writes the binary blob to it.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D133210
2022-09-05 12:02:06 +00:00
Christian Sigg
69778121e4 [bazel] NFC: Move licenses declaration from package to function.
The `licences` attribute is deprecated, see https://docs.bazel.build/versions/4.0.0/be/common-definitions.html#common-attributes.
2022-09-05 10:47:06 +02:00
Christian Sigg
725cdc451a [mlir:vscode] Fix bazel build after commit f7b8a70 2022-09-04 11:37:06 +02:00
Benjamin Kramer
278de327d9 [bazel] Port f7b8a70e7a 2022-09-03 09:55:37 +02:00
Mikhail Goncharov
5856576202 [bazel] fix libc build
For a4d48e3b0b
2022-09-02 18:33:28 +02:00
Matthias Springer
f7f0c7f7e3 [mlir][bufferize] Add isRepetitiveRegion to BufferizableOpInterface
This method allows to declare regions as "repetitive" even if the parent op does not implement the RegionBranchOpInterface.

This is needed to support loop-like ops that have parallel semantics but do not branch between regions.

Differential Revision: https://reviews.llvm.org/D133113
2022-09-02 14:47:20 +02:00
Mikhail Goncharov
8a4d6133de [bazel] additional build fixes for libc
after fe41529755
2022-09-02 13:04:51 +02:00
Wei Yi Tee
14757d5b84 [clang][dataflow] Refactor TypeErasedDataflowAnalysisTest - replace usage of the deprecated overload of checkDataflow.
Reviewed By: gribozavr2, sgatev

Differential Revision: https://reviews.llvm.org/D132756
2022-09-01 19:17:37 +00:00
Michael Jones
cb84721c3c [libc] add division, modulo, and power to UInt
This adds division and power implementations to UInt. Modulo and
division are handled by the same function. These are necessary for some
higher order mathematics, often involving large floating point numbers.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D132184
2022-09-01 11:22:26 -07:00
Michael Jones
fe41529755 [libc] move builtin_wrappers out of fputil
builtin_wrappers contains the wrappers for the clz builtins, which do
not depend on anything in fputil. This patch moves the file out of
FPUtil. The location is updated as appropriate.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D133035
2022-09-01 11:17:00 -07:00
Michael Jones
c5f08544e8 [libc][bazel] split fputil into individual targets
This matches the change made to cmake, mostly. I've left the process of
splitting the inclusions for all the math functions for a later time.

Reviewed By: lntue, sivachandra

Differential Revision: https://reviews.llvm.org/D133073
2022-09-01 10:58:56 -07:00
Wei Yi Tee
f6b66cbc7d [llvm][Testing/ADT] Implement IsStringMapEntry testing matcher for verifying the entries in a StringMap.
Reviewed By: gribozavr2, ymandel, sgatev

Differential Revision: https://reviews.llvm.org/D132753
2022-09-01 17:30:41 +00:00
Tres Popp
7c0cf32838 bazel fixes for c55b41d519 2022-09-01 08:19:52 +02:00
Wei Yi Tee
d45c04da7c [llvm][ADT] Overload output stream operator << for StringMapEntry and StringMap.
Printing support enables the production of more useful error messages in unit testing e.g. when using matchers such as `UnorderedElementsAre()` to inspect the contents of a `StringMap`.

Reviewed By: gribozavr2, sgatev, ymandel

Differential Revision: https://reviews.llvm.org/D132747
2022-08-31 17:37:58 +00:00
Siva Chandra Reddy
ada51eed7e [bazel overlay][libc] Add unistd targets.
Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D133004
2022-08-31 14:29:50 +00:00
Benjamin Kramer
4b63507811 [bazel] Drop ConversionPassDetail, it shouldn't be needed after 67d0d7ac0a 2022-08-31 13:31:52 +02:00
Johannes Reifferscheid
23dec4a352 Move BufferViewFlowAnalysis to the Bufferization dialect.
It's only used from there, and this lets us remove the dependency from Analysis
to the Arith dialect.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D132928
2022-08-30 14:25:49 +02:00
Benjamin Kramer
bb3d14ec8b [bazel] Stop building PassGenTest.cpp.inc, it was removed in 13ed6958df 2022-08-30 11:01:33 +02:00
Benjamin Kramer
9a9d027086 [bazel] Add missing dependency after 1b002d2768 2022-08-28 09:56:17 +02:00
Benjamin Kramer
adb3a09b90 [bazel] Drop clang-offload-wrapper. It was deleted in 47166968db 2022-08-26 21:02:39 +02:00
Benjamin Kramer
766f5d8c3c [bazel] Port a235562c0a 2022-08-26 19:17:19 +02:00
Adrian Kuegel
d0546fbea2 [mlir][Bazel] Fix wrong dependency to //llvm:Support 2022-08-26 09:06:40 +02:00
Adrian Kuegel
26b84eb143 [mlir][Bazel] Fix bazel build. 2022-08-26 09:04:50 +02:00
Guillaume Chatelet
9d239b37f7 [NFC][libc] Move Uint implementation to parent directory
Differential Revision: https://reviews.llvm.org/D132638
2022-08-25 12:42:06 +00:00
Mircea Trofin
5ce4c9aa04 [mlgo] Use TFLite for 'development' mode.
TLite is a lightweight, statically linkable[1], model evaluator, supporting a
subset of what the full tensorflow library does, sufficient for the
types of scenarios we envision having. It is also faster.

We still use saved models as "source of truth" - 'release' mode's AOT
starts from a saved model; and the ML training side operates in terms of
saved models.

Using TFLite solves the following problems compared to using the full TF
C API:

- a compiler-friendly implementation for runtime-loadable (as opposed
  to AOT-embedded) models: it's statically linked; it can be built via
  cmake;
- solves an issue we had when building the compiler with both AOT and
  full TF C API support, whereby, due to a packaging issue on the TF
  side, we needed to have the pip package and the TF C API library at
  the same version. We have no such constraints now.

The main liability is it supporting a subset of what the full TF
framework does. We do not expect that to cause an issue, but should that
be the case, we can always revert back to using the full framework
(after also figuring out a way to address the problems that motivated
the move to TFLite).

Details:

This change switches the development mode to TFLite. Models are still
expected to be placed in a directory - i.e. the parameters to clang
don't change; what changes is the directory content: we still need
an `output_spec.json` file; but instead of the saved_model protobuf and
the `variables` directory, we now just have one file, `model.tflite`.

The change includes a utility showing how to take a saved model and
convert it to TFLite, which it uses for testing.

The full TF implementation can still be built (not side-by-side). We
intend to remove it shortly, after patching downstream dependencies. The
build behavior, however, prioritizes TFLite - i.e. trying to enable both
full TF C API and TFLite will just pick TFLite.

[1] thanks to @petrhosek's changes to TFLite's cmake support and its deps!
2022-08-24 16:07:24 -07:00
Adrian Kuegel
9ef41ecb2a [mlir][Bazel] Fix bazel build. 2022-08-24 10:13:53 +02:00
Adrian Kuegel
23b3bcc7a6 [mlir][Bazel] Fix bazel build.
To avoid a dependency cycle, add BytecodeImplementation.h header to the
"IR" target.
2022-08-24 08:51:44 +02:00
Johannes Reifferscheid
27a1a85662 buffer-deallocation: consider aliases introduced by arith.select.
Currently, buffer deallocation considers arith.select to be
non-aliasing, which results in deallocs being inserted incorrectly. Since
arith.select doesn't implement any useful interfaces, this change just handles
it explicitly. Eventually this should probably be fixed properly, if this pass
is going to be used long term.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D132460
2022-08-23 14:37:02 +02:00
Matthias Springer
c37ed7762e [tensor][bufferize] Use affine.apply instead of arith.addi in PadOp lowering
Affine exprs compose better than arith ops.

Differential Revision: https://reviews.llvm.org/D132456
2022-08-23 11:46:11 +02:00
Arthur Eubanks
b04d01c009 [bazel][docs] Mention how to provide path to compiler
And some other cleanups/clarifications.

Reviewed By: saugustine

Differential Revision: https://reviews.llvm.org/D132396
2022-08-22 10:13:47 -07:00
Arthur Eubanks
d5a57ab742 [bazel] Move some CI flags into .bazelrc 2022-08-22 10:12:29 -07:00
Arthur Eubanks
9a83f38408 [bazel] Add note about using -c opt for CI 2022-08-22 09:36:23 -07:00
Goran Flegar
59548fe873 [mlir] Fix compile errors with bytecode support 2022-08-22 17:59:51 +02:00
Guillaume Chatelet
aa59c9810a [libc][NFC] Use STL case for string_view 2022-08-22 15:25:14 +00:00
Guillaume Chatelet
c860fd3f25 [NFC][libc] Remove ArrayRef which is replaced with span 2022-08-22 10:52:28 +00:00
Goran Flegar
1d9b1427f4 [mlir][Bazel] Fix bazel build
Add fixes for https://reviews.llvm.org/D131747
2022-08-22 12:07:55 +02:00
Kazu Hirata
36357c967c Remove llvm::is_trivially_copyable (NFC)
This patch removes llvm::is_trivially_copyable as it seems to be dead.
Once I remove it, HAVE_STD_IS_TRIVIALLY_COPYABLE has no users, so this
patch removes the macro also.

The comment on llvm::is_trivially_copyable mentions GCC 4.9, but note
that we now require GCC 7.1 or higher.

Differential Revision: https://reviews.llvm.org/D132328
2022-08-21 10:39:19 -07:00
Anlun Xu
9a764ffeb6 [mlir][Bazel] Fix Bazel build
Differential Revision: https://reviews.llvm.org/D132264
2022-08-21 01:02:21 -07:00
John Ericson
3adda398ce [clang][lldb][cmake] Use new *_INSTALL_LIBDIR_BASENAME CPP macro
Use this instead of `*_LIBDIR_SUFFIX`, from which it is computed.

This gets us ready for D130586, in which `*_LIBDIR_SUFFIX` is
deprecated.

Differential Revision: https://reviews.llvm.org/D132300
2022-08-20 12:52:21 -04:00
Guillaume Chatelet
e2d7975843 [libc][NFC] Use STL case for bitset and simplify implementation 2022-08-19 21:39:14 +00:00
Guillaume Chatelet
d769cd8cdc [reland][libc][NFC] Use STL case for bit 2022-08-19 21:26:26 +00:00
Guillaume Chatelet
175560fc21 Revert "[libc][NFC] Use STL case for bit"
This reverts commit 7ba14b8611.
2022-08-19 21:17:48 +00:00
Guillaume Chatelet
7ba14b8611 [libc][NFC] Use STL case for bit 2022-08-19 21:10:27 +00:00
John Ericson
e941b031d3 Revert "[cmake] Use CMAKE_INSTALL_LIBDIR too"
This reverts commit f7a33090a9.

Unfortunately this causes a number of failures that didn't show up in my
local build.
2022-08-18 22:46:32 -04:00
John Ericson
f7a33090a9 [cmake] Use CMAKE_INSTALL_LIBDIR too
We held off on this before as `LLVM_LIBDIR_SUFFIX` conflicted with it.
Now we return this.

`LLVM_LIBDIR_SUFFIX` is kept as a deprecated way to set
`CMAKE_INSTALL_LIBDIR`. The other `*_LIBDIR_SUFFIX` are just removed
entirely.

I imagine this is too potentially-breaking to make LLVM 15. That's fine.
I have a more minimal version of this in the disto (NixOS) patches for
LLVM 15 (like previous versions). This more expansive version I will
test harder after the release is cut.

Reviewed By: sebastian-ne, ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D130586
2022-08-18 15:33:35 -04:00
David Blaikie
ed342d9d29 Add missing bazel dep 2022-08-18 07:13:19 +00:00
Arthur Eubanks
77ce95a83b [bazel] Add --config=ci
To speedup builds/tests.
2022-08-17 09:10:47 -07:00
Arthur Eubanks
76b1e8365a [bazel] Use lld in --config=generic_clang
This should give us faster links.

Differential Revision: https://reviews.llvm.org/D131723
2022-08-12 11:45:28 -07:00
Arthur Eubanks
3f2f23cca9 [bazel] Remove --config=rbe
RBE is currently broken due to the RBE container being too old and not supporting C++17.
The bots have already stopped using --config=rbe.

Differential Revision: https://reviews.llvm.org/D131722
2022-08-12 11:45:02 -07:00
Alex Zinenko
a60ed95419 [mlir][transform] failure propagation mode in sequence
Introduce two different failure propagation mode in the Transform
dialect's Sequence operation. These modes specify whether silenceable
errors produced by nested ops are immediately propagated, thus stopping
the sequence, or suppressed. The latter is useful in end-to-end
transform application scenarios where the user cannot correct the
transformation, but it is robust enough to silenceable failures. It
can be combined with the "alternatives" operation. There is
intentionally no default value to avoid favoring one mode over the
other.

Downstreams can update their tests using:

  S='s/sequence \(%.*\) {/sequence \1 failures(propagate) {/'
  T='s/sequence {/sequence failures(propagate) {/'
  git grep -l transform.sequence | xargs sed -i -e "$S"
  git grep -l transform.sequence | xargs sed -i -e "$T"

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D131774
2022-08-12 15:31:22 +00:00
Benjamin Kramer
170ec0e418
[bazel] Port 3e119c0efd 2022-08-12 14:52:49 +02:00
Krasimir Georgiev
603edb93bc [bazel] Add WindowsDriver as a dep of OrcJIT (llvmorg-16-init-1433-g7260cdd2e13a) 2022-08-11 11:17:27 +02:00
Benjamin Kramer
2d2ad02f43 [bazel] Switch to C++17
LLVM switched to C++17 in b1356504e6
2022-08-06 21:48:10 +02:00