Commit Graph

601 Commits

Author SHA1 Message Date
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
Benjamin Kramer d6eea96b8e [bazel] Port 1c5a50e328 2022-08-06 16:08:48 +02:00
Benjamin Kramer e0807b0d7e [bazel] Add missing dependency after 713f85d595 2022-08-06 11:34:24 +02:00
Tue Ly 131dda9acc [libc] Implement sincosf function correctly rounded to all rounding modes.
Refactor common range reductions and evaluations for sinf, cosf, and
sincosf.  Added exhaustive tests for sincosf.

Performance before the patch:
```
System LIBC reciprocal throughput : 30.205
LIBC reciprocal throughput        : 30.533

System LIBC latency : 67.961
LIBC latency        : 61.564
```
Performance after the patch:
```
System LIBC reciprocal throughput : 30.409
LIBC reciprocal throughput        : 20.273

System LIBC latency : 67.527
LIBC latency        : 61.959
```

Reviewed By: orex

Differential Revision: https://reviews.llvm.org/D130901
2022-08-05 09:58:01 -04:00
Jeff Bailey 3b631e47fe [libc] Trivial implementation of std::optional
This class has only the minimum functionality in it to provide what the
TZ variable parsing needs.  In particular, the standard makes guarantees
about how trivial the destructors are, throws an expception if it's used
incorrectly, etc.  There are also missing features.

Tested:
Trivial testsuite added, and use in development.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D129920
2022-08-05 02:51:44 +00:00
Adrian Kuegel bc32896e9f [llvm][Bazel] Exclude TrainingLoggerTest.cpp from build.
It requires a google protobuf dependency.
2022-08-04 08:48:17 +02:00
Sriraman Tallam 3e43d0cde7 This patch fixes these errors while building BOLT.
Compiling llvm/llvm-project/bolt/include/bolt/Passes/RegReAssign.h failed:
...: error: invalid application of 'sizeof' to an incomplete type 'llvm::bolt::BinaryFunctionCallGraph'

static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
error: type 'llvm::bolt::BinaryBasicBlock *' cannot be used prior to '::' because it has no members

using NodeRef = typename GraphType::UnknownGraphTypeError;
BinaryDomTree.h:31:14: error: no template named 'DomTreeGraphTraitsBase'

: public DomTreeGraphTraitsBase<bolt::BinaryDomTreeNode,

Differential Revision: https://reviews.llvm.org/D130402
2022-08-02 11:23:37 -07:00
Adrian Kuegel 6c66b089bc [mlir][Bazel] Fix typo in file name. 2022-08-02 09:27:20 +02:00
Adrian Kuegel b0cfbda04e [mlir][Bazel] Add missing dependency. 2022-08-02 09:23:03 +02:00
Adrian Kuegel 9183d40313 [mlir][Bazel] Add yet another missing dependency. 2022-08-02 09:15:43 +02:00
Adrian Kuegel 0b41c610f6 [mlir][Bazel] Add missing dependency. 2022-08-02 09:10:18 +02:00
Adrian Kuegel e031dea5be [mlir][Bazel] Update bazel build after 14d79afeae
Differential Revision: https://reviews.llvm.org/D130965
2022-08-02 09:03:27 +02:00
Adrian Kuegel 78ad3e4cb5 [mlir][Bazel] Remove reference to deleted header. 2022-08-02 08:34:48 +02:00
Stephan Herhut 0e5ac92ce2 [mlir][bazel] Fix bazel build files
This adds a missing dependency on builtin dialect td files.

Differential Revision: https://reviews.llvm.org/D130890
2022-08-01 12:03:43 +02:00
Guillaume Chatelet 49eb58063f [libc][NFC] Use STL case for utility
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion.

Differential Revision: https://reviews.llvm.org/D130771
2022-08-01 09:27:37 +00:00
Guillaume Chatelet 91eb0b6584 [libc][NFC] Use STL case for limits
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion.

Differential Revision: https://reviews.llvm.org/D130762
2022-08-01 09:18:25 +00:00
Guillaume Chatelet 3f3bbd7370 [libc][NFC] Use STL case for functional
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion.

Differential Revision: https://reviews.llvm.org/D130760
2022-08-01 09:10:59 +00:00
Guillaume Chatelet d3d498fbf6 Reland [libc][NFC] Use STL case for array
This is a reland of https://reviews.llvm.org/D130773
2022-08-01 08:47:27 +00:00
Guillaume Chatelet de00bd573e Revert "[libc][NFC] Use STL case for array"
This reverts commit 7add0e5fdc.
2022-08-01 08:44:52 +00:00
Guillaume Chatelet 7add0e5fdc [libc][NFC] Use STL case for array
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion.

Differential Revision: https://reviews.llvm.org/D130773
2022-08-01 08:43:05 +00:00
NAKAMURA Takumi a0943a2e19 [Bazel] Add JITLink/COFFOptions.td (llvmorg-16-init-398-g88181375a3db) 2022-08-01 07:07:13 +09:00
Tue Ly 2ff187fbc9 [libc] Implement cosf function that is correctly rounded to all rounding modes.
Implement cosf function that is correctly rounded to all rounding
modes.

Performance benchmark using perf tool from CORE-MATH project

(https://gitlab.inria.fr/core-math/core-math/-/tree/master) on Ryzen 1700:
Before this patch (not correctly rounded):
```
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf
CORE-MATH reciprocal throughput   : 19.043
System LIBC reciprocal throughput : 26.328
LIBC reciprocal throughput        : 30.955

$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf --latency
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency   : 49.995
System LIBC latency : 59.286
LIBC latency        : 60.174

```
After this patch (correctly rounded):
```
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput   : 19.072
System LIBC reciprocal throughput : 26.286
LIBC reciprocal throughput        : 13.631

$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf --latency
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency   : 49.872
System LIBC latency : 59.468
LIBC latency        : 56.119
```

Reviewed By: orex, zimmermann6

Differential Revision: https://reviews.llvm.org/D130644
2022-07-29 21:08:31 -04:00
Guillaume Chatelet f72261508a [libc][NFC] Use STL case for type_traits
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion. Starting with the type_traits header.

Differential Revision: https://reviews.llvm.org/D130727
2022-07-29 09:57:03 +00:00
Daniele Vettorel e7c004854d Add `llvm-dwarfutil` to Bazel targets
Adds support for building the `llvm-dwarfutil` tool with Bazel

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D130720
2022-07-28 19:53:37 +00:00
Christian Sigg f983bdbdae [MLIR] Fix bazel build after 7356404ace. 2022-07-28 08:14:18 +02:00