2087 Commits

Author SHA1 Message Date
Keith Smiley
34599266b2
[bazel] Port #90972 (#93996) 2024-05-31 10:43:15 -07:00
Keith Smiley
7caa812f27
[bazel] Port #92819 take 2 (#93995)
I missed this since it was still broken because of another patch
https://github.com/llvm/llvm-project/pull/93996
2024-05-31 10:42:53 -07:00
Keith Smiley
13b6284b93
[bazel] Port #92819 (#93992) 2024-05-31 10:36:05 -07:00
RoseZhang03
07bd439457
[libc] added quick_exit function (#93620)
- In /libc/src/__support/ OSUtil, changed quick_exit to just exit, and
put in namespace
LIBC_NAMESPACE::internal.
- In /libc/src/stdlib added quick_exit
- Added test files for quick_exit
2024-05-31 10:19:10 -07:00
Aaron Siddhartha Mondal
852aaf5407
Reapply "[Support] Remove terminfo dependency (#92865)" (#93889)
This reverts commit fe82a3da36196157c0caa1ef2505186782f750d1.

This broke LLDB on MacOS due to a missing symbol during linking.

The fix has been applied in c6c08eee37bada190bd1aa4593c88a5e2c8cdaac.

Original commit message:

The terminfo dependency introduces a significant nonhermeticity into the
build. It doesn't respect `--no-undefined-version` meaning that it's not
a dependency that can be built with Clang 17+. This forces maintainers
of source-based distributions to implement patches or ignore linker
errors.

Remove it to reduce the closure size and improve portability of
LLVM-based tools. Users can still use command line arguments to toggle
color support expliticly.

Fixes #75490
Closes #53294 #23355
2024-05-31 01:29:00 +02:00
Keith Smiley
031f08c0a5
[bazel] Port #93567 (#93877) 2024-05-30 13:52:25 -07:00
Keith Smiley
d471860f2d
[bazel] Port #92983 (#93874) 2024-05-30 13:35:03 -07:00
Christian Sigg
191e64ffa9 [lldb][bazel] Fix BUILD after 540a36ad7e31bfeb11e795047a42bb6e30bf9985. 2024-05-30 14:50:39 +02:00
Keith Smiley
472184db24
[bazel] Port #93595 (#93716) 2024-05-29 11:40:14 -07:00
Michael Buch
fe82a3da36 Revert "[Support] Remove terminfo dependency (#92865)"
This reverts commit 6bf450c7a60fa62c642e39836566da94bb9bbc91.

It breaks LLDB CI: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/4762/execution/node/97/log/

```
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Wdocumentation -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-version-min=14.1 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip -Wl,-no_warn_duplicate_libraries tools/lldb/unittests/Editline/CMakeFiles/EditlineTests.dir/EditlineTest.cpp.o -o tools/lldb/unittests/Editline/EditlineTests  lib/libLLVMSupport.a  lib/libllvm_gtest_main.a  lib/libllvm_gtest.a  lib/liblldbHost.a  lib/liblldbUtility.a  lib/libLLVMTestingSupport.a  /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libxml2.tbd  /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libedit.tbd  lib/liblldbHostMacOSXObjCXX.a  lib/liblldbUtility.a  -framework Foundation  -framework CoreFoundation  -framework CoreServices  -framework Security  lib/libLLVMObject.a  lib/libLLVMIRReader.a  lib/libLLVMBitReader.a  lib/libLLVMAsmParser.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMTextAPI.a  lib/libLLVMBinaryFormat.a  lib/libLLVMTargetParser.a  lib/libllvm_gtest.a  lib/libLLVMSupport.a  -lm  /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libz.tbd  /opt/homebrew/lib/libzstd.dylib  lib/libLLVMDemangle.a  -lpthread && cd /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/unittests/Editline && /opt/homebrew/Cellar/cmake/3.28.3/bin/cmake -E make_directory /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/unittests/Editline/./Inputs
ld: Undefined symbols:
  _setupterm, referenced from:
      lldb_private::Editline::Editline(char const*, __sFILE*, __sFILE*, __sFILE*, std::__1::recursive_mutex&) in liblldbHost.a[35](Editline.cpp.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
2024-05-29 16:20:42 +01:00
Christian Sigg
76e1a535fd [llvm][bazel] Fix llvm-config after 3613b2683107bd60fda6d9348623be0686f6d7e3. 2024-05-29 09:45:51 +02:00
lntue
4486fcba75
[libc] Add proxy header for float.h. (#93504)
This is the continuation of
https://github.com/llvm/llvm-project/pull/88674.

Fixes #88433, #90496.

---------

Co-authored-by: aniplcc <aniplccode@gmail.com>
2024-05-28 19:14:26 -04:00
Benjamin Kramer
bdd4e8b1c0 [bazel] Port 17ecd23f6932c87fcc8b2b8675762d50f3d53056 2024-05-28 15:03:40 +02:00
Adrian Kuegel
9b79acedd6 [mlir][Bazel] Followup to 57c10fa564af44a5b236bc642c540d715b04448c
It removed the dependency from the wrong target.
Also, we need to remove the header include to be able to remove the
dependency from VectorToSPIRV.
2024-05-28 11:36:26 +00:00
Angel Zhang
57c10fa564
[mlir][spirv] Add vector.interleave to spirv.VectorShuffle conversion (#93240)
- Add `vector.interleave` to `spirv.VectorShuffle` conversion
- Remove the `vector.interleave` to `vector.shuffle` conversion from
`populateVectorToSPIRVPatterns` and CMake/Bazel dependencies

---------

Co-authored-by: Jakub Kuderski <kubakuderski@gmail.com>
2024-05-27 19:44:57 -04:00
Benoit Jacob
855eef2abd
[bazel] Add missing dependency for llvm-tblgen (#93486) 2024-05-27 14:22:55 -04:00
Aaron Siddhartha Mondal
6bf450c7a6
[Support] Remove terminfo dependency (#92865)
The terminfo dependency introduces a significant nonhermeticity into the
build. It doesn't respect `--no-undefined-version` meaning that it's not
a dependency that can be built with Clang 17+. This forces maintainers
of source-based distributions to implement patches or ignore linker
errors.

Remove it to reduce the closure size and improve portability of
LLVM-based tools. Users can still use command line arguments to toggle
color support expliticly.

Fixes #75490
Closes #53294 #23355
2024-05-24 20:20:15 +02:00
Keith Smiley
41c057b078
[bazel] Add missing dep after #93008 (#93325)
This dep was removed in that change, but this library still needs it.
2024-05-24 10:38:51 -07:00
tyb0807
8178a3ad1b
[mlir] Replace MLIR_ENABLE_CUDA_CONVERSIONS with LLVM_HAS_NVPTX_TARGET (#93008)
LLVM_HAS_NVPTX_TARGET is automatically set depending on whether NVPTX
was enabled when building LLVM. Use this instead of manually defining
MLIR_ENABLE_CUDA_CONVERSIONS (whose name is a bit misleading btw).
2024-05-24 17:31:28 +02:00
Keith Smiley
fafc6271c6
[bazel] Port #92986 (#93248) 2024-05-23 15:09:12 -07:00
Keith Smiley
0da9e8ec44
[bazel] Port #92331 (#93232) 2024-05-23 12:43:07 -07:00
Mikhail Goncharov
bd46067abf [bazel] fix build for 7630379156ec08c9d7b1ea3c03c09e7dc89ef4ee 2024-05-22 17:06:06 +02:00
Mikhail Goncharov
a70ecfb267 [bazel] fix build for b00e0c167186d69e1e6bceda57c09b272bd6acfc 2024-05-22 17:01:57 +02:00
Mikhail Goncharov
1d4772f24d
[bazel] add bolt address translation header to Passes (#93014)
to avoid circular dependency introduced in
a9b67490b2baaa311100a64191792186ea5f2c1e
2024-05-22 16:44:35 +02:00
Christian Ulmann
b00e0c1671
[MLIR][Analysis] Consolidate topological sort utilities (#92563)
This PR attempts to consolidate the different topological sort utilities
into one place. It adds them to the analysis folder because the
`SliceAnalysis` uses some of these.

There are now two different sorting strategies: 
1. Sort only according to SSA use-def chains
2. Sort while taking regions into account. This requires a much more
elaborate traversal and cannot be applied on graph regions that easily.

This additionally reimplements the region aware topological sorting
because the previous implementation had an exponential space complexity.

I'm open to suggestions on how to combine this further or how to fuse
the test passes.
2024-05-22 08:48:10 +02:00
Jordan Rupprecht
2805e6faad
[llvm-driver] Add driver alias for c++filt (#92803)
Similar to 9d955a63c7b0d2d547a63d4074e03cd5ebd1f162, this allows the
driver to respond to `c++filt`.
2024-05-21 12:51:58 -05:00
Adrian Kuegel
312c132467 [mlir][Bazel] Adjust BUILD file for 33b7833891dcacf9e81e911ed59932fd55113fff 2024-05-21 05:40:40 +00:00
Jeremy Kun
1de1f775b5
[mlir] [openmp] fix bazel build (#92790)
Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-05-20 10:14:48 -07:00
Jeremy Kun
b80e0fbcfb
[mlir][polynomial] split attributes into its own tablegen (#92613)
Out of tree we have other dialects that use the ring attribute, but we
get compilation errors when generating ops while pulling in all the
Polynomial tablegen ops (there's no `-dialect` flag in `mlir-tblgen` for
op generation like there is for attributes and types).

This PR simply moves the attributes into its own file, so it can be
included separately, and this also requires moving the dialect
declaration into its own file.
2024-05-17 16:03:44 -07:00
Jeremy Kun
932bef2327
Poly canonicalization (#91410)
Adds simple canonicalization rules to the polynomial dialect. Mainly to
get the boilerplate incorporated before more substantial
canonicalization patterns are added.

---------

Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-05-17 10:18:26 -07:00
Keith Smiley
e5e5623615
[bazel] Port #91960 (#92458) 2024-05-16 14:33:39 -07:00
Oleg Shyshkov
53bdcee9d7 [mlir][bazel] Fix bazel build. 2024-05-16 11:37:55 +02:00
Keith Smiley
00179e92c1
[bazel] Add new dependencies (#92323)
This also fixes building ... on Linux. Seems like target_compatible_with
isn't enough but you also need a manual tag.
2024-05-15 15:23:29 -07:00
Fangrui Song
e1ed138a67 [bazel] Port #92199 2024-05-15 14:38:45 -07:00
Oleg Shyshkov
f89b1b8a68 [mlir][bazel] Fix bazel build. 2024-05-14 20:14:32 +02:00
quanwanandy
1355dcbb6e
Fix Bazel Build (#92139) 2024-05-14 19:07:26 +02:00
Dmitri Gribenko
344c73ee83 [libc][bazel] Updates for 292b300c5131e54b9977305bb4aca9a03e1b4fed 2024-05-14 19:04:40 +02:00
Fangrui Song
f608ac2617 [bazel] Actually port libc #91905 2024-05-14 03:54:24 +00:00
Fangrui Song
22cc4488c9 [bazel] Port libc #91905 2024-05-13 18:18:30 -07:00
Michael Jones
4c79d38f82
[libc] add errno_macro header to bazel build (#92044)
Patch #91150 added a proxy header for errno macros. This patch fixes the
bazel build since it needs to be added as a dependency.
2024-05-13 16:05:09 -07:00
Benoit Jacob
a1d43c14d8
[mlir][vector] Add Vector-dialect interleave-to-shuffle pattern, enable in VectorToSPIRV (#92012)
This is the second attempt at merging #91800, which bounced due to a
linker error apparently caused by an undeclared dependency.
`MLIRVectorToSPIRV` needed to depend on `MLIRVectorTransforms`. In fact
that was a preexisting issue already flagged by the tool in
https://discourse.llvm.org/t/ninja-can-now-check-for-missing-cmake-dependencies-on-generated-files/74344.

Context: https://github.com/iree-org/iree/issues/17346.

Test IREE integrate showing it's fixing the problem it's intended to
fix, i.e. it allows IREE to drop its local revert of
https://github.com/llvm/llvm-project/pull/89131:

https://github.com/iree-org/iree/pull/17359

This is added to VectorToSPIRV because SPIRV doesn't currently handle
`vector.interleave` (see motivating context above).

This is limited to 1D, non-scalable vectors.
2024-05-13 15:36:28 -04:00
Adrian Kuegel
ae2a18d6cb [mlir][Bazel] Adjust BUILD.bazel for eeafc9daa15d2d022bcdd456d4b8bafd23f5f121 2024-05-13 07:47:33 +00:00
Adrian Kuegel
5ca368501a [mlir][Bazel] Update BUILD file for 1337622a492f4e77604b09ac8ff97042e46d8d42 2024-05-13 06:44:37 +00:00
Keith Smiley
666c686d59
[bazel] Codesign debugserver on macOS (#91789)
This tool doesn't work unless it's signed with the entitlements used
here. We should probably consider using the
macos_command_line_application rule from rules_apple which manages this
more flexibly for us, but for now this works. This uses apple_genrule as
opposed to genrule since the former encodes the Xcode environment info
into the action so it is correctly invalidated if that changes.
2024-05-10 14:20:09 -07:00
Keith Smiley
99f45b4c5b
[bazel] Fix new CodeGen dep (#91654)
```
.../AMDGPUUtilsAndDesc/AMDGPUCallLowering.h:17:10: fatal error: 'llvm/CodeGen/GlobalISel/CallLowering.h' file not found
```

https://buildkite.com/llvm-project/upstream-bazel/builds/97166
2024-05-09 14:03:08 -07:00
Keith Smiley
d36b4abb51
[bazel] Rework liblldb (#91549)
Previously we were linking liblldb as a shared library, but also linking
the contents into the lldb binary. This is invalid and results in subtle
runtime issues because of duplicate constants, like the global plugin
registry. This now links the dylib to lldb directly. This requires we
switch to cc_binary instead because cc_shared_library expects your
library to export all symbols in your transitive dependency tree, where
we only want to export lldb symbols.
2024-05-09 13:14:03 -07:00
lntue
e1f279e92d
[libc] Use __builtin_fma(f) by default if LIBC_TARGET_CPU_HAS_FMA is defined. (#91535) 2024-05-09 13:10:43 -04:00
Benjamin Kramer
3a83162168 [bazel] Add missing dependency for 6ed8434edc5934210a38be99f33b6baed83df85c 2024-05-08 16:38:38 +02:00
Benjamin Kramer
d4fef93724 [bazel][libc] Split up mutex libraries like ab3a9e724d87a4272782f76b90fb0872a6a86939 did 2024-05-08 11:57:19 +02:00
Keith Smiley
cf58c58e09
[bazel] Move HostMacOSXPrivateHeaders to macOS only dep (#91354) 2024-05-07 11:19:52 -07:00