Commit Graph

411965 Commits

Author SHA1 Message Date
Alex Fan e796eaf2af [RISCV][RFC] add MC support for zbkc subextension
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D117874
2022-01-22 10:23:01 +08:00
Dave Lee b95150418f [lldb] Allow aliases to aliases of raw input commands
Allow users to create aliases for aliases to raw input commands. That probably
sounds convoluted, so here's an example:

```
command alias some-setup env SOMEVAR=SOMEVALUE
```

This an alias based on `env`, which itself is an alias for `_regex-env`.
`_regex-env` is a `command regex` command, which takes raw input.

The above `some-setup` alias fails with:

```
error: Unable to create requested alias.
```

This change allows such aliases to be created. lldb already supports aliases to
aliases for parsed commands.

Differential Revision: https://reviews.llvm.org/D117259
2022-01-21 17:57:34 -08:00
Peter Klausler 3726626a26 [flang] Fix crash from USE-associated defined I/O subprograms
User-defined derived type I/O implementation subroutines and
generic interfaces may be USE-associated, but the code that builds
the type description table wasn't allowing for that possibility.
Add a call to GetUltimate() to cope.

Differential Revision: https://reviews.llvm.org/D117902
2022-01-21 17:49:09 -08:00
Julian Lettner db07e082ab [TSan] Omit vfork interceptor iOS simulator runtime
`_vfork` moved from libsystem_kernel.dylib to libsystem_c.dylib as part
of the below changes.  The iOS simulator does not actually have
libsystem_kernel.dylib of its own, it only has the host Mac's.  The
umbrella-nature of Libsystem makes this movement transparent to
everyone; except the simulator! So when we "back deploy", i.e., use the
current version of TSan with an older simulator runtime then this symbol
is now missing, when we run on the latest OS (but an older simulator
runtime).

Note we use `SANITIZER_IOS` because usage of vfork is forbidden on iOS
and the API is completely unavailable on watchOS and tvOS, even if this
problem is specific to the iOS simulator.

Caused by:
rdar://74818691 (Shim vfork() to fork syscall on iOS)
rdar://76762076 (Shim vfork() to fork syscall on macOS)

Radar-Id: rdar://8634734
2022-01-21 17:36:12 -08:00
Peter Klausler 04eb93b1d5 [flang] Fix repeated "DT" editing
User-defined derived type editing in formatted I/O wasn't
working with repeat counts; e.g., "2DT(10)".  The solution required
some code to be moved from GetNextDataEdit() to CueUpNextDataEdit() so
that a stack entry for a nonparenthesized repeated data edit
descriptor would work correctly -- all other data edit descriptors
are capable of dealing with repetition in their callees, so the bug
hadn't been exposed before.

Debugging this problem led to some improvements in error messages
for bad format strings, and those changes have been retained; also,
a dead member function was discovered and expunged.

Differential Revision: https://reviews.llvm.org/D117904
2022-01-21 17:22:51 -08:00
Fangrui Song e6cdef187e [XRay][test] Clean up llc RUN lines 2022-01-21 17:00:03 -08:00
Petr Hosek 9cddfe3085 [CMake] Passthrough OSX CMake options to builtins and runtimes
When using the default target, there's no other way to pass these
into the builtins and runtimes subbuilds.

Differential Revision: https://reviews.llvm.org/D116976
2022-01-21 16:54:22 -08:00
Joe Loser 4f547ee8b8
[libc++][test] Add const and reference tests for enable_view. NFC.
As discussed in https://reviews.llvm.org/D117714, there is missing test coverage
for the behavior of `enable_view` when given a const or reference qualified
type. Add such tests showing the current behavior.

Differential Revision: https://reviews.llvm.org/D117918
2022-01-21 19:46:45 -05:00
Chris Bieneman 13fa17db3a [split-file] Respect input file's line endings
This change adds support for split-file to respect the line ending style
of the input file. This enables split-file to work as expected on
Windows with input files containing CRLF line endings.

