Commit Graph

425060 Commits

Author SHA1 Message Date
Javed Absar c7283c263c [mlir][NFC] Trivial : Fix typo
Reviewed By: JohnTitor

Differential Revision: https://reviews.llvm.org/D126601
2022-05-29 11:00:08 +01:00
Mark de Wever ebb6f3ce37 [libc++] Adds missing includes.
This fixes the broken Apple builds. This has been tested in D121530
(https://buildkite.com/llvm-project/libcxx-ci/builds/11113)
2022-05-29 11:11:32 +02:00
Purva-Chaudhari 5ff27fe1ff [clang-repl] Recover the lookup tables of the primary context.
Before this patch, there was re-declaration error if error was encountered in
the same line. The recovery support acted only if this type of error was
encountered in the first line of the program and not in subsequent lines.

For example:

```
clang-repl> int i=9;
clang-repl> int j=9; err;
input_line_3:1:5: error: redefinition of 'j'
int j = 9;
```

Differential revision: https://reviews.llvm.org/D123674
2022-05-29 04:59:40 +00:00
Yuki Okushi 41a054ef78
[clang] Remove `rm` script which is no longer necessary
8b4fa2c98e added this to remove left-over files on January.
Now we could assume they're cleaned up and this `rm` script is no longer necessary as FIXME states.

Differential Revision: https://reviews.llvm.org/D126597
2022-05-29 08:49:45 +09:00
Groverkss dac27da7b9 [MLIR][Presburger] Add applyDomain/Range to IntegerRelation
This patch adds support for applying a relation on domain/range of a relation.

Reviewed By: arjunp, ftynse

Differential Revision: https://reviews.llvm.org/D126339
2022-05-29 02:06:11 +05:30
Florian Hahn 6abce17fc2
[VPlan] Use Exiting-block instead of Exit-block terminology (NFC).
In LLVM's common loop terminology, an exit block is a block outside a
loop with a predecessor inside the loop. An exiting block is a block
inside the loop which branches to an exit block outside the loop.

This patch updates a few places where VPlan was using ExitBlock for a
block exiting a region. Those instances have been updated to use
ExitingBlock.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D126173
2022-05-28 21:16:05 +01:00
Jason Molenda 2f23abd6c6 Increase the default maximum stack walk
lldb will only backtrace a fixed number of stack frames, as a
last-ditch attempt to avoid a runaway looping backtrace.  It's
unusual that anyone ends up depending on this final safety net in
years. I picked the original number of 300000 was picked by seeing
how many stack frames I could make in a small recursive function
on Darwin systems before using the default stack space.  Checking
again today on a modern system, I can exceed this limit & lldb will
not show the original invocation of the recursing call.  Double the
old value to cover this larger maximum possible stack frame count,
as a default value.
(`target.process.thread.max-backtrace-depth`)
2022-05-28 13:12:57 -07:00
Emil Kieri f1983feaa1 [flang] Make extension explicit: exponent-letter matching kind-param
As an extension for REAL literals, we allow an exponent letter which
matches an explicit kind-param. The standard requires the exponent
to be 'E' if a kind-param is present. This patch
 - documents this extension in Extensions.md
 - enables a portability warning if it is used with -pedantic

The test case for this, kinds05.f90, needs D125804, which makes
test_errors.py test warnings as well, to actually test the warnings.
I include it already now to keep things together, it will do no harm
(I hope ...).

We also add WARNING-directives to the test kinds04.f90 in preparation
for D125804. As the exponent-letter 'Q' does not imply the same kind
on all platforms, the emitted warnings are platform-dependent.
Therefore, the test is duplicated into two variants which are run
conditionally.

Finally, we promote the portability warning for when the exponent letter
is neither 'E' nor matching the kind-param to a standard warning.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D126459
2022-05-28 22:05:52 +02:00
Daniel Hannon 50f2e49924
[clang][cmake] Fixed typo in hmaptool CMakeLists.txt
There was a typo in the CMakeLists.txt for hmap tool that installed it to the wrong directory

https://github.com/llvm/llvm-project/issues/55753

Reviewed By: keith

Differential Revision: https://reviews.llvm.org/D126598
2022-05-28 10:10:57 -07:00
Peter Klausler 0c190575eb [flang] Make generic resolution conform to 15.5.5.2 w/r/t host association
When two or more generic interfaces are available by declaration or
by USE association at different scoping levels, we need to search
the outer generic interfaces as well as the inner ones, but only after
the inner ones have failed to produce a specific procedure that matches
a given set of actual arguments.  This means that it is possible for
a specific procedure of a generic interface of an inner scope to override
a conflicting specific procedure of a generic interface of an outer
scope.

Also cope with forward references to derived types when a generic
interface is also in scope.

Fixes LLVM bug https://github.com/llvm/llvm-project/issues/55240 and
LLVM bug https://github.com/llvm/llvm-project/issues/55300.

Differential Revision: https://reviews.llvm.org/D126587
2022-05-28 09:33:53 -07:00
Peter Klausler 3142c761da [nfc][flang] Fix spelling errors and usage in an error message
Differential Revision: https://reviews.llvm.org/D126490
2022-05-28 09:33:10 -07:00
Yuki Okushi bc08a16d82
Remove `deplibs` keyword completely
D102763 removed the almost support of `deplibs` but it seems `kw_deplibs` was missed.
This patch removes it.

Differential Revision: https://reviews.llvm.org/D126527
2022-05-29 01:16:44 +09:00
Peter Klausler 73506256bf [flang] Avoid spurious warnings from reading module files
When processing the literal constants of the various kinds of
INTEGER that are too large by 1 (e.g., 2147483648_4) in expression
analysis, emit a portability warning rather than a fatal error if
the literal constant appears as the operand to a unary minus, since
the folded result will be in range.  And don't emit any warning if
the negated literal is coming from a module file -- f18 wrote the
module file and the warning would simply be confusing, especially to
the programmer that wrote (-2147483647_4-1) in the first place.

Further, emit portability warnings for the canonical expressions for
infinities and NaN (-1./0., 0./0., & 1./0.), but not when they appear
in a module file, for the same reason.  The Fortran language has no
syntax for these special values so we have to emit expressions that
fold to them.

Fixes LLVM bugs https://github.com/llvm/llvm-project/issues/55086 and
https://github.com/llvm/llvm-project/issues/55081.

Differential Revision: https://reviews.llvm.org/D126584
2022-05-28 08:07:54 -07:00
Yuki Okushi 0a2d2eed43
[docs] Update the label name for new contributors
The `beginner` label is deprecated
and the `good first issue` label is now preferred.

Differential Revision: https://reviews.llvm.org/D126526
2022-05-28 23:14:31 +09:00
Sam Clegg b86771a2f7 [libc++] Minor emscripten changes from downstream
Differential Revision: https://reviews.llvm.org/D126583
2022-05-28 06:44:27 -07:00
Peixin-Qiao 66073306d8 [flang][OpenMP] Fix pointer variables in atomic read/write
For pointer variables, using getSymbolAddress cannot get the coorect
address for atomic read/write operands. Use genExprAddr to fix it.

Reviewed By: shraiysh, NimishMishra

Differential Revision: https://reviews.llvm.org/D125793
2022-05-28 16:41:14 +08:00
Peixin-Qiao 65af17c7a0 [flang][OpenMP][OpenACC] Fix exit of a region
The stop statement is allowed in OpenMP/OpenACC block region.

Reviewed By: kiranchandramohan, shraiysh

Differential Revision: https://reviews.llvm.org/D126471
2022-05-28 16:34:26 +08:00
LLVM GN Syncbot 936e9bf4bd [gn build] Port 30c37fb89c 2022-05-28 08:16:52 +00:00
Nikolas Klauser 30c37fb89c [libc++] Granularize more of <type_traits>
Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D126244
2022-05-28 10:13:48 +02:00
Nikolas Klauser 34f73804ed [libc++] Remove unused __functional includes
Reviewed By: ldionne, #libc

Spies: arichardson, smeenai, libcxx-commits, arphaman

Differential Revision: https://reviews.llvm.org/D126098
2022-05-28 10:12:39 +02:00
Argyrios Kyrtzidis fad6e37995 [Lex] Fix crash during dependency scanning while skipping an unmatched `#if` 2022-05-27 23:59:30 -07:00
Yuki Okushi d3d3e2528e
[CompilerInstance] Fix weird condition on `createCodeCompletionConsumer`
Fixes llvm#53545

Differential Revision: https://reviews.llvm.org/D126524
2022-05-28 14:58:04 +09:00
Fangrui Song 3b4500014a [Driver] Replace err_invalid_branch_protection with err_drv_unsupported_option_argument
The convention is to use err_drv_unsupported_option_argument instead of adding a
new diagnostic for every option.
2022-05-27 22:28:39 -07:00
Fangrui Song 068b8af796 [ARM][AArch64] Change -mharden-sls= to use err_drv_unsupported_option_argument
Update the diagnostic in D81404: the convention is to use
err_drv_unsupported_option_argument instead of adding a new diagnostic for every
option.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D126511
2022-05-27 22:03:48 -07:00
Roland McGrath a27b9139ab [scudo] Clean up Zircon header file uses
Make fuchsia.h and fuchsia.cpp each include what they use.
2022-05-27 21:39:03 -07:00
Matthias Springer 2f0a634c5e [mlir][bufferization] Add extra filter mechanism to bufferizeOp
Differential Revision: https://reviews.llvm.org/D126569
2022-05-28 04:49:23 +02:00
Matthias Springer f470f8cbce [mlir][bufferize][NFC] Split analysis+bufferization of ModuleBufferization
Analysis and bufferization can now be run separately.

Differential Revision: https://reviews.llvm.org/D126572
2022-05-28 04:43:50 +02:00
Matthias Springer 3490aadf56 [mlir][bufferization][NFC] Remove post-analysis step infrastructure
Now that analysis and bufferization are better separated, post-analysis steps are no longer needed. Users can directly interleave analysis and bufferization as needed.

Differential Revision: https://reviews.llvm.org/D126571
2022-05-28 04:37:13 +02:00
Matthias Springer 1534177f8f [mlir][bufferization][NFC] Move OpFilter out of BufferizationOptions
Differential Revision: https://reviews.llvm.org/D126568
2022-05-28 01:47:39 +02:00
Joel E. Denny 4a36813669 [OpenACC][OpenMP] Document atomic-in-teams extension
That is, put D126323 in the status doc and explain its relationship to
OpenACC support.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D126547
2022-05-27 18:53:19 -04:00
Philip Reames 85b4470035 [RISCV] Allow PRE of vsetvli involving non-1 LMUL
This is a follow up to address a review comment from D124869. When deciding whether to PRE a vsetvli, we can allow non-LMUL1 vsetvlis.

Differential Revision: https://reviews.llvm.org/D126563
2022-05-27 15:49:41 -07:00
eopXD 6a84579243 [LSR][TTI][PowerPC][SystemZ][X86] Add const-ness to TTI::isLSRCostLess. NFC
Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D126350
2022-05-27 15:22:23 -07:00
NAKAMURA Takumi de20fb72ad [bazel] BLAKE3: Adopt aarch64 and x86_64.
FIXME: arm(32) may be applicable here. I haven't tested yet.

Differential Revision: https://reviews.llvm.org/D126543
2022-05-28 07:05:30 +09:00
Martin Storsjö 9191078707 [lldb] Fix cross compiling on macOS
When cross compiling, a separate nested cmake is spawned, for building
host code generation tools such as lldb-tblgen.

When cross compiling on macOS, the nested native build would trigger
the lldb check for libc++, if testing is enabled (which it is by default).
(Even if `LLDB_INCLUDE_TESTS=OFF` is set on the main build, it has to
be passed separately in `CROSS_TOOLCHAIN_FLAGS_NATIVE` to reach the
nested build.)

Skip this check when building the host tools when cross compiling, as
the user won't try to run tests in that nested build.

(Alternatively, we could consider disabling all the `*_INCLUDE_TESTS`
by default in the nested host tools build.)

Differential Revision: https://reviews.llvm.org/D126557
2022-05-28 00:53:25 +03:00
Craig Topper 542a83c362 [RISCV] Correct load/store alignments in sink-splat-operands.ll. NFC
These should be aligned to the natural alignment of the element.
Probably copy/paste mistake from the i32 tests.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D126567
2022-05-27 14:39:31 -07:00
wren romano 0fbe3f3f48 [mlir][sparse] Fixes C++98 warning
The semicolons were introduced in D126105 in order to correct clang-format, but I forgot this file must be compiled as C++98 rather than C++11.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D126561
2022-05-27 13:42:17 -07:00
Philip Reames d4905a7b20 [RISCV] Add a vsetvli PRE test involving non-1 LMUL 2022-05-27 13:16:05 -07:00
Craig Topper b09e54541a [RISCV] Use template version of SignExtend64 for constant extends. NFC
We were inconsistent about which one we used.
2022-05-27 13:11:15 -07:00
Tobias Ribizel 03a09079d6 [CMake] Make FindLibEdit.cmake more robust
FindLibEdit uses pkg-config to find the necessary flags, but this may break with cross-compilation,
because the PkgConfig module in CMake doesn't respect the SYSROOT specified in a toolchain file.
Instead of taking the parameters from pkg-config for granted, we check whether our compiler can
actually include and link against the library.

Fixes #55445
Fixes #55671

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D126450
2022-05-27 13:06:45 -07:00
Louis Dionne a7f9895cc1 [runtimes] Rename various libcpp-has-no-XYZ Lit features to just no-XYZ
Since those features are general properties of the environment, it makes
sense to use them from libc++abi too, and so the name libcpp-has-no-xxx
doesn't make sense.

Differential Revision: https://reviews.llvm.org/D126482
2022-05-27 15:24:45 -04:00
Nikolas Klauser eb1c50378e [libc++][NFC] Rename rand.dis to rand.dist
Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgrang, mstorsjo

Differential Revision: https://reviews.llvm.org/D126221
2022-05-27 21:22:20 +02:00
Craig Topper d0f65eaa85 [RISCV] Remove unused variables. NFC 2022-05-27 12:13:45 -07:00
Sam Clegg 0e8f4ce31d [lld][WebAssembly] Fix crash on undefined+weak function syms in LTO objects
Symbols from LTO objects don't contain Wasm signatures, but we need a
signature when we create undefined/stub functions for missing weakly
undefined symbols.

Luckily, after LTO, we know that symbols that are not referenced by a
regular object file must not be needed in the final output so there
is no need to generate undefined/stub function for them.

Differential Revision: https://reviews.llvm.org/D126554
2022-05-27 11:41:34 -07:00
Pengxuan Zheng 4f12a721f1 [llvm-lib] Ignore /LTCG option
"The /LTCG option to LIB specifies that the inputs from cl.exe include object
files generated by using the /GL compiler option."

Based on Microsoft's description
above (https://docs.microsoft.com/en-us/cpp/build/reference/running-lib?view=msvc-170),
there doesn't seem to be anything llvm-lib needs to do to support the flag.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D126000
2022-05-27 11:38:42 -07:00
Craig Topper aaad507546 [RISCV] Return false from isOffsetFoldingLegal instead of reversing the fold in lowering.
When lowering GlobalAddressNodes, we were removing a non-zero offset and
creating a separate ADD.

It already comes out of SelectionDAGBuilder with a separate ADD. The
ADD was being removed by DAGCombiner.

This patch disables the DAG combine so we don't have to reverse it.
Test changes all look to be instruction order changes. Probably due
to different DAG node ordering.

Differential Revision: https://reviews.llvm.org/D126558
2022-05-27 11:05:18 -07:00
Nicolai Hähnle 5df2893a9a AMDGPU: Add G_AMDGPU_MAD_64_32 instructions
These generic instructions are trivially selected to
V_MAD_[IU]64_[IU]32 instructions when run on the VALU.

When at least both factors are scalar, it is usually better to execute
some or all of the instruction on the SALU. To this end, we lower the
instruction to simpler instructions that are supported on the SALU
when applying the register bank mapping.

Differential Revision: https://reviews.llvm.org/D124843
2022-05-27 12:36:17 -05:00
Julian Lettner 8e724ad965 [TSan][Darwin] Deflake test
The asserted order of THREAD_DESTROY and end of main() is not
guaranteed:
```
 7: Hello from pthread
 8: THREAD_TERMINATE 0x7e8000104000, self: 0x7e8000104000, name: child thread
 9: Done.
10: THREAD_DESTROY 0x7e8000104000, self: 0x7e8000104000, name: child thread
```

Resulting in:
```
error: CHECK: expected string not found in input
// CHECK: Done.
```

Remove checking for "Done." (end of main()) to deflake this test.
Alternatively, we could use `CHECK-DAG`.

rdar://94036145
2022-05-27 10:19:56 -07:00
Louis Dionne 719bf2d9d9 [runtimes] Officially deprecate the legacy testing configuration system
Add a warning and tweak the release note to explain that the deprecation
targets libc++, libc++abi and libuwnind as well.

Also, as a fly-by, ensure that our CI runs the legacy testing configuration
for libc++, libc++abi and libunwind. This doesn't matter too much since
it's deprecated, but we might as well test it properly.

Differential Revision: https://reviews.llvm.org/D126478
2022-05-27 13:15:48 -04:00
Louis Dionne c358d98b99 [libc++] Add various missing _LIBCPP_HIDE_FROM_ABI
Those were spotted when a project unintentionally started exporting
these symbols from its ABI just by using the libc++ headers.

Differential Revision: https://reviews.llvm.org/D126496
2022-05-27 13:14:57 -04:00
Aart Bik a5d7e2a8ac [OpenMP][mlir] fix broken build
Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D126556
2022-05-27 10:06:01 -07:00