The test files added along with this change mirror the existing basic
tests, but are forced to contain CRLF line endings via git attributes.
This will result in the tests always containing CRLF line endings when
checked out regardless of the user's OS.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D117897
2022-01-21 18:45:03 -06:00
not-jenni 08574ce4d6 [mlir][tosa] Add clamp + clamp as single clamp canonicalization
When 2 clamp ops are in a row, they can be canonicalized into a single clamp
that uses the most constrained range

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D117934
2022-01-21 16:24:43 -08:00
Mitch Phillips 1613f8b8d7 NFC (build fix): Add header for llvm::errs().
Looks like e9211e0393 unfortunately broke the sanitizer build bots,
because those bots compile the symbolizer with DLLVM_ENABLE_THREADS=Off.
Likely, before the patch, this header was transitively included.
2022-01-21 16:22:29 -08:00
John Ericson 10d0d8c0c1 [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs
I am breaking apart D99484 so the cause of build failures is easier to
understand.

Differential Revision: https://reviews.llvm.org/D117419
2022-01-21 23:58:08 +00:00
Aart Bik efa15f4178 [mlir][sparse] add ability for sparse tensor output
Rationale:
Although file I/O is a bit alien to MLIR itself, we provide two convenient ways
for sparse tensor I/O. The input part was already there (behind the swiss army
knife sparse_tensor.new). Now we have a sparse_tensor.out to write out data. As
before, the ops are kept vague and may change in the future. For now this
allows us to compare TACO vs MLIR very easily.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D117850
2022-01-21 15:43:29 -08:00
Dave Lee 58ee14e29e [lldb] Fix timer logging inverted quiet condition
The logic of `g_quiet` was inverted in D26243. This corrects the issue.

Without this, running `log timers enable` produces a high volume of incremental
timer output.

Differential Revision: https://reviews.llvm.org/D117837
2022-01-21 15:34:07 -08:00
Zequan Wu 6ba1fb0421 [llvm-pdbutil] Fix gaps ouput. 2022-01-21 15:25:54 -08:00
Bixia Zheng ba093fe58b Fix a commit.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D117932
2022-01-21 15:18:28 -08:00
Bixia Zheng b796709a62 Only run MLIR PyTACO tests when python bindings are enabled.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D117930
2022-01-21 15:05:29 -08:00
Sam McCall 653b007dc1
[CodeComplete] fix nullptr crash in 612f5ed882 2022-01-21 23:18:23 +01:00
Arthur Eubanks 6df05697ca [gn build] Set HAVE_MALLINFO2=1
I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

  ../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
    mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
2022-01-21 14:02:42 -08:00
Dávid Bolvanský 705d8c49f9 [x86] regenerate smul-with-overflow.ll; add test which failed with llvm 13 and lower (NFC) 2022-01-21 23:00:17 +01:00
Arthur Eubanks e39c262979 Revert "[gn build] Set HAVE_MALLINFO2=1"
This reverts commit 9f4cc5a6bb.

Breaks http://45.33.8.238/macm1/26108/step_4.txt.
2022-01-21 13:53:03 -08:00
Shubham Sandeep Rastogi 6103b2d45b Revert "Emit swift5 reflection section data in dsym bundle generated by dsymutil in the Dwarf section."
This reverts commit d84d1135d8. to investigate buildbot failures
2022-01-21 13:45:51 -08:00
Arthur Eubanks 9f4cc5a6bb [gn build] Set HAVE_MALLINFO2=1
I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
  mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
2022-01-21 13:38:27 -08:00
Shubham Sandeep Rastogi d84d1135d8 Emit swift5 reflection section data in dsym bundle generated by dsymutil in the Dwarf section.
Add support for Swift reflection metadata to dsymutil.

This patch adds support for copying Swift reflection metadata (__swift5_.* sections) from .o files to into the symbol-rich binary in the output .dSYM. The functionality is automatically enabled only if a .o file has reflection metadata sections and the binary doesn't. When copying dsymutil moves the section from the __TEXT segment to the __DWARF segment.

rdar://76973336

https://reviews.llvm.org/D115007
2022-01-21 13:22:40 -08:00
Muiez Ahmed 4f8ea3c84f [SystemZ][z/OS][NFC] Remove extra symbol 2022-01-21 16:18:46 -05:00
Craig Topper 0379459fc5 [RISCV] Strengthen a SDTypeProfile. Fix formatting. 2022-01-21 13:01:53 -08:00
Alex Brachet cd4e600f5f [Sema] Warn about printf %n on Android and Fuchsia
The `printf` specifier `%n` is not supported on Android's libc and will soon be removed from Fuchsia's

Reviewed By: enh

Differential Revision: https://reviews.llvm.org/D117611
2022-01-21 21:00:39 +00:00
Daniel Thornburgh 0d9cc69954 [Support] Update missed tests with lazy caching behavior.
Fixes test failures created by https://reviews.llvm.org/D117589.

Reviewed By: zhuhan0

Differential Revision: https://reviews.llvm.org/D117915
2022-01-21 20:52:27 +00:00
Rob Suderman 2f9f9afa4e [mlir] Add polynomial approximation for atan and atan2
Implement a taylor series approximation for atan and add an atan2 lowering
that uses atan's appromation. This includes tests for edge cases and tests
for each quadrant.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D115682
2022-01-21 12:22:58 -08:00
Amir Ayupov f8c7fb499b [BOLT][NFC] Reduce includes with include-what-you-use
Summary: Removed redundant includes with IWYU

Test Plan: ninja bolt

Reviewers: maksfb

FBD32043568
2022-01-21 12:05:47 -08:00
Amir Ayupov 5a654b0113 [BOLT] Make ICP target selection (more) deterministic
Summary: Break ties by selecting targets with lower addresses.

Reviewers: maksfb

FBD33677001
2022-01-21 12:03:43 -08:00
Amir Ayupov f18fcdabda [BOLT][NFC] Expand auto types pt.2
Summary: Expand autos where it may lead to differences in the BOLT binary.

Test Plan: NFC

Reviewers: maksfb

Reviewed By: maks

FBD27673231
2022-01-21 12:02:57 -08:00
David Green cb8b94f6ef [AArch64] Add extra tests useful in testing hadd. NFC 2022-01-21 20:01:06 +00:00
wren romano 4d0a18d06e [mlir][sparse] Adding assertions for overhead storage types
Fixes https://bugs.llvm.org/show_bug.cgi?id=52314 aka https://github.com/llvm/llvm-project/issues/51656

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D117597
2022-01-21 11:56:52 -08:00
Mark de Wever d6e2c95d22 [libc++] Use addressof in unordered_map.
This addresses the usage of `operator&` in `<unordered_map>`.

(Note there are still more headers with the same issue.)

Reviewed By: #libc, Quuxplusone, ldionne

Differential Revision: https://reviews.llvm.org/D117393
2022-01-21 20:43:45 +01:00
Craig Topper 48132bb1e4 [RISCV] Simplify interface to combineMUL_VLToVWMUL. NFC
Instead of passing the both the SDNode* and 2 of the operands
in two different orders, just pass the SDNode * and a bool to
indicate which operand order to test.

While there rename to combineMUL_VLToVWMUL_VL.
2022-01-21 11:43:06 -08:00
Valentin Clement 3c90ae5d0b
Revert "[flang] Update tco tool pipline and add translation to LLVM IR"
This reverts commit 68db0e25df.
2022-01-21 20:34:17 +01: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
Lei Zhang 4710750854 [mlir][spirv] Support size-1 vector inserts during conversion
Differential Revision: https://reviews.llvm.org/D115517
2022-01-21 13:56:26 -05:00
Craig Topper 11754a4dbb [RISCV] Use RVBUnary in more places to simplify some tablegen declarations. NFCI 2022-01-21 10:55:35 -08:00
Florian Mayer 754d6af7c3 [NFC] Improve code reuse.
Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D116711
2022-01-21 10:50:54 -08:00
eopXD e6ceec9c1d [Clang][RISCV] Restrict rvv builtins with zve macros
The `zve` extension specifies the maximum ELEN for both integer and floating
point mode - defined by macro `__riscv_v_elen` and `__riscv_v_elen_fp`.
This commit restricts the functions in riscv_vector.h by the zve defined
macro-s.

Change enum `RISCVExtension` to `RISCVPredefinedMacro` since now it
contains not only extensions. Also added type alignment to it.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D112986
2022-01-21 10:39:16 -08:00
John Paul Adrian Glaubitz 5061eb6b01 [Sparc] Don't define __sparcv9 and __sparcv9__ when targeting V8+
Currently, clang defines the three macros __sparcv9, __sparcv9__
and __sparc_v9__ when targeting the V8+ baseline, i.e. using the
V9 instruction set on a 32-bit target.

Since neither gcc nor SolarisStudio define __sparcv9 and __sparcv9__
when targeting V8+, some existing code such as the glibc breaks when
defining either of these two macros on a 32-bit target as they are
used to detect a 64-bit target. Update the tests accordingly.

Fixes PR49562.

Reviewed By: jrtc27, MaskRay, hvdijk

Differential Revision: https://reviews.llvm.org/D98574
2022-01-21 09:57:17 -08:00
Petr Hosek 10e5c513b5 Revert "[cmake] Duplicate `{llvm,compiler_rt}_check_linker_flag` for runtime libs and llvm"
This reverts commit 4af11272f5.
2022-01-21 09:53:14 -08:00
Valentin Clement 26cbc43019
[flang] Remove target and require shell
Fix failure from 68db0e25df on
arm buildbot.
2022-01-21 18:31:42 +01:00
David Tenty 5659638418 Revert "[compiler-rt][cmake] Use HandleOutOfTreeLLVM like libcxx and friends"
This reverts commit 8c9f62ea90, which is causing build failures on
the bots because it inadvertently changes the output directory of the compiler-rt libs when
built as a runtime.

Differential Revision: https://reviews.llvm.org/D117815
2022-01-21 12:22:17 -05:00
Marek Kurdej 23a7bb541d [clang-format] Fix comment in spaceRequiredBefore. NFC. 2022-01-21 18:17:55 +01:00
Mark de Wever e4a556268e Revert "[libc++] Use addressof in unordered_map."
This reverts commit cab9616938.

This breaks the CI.
2022-01-21 17:59:07 +01:00
Bixia Zheng b7fd91c84b Upstream MLIR PyTACO implementation.
Add TACO tests to test/Integration/Dialect/SparseTensor/taco. Add the MLIR
PyTACO implementation as tools under the directory.

Reviewed By: aartbik, mehdi_amini

Differential Revision: https://reviews.llvm.org/D117260
2022-01-21 08:38:36 -08:00
Mark de Wever cab9616938 [libc++] Use addressof in unordered_map.
This addresses the usage of `operator&` in `<unordered_map>`.

(Note there are still more headers with the same issue.)

Reviewed By: #libc, Quuxplusone, ldionne

Differential Revision: https://reviews.llvm.org/D117393
2022-01-21 17:34:29 +01:00