Commit Graph

396995 Commits

Author SHA1 Message Date
Kent Ross 81507bcf6b [libc++] [doc] Add issue tracking for spaceship operator<=> implementation
Add issue tracking and assignment for the implementation of P1614R2: The Mothership has Landed.

Reviewed By: cjdb, #libc, Mordante, Quuxplusone

Differential Revision: https://reviews.llvm.org/D107877
2021-08-19 23:13:44 +00:00
Kent Ross 7e325d4c0c [libc++][NFC] Remove unused include in <compare>.
`<type_traits>` was included in the first iteration of `<compare>` when
it was created as a monolithic header, then never removed. Removing it
now is a beneficial no-op since it is not guaranteed by the standard
and is already included by all of its subheaders.

Reviewed By: cjdb, #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D107801
2021-08-19 23:13:44 +00:00
Thomas Lively be6c49e743 [WebAssembly] Add explicit casts to silence -Wc++11-narrowing 2021-08-19 16:00:07 -07:00
Yonghong Song c1169b8bd3 Revert "[DebugInfo] generate btf_tag annotations for DIComposite types"
This reverts commit 2fded193e7.

Builtbot reports some test failures. Revert now so I can take time
to fix the issues.
2021-08-19 15:54:38 -07:00
Yonghong Song 2fded193e7 [DebugInfo] generate btf_tag annotations for DIComposite types
Clang patch D106614 added attribute btf_tag support. This patch
generates btf_tag annotations for DIComposite types.
A field "annotations" is introduced to DIComposite, and the
annotations are represented as an DINodeArray, similar to
DIComposite elements. The following example illustrates
how annotations are encoded in IR:
  distinct !DICompositeType(..., annotations: !10)
  !10 = !{!11, !12}
  !11 = !{!"btf_tag", !"a"}
  !12 = !{!"btf_tag", !"b"}
Each btf_tag annotation is represented as a 2D array of
meta strings. Each record may have more than one
btf_tag annotations, as in the above example.

Differential Revision: https://reviews.llvm.org/D106615
2021-08-19 15:37:44 -07:00
Thomas Lively fd0557dbf1 [WebAssembly] More convert_low and promote_low codegen
The convert_low and promote_low instructions can widen the lower two lanes of a
four-lane vector, but we were previously scalarizing patterns that widened lanes
besides the low two lanes. The commit adds a shuffle to move the widened lanes
into the low lane positions so the convert_low and promote_low instructions can
be used instead of scalarizing.

Depends on D108266.

Differential Revision: https://reviews.llvm.org/D108341
2021-08-19 15:37:12 -07:00
Thomas Lively b311a040ef [WebAssembly] Pattern match SIMD convert_low and promote_low during ISel
Since the simplest DAG patterns for convert_low and promote_low instructions
involved v2i32, v2f32, v4i64, and v4f64 types, which are not legal in the
WebAssembly backend and would be eliminated by type legalization, we were
previously matching those patterns in a DAG combine before the type legalization
stage. However in cases where the vectors were wider than 128 bits, the patterns
we matched were not created until the type legalization stage when the wide
vectors were split up. Type legalization would continue to eliminate the illegal
types we were matching as well, so the code ended up scalarized.

To make the ISel for these instructions more robust, match the scalarized
patterns rather than the patterns containing illegal types. Add tests with
double-wide vectors to show that this works as intended.

Fixes PR51098.
Depends on D107502.

Differential Revision: https://reviews.llvm.org/D108266
2021-08-19 15:24:28 -07:00
Akira Hatanaka 898dc4590c Refactor inlineRetainOrClaimRVCalls. NFC
This is in preparation for committing https://reviews.llvm.org/D103000.
2021-08-19 14:55:45 -07:00
Rumeet Dhindsa d9c5613e85 Update logic to close inherited file descriptors.
This patch adds the support to close all inherited fds into the child
process by iterating over /proc/self/fd entries.

Differential Revision: https://reviews.llvm.org/D105732
2021-08-19 14:40:43 -07:00
Arthur Eubanks 7c8206cd2a [NFC] Cleanup AttributeList::getStackAlignment()
So that we don't use a confusing index.
2021-08-19 14:21:40 -07:00
Alexandre Rames cd28003336 [Support] Update `MD5` to follow other hashes.
Introduce `StringRef final()` and `StringRef result()`.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D107781
2021-08-19 14:13:14 -07:00
Arthur Eubanks 44a3241f10 [NFC] Replace some attribute methods that use confusing indexes 2021-08-19 14:10:26 -07:00
Alexandre Rames 10a126325d [NFC][Support] Move `MD5` members in `InternalState`.
This prepares an update to follow other hashes.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D108388
2021-08-19 14:04:14 -07:00
Morten Borup Petersen 6c1436a9b0 [MLIR][SCF] Parenthesize multiple return types in scf.execute_region asm op
Previously, ExecuteRegionOps with multiple return values would fail a round-trip test due to missing parenthesis around the types.

Differential Revision: https://reviews.llvm.org/D108402
2021-08-19 21:31:51 +01:00
Florian Mayer 73323c6eaa [hwasan] re-enable stack safety by default.
The failed assertion was fixed in D108337.

Reviewed By: vitalybuka, eugenis

Differential Revision: https://reviews.llvm.org/D108381
2021-08-19 21:11:24 +01:00
Jennifer Yu c274b19866 Add implicit map for a list item appears in a reduction clause.
A new rule is added in 5.0:
If a list item appears in a reduction, lastprivate or linear clause
on a combined target construct then it is treated as if it also appears
in a map clause with a map-type of tofrom.

Currently map clauses for all capture variables are added implicitly.
But missing for list item of expression for array elements or array
sections.

The change is to add implicit map clause for array of elements used in
reduction clause. Skip adding map clause if the expression is not
mappable.
Noted: For linear and lastprivate, since only variable name is
accepted, the map has been added though capture variables.

To do so:
During the mappable checking, if error, ignore diagnose and skip
adding implicit map clause.

The changes:
1> Add code to generate implicit map in ActOnOpenMPExecutableDirective,
   for omp 5.0 and up.
2> Add extra default parameter NoDiagnose in ActOnOpenMPMapClause:
Use that to skip error as well as skip adding implicit map during the
mappable checking.

Note: there are only tow places need to be check for NoDiagnose. Rest
of them either the check is for < omp 5.0 or the error already generated for
reduction clause.

Differential Revision: https://reviews.llvm.org/D108132
2021-08-19 12:53:47 -07:00
Jon Chesterfield ad0f6e1d98 [openmp] Disable the tests that block CI for amdgpu and host offloading. 2021-08-19 20:43:30 +01:00
Adrian Prantl 1e586bcc3e Move function definition out-of-line to fix the modularized build (NFC) 2021-08-19 12:26:23 -07:00
Thomas Lively b69374ca58 [WebAssembly] Legalize vector types by widening
The default legalization of unsupported vector types is to promote the integers
in each lane, which leads to extra sign or zero extending and masking when
moving data into and out of vectors. Switch our preferred type legalization from
the default to vector widening, which keeps the data in the low lanes of the
vector rather than in the low bits of each lane. The unused high lanes can be
ignored.

Half-wide vectors are now loaded from memory into the low 64 bits of the v128
rather than spread out among the lanes. As a result, v128.load64_splat is a much
more common operation, so add new patterns to support it.

Differential Revision: https://reviews.llvm.org/D107502
2021-08-19 12:07:33 -07:00
Brian Cain 68ab571e22 [sanitizer] Fix for CMAKE_CXX_FLAGS update
With unquoted ${CMAKE_CXX_FLAGS}, the REGEX fails when it's empty:

```CMake Error at lib/scudo/standalone/CMakeLists.txt:14 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.```
2021-08-19 12:05:55 -07:00
Siva Chandra Reddy aeee014428 [libc][Obvious] Fix llvm_libc_ext.td. 2021-08-19 18:54:43 +00:00
MaheshRavishankar 16ffb283c5 Revert "[mlir][Linalg] Allow all build methods of Structured ops to specify additional attributes."
This reverts commit 95ddc8341a.

Differential Revision: https://reviews.llvm.org/D108396
2021-08-19 11:53:41 -07:00
Omar Emara 28a76049c6 [LLDB][GUI] Handle return key for compound fields
This patch handles the return key for compound fields like lists and
mapping fields. The return key, if not handled by the field will select
the next primary element, skipping secondary elements like remove
buttons and the like.

Differential Revision: https://reviews.llvm.org/D108331
2021-08-19 11:46:30 -07:00
Philip Reames 17b9cb1817 [runtimeunroll] Support multiple exits to latch exit w/prolog loop
This patch extends the runtime unrolling infrastructure to support unrolling a loop with multiple exiting blocks branching to the same exit block used by the latch. It intentionally does not include a cost model change to enable this functionality unless appropriate force flags are used.

This is the prolog companion to D107381. Since this was LGTMed, a problem with DT updating was reported against that patch.  I roled in the analogous fix here as it seemed obvious, and not worth re-review.

As an aside, our prolog form leaves a lot of potential value on the floor when there is an invariant load or invariant condition in the loop being runtime unrolled. We should probably consider a "required prolog" heuristic.  (Alternatively, maybe we should be peeling these cases more aggressively?)

Differential Revision: https://reviews.llvm.org/D108262
2021-08-19 11:43:52 -07:00
Stanislav Mekhanoshin 8d7d89b081 [AMDGPU] Add alias.scope metadata to lowered LDS struct
Alias analysis is unable to disambiguate accesses to the structure
fields without it unlike distinct variables. As a result we cannot
combine ds_read and ds_write operations in a case of any store in
between which always considered clobbering.

Differential Revision: https://reviews.llvm.org/D108315
2021-08-19 11:40:30 -07:00
Nikita Popov 8cf5b69f69 [GuardWidening] Preserve MemorySSA
As reported on https://bugs.llvm.org/show_bug.cgi?id=51020, the
guard widening pass doesn't preserve MemorySSA, so it can no
longer be scheduled in the same loop pass manager as LICM. However,
the loop-schedule.ll test indicates that this is supposed to work.

Fix this by preserving MemorySSA if available, as this seems to be
trivial in this case (we only need to drop the memory access for
the removed guards).

Differential Revision: https://reviews.llvm.org/D108386
2021-08-19 20:23:17 +02:00
MaheshRavishankar 95ddc8341a [mlir][Linalg] Allow all build methods of Structured ops to specify additional attributes.
Differential Revision: https://reviews.llvm.org/D108338
2021-08-19 11:14:35 -07:00
Alex Langford 4947f6d8bc [lldb][NFC] Remove unused header include 2021-08-19 11:06:56 -07:00
Philip Reames 447256f22b [runtimeunroll] Fix reported DT verification error after 94d0914
In 94d0914, I added support for unrolling of multiple exit loops which have multiple exits reaching the latch.  Per reports on the review post commit, I'd missed updating the domtree for one case.  This fix addresses that ommission.

There's no new test as this is covered by existing tests with expensive verification turned on.
2021-08-19 11:06:17 -07:00
Michael Jones bad3168b99 [libc] add atoi, atol, and atoll
This is based on the work done to add strtoll and the other strto
functions. The atoi functions also were added to stdc and
entrypoints.txt.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D108330
2021-08-19 18:02:51 +00:00
Louis Dionne 475f831b17 [libc++][NFCI] Remove unnecessary exception-throwing base classes
__split_buffer_common was entirely unused, and __deque_base_common
was unused except for two calls to __throw_out_of_range(), which have
been inlined.

The usual intent of the __xxx_base_common base classes is to localize
where the exception-throwing code is instantiated, however that wasn't
the case here because we never explicitly instantiated those base classes
in the shared library, unlike what we do for basic_string and vector.

Differential Revision: https://reviews.llvm.org/D108384
2021-08-19 13:59:57 -04:00
Simon Pilgrim 5fa6039a5f [SLP][X86] Add llvm.isnan intrinsic test coverage
We still need to tag the llvm.isnan.? intrinsic as vectorizable
2021-08-19 18:56:23 +01:00
Simon Pilgrim 26ed14f413 [SLP][X86] Regenerate intrinsic.ll test checks 2021-08-19 18:56:22 +01:00
Guillaume Chatelet c8f79892af [libc] Add a trivial implementation for bcmp
Differential Revision: https://reviews.llvm.org/D108225
2021-08-19 17:55:16 +00:00
Jon Chesterfield 6c75ce1b8b [libomptarget][nfc] Move lanemask_t type into target_impl.h 2021-08-19 18:50:03 +01:00
Tim Northover edab411ee6 AArch64: copy all parts of the mem operand across when combining a store
In particular we were dropping volatility, which can lead to unwanted
transformations.
2021-08-19 18:26:39 +01:00
Simon Pilgrim 72ebcd3198 [CostModel][X86] Add isnan half/float/double costs tests 2021-08-19 18:07:06 +01:00
Chang-Sun Lin, Jr 9cae598f8b
[InstCombine] Avoid folding GEPs across loop boundaries
Folding a GEP from outside to inside a loop will materialize an add where there wasn't an equivalent operation before. Check the containing loops before making this fold.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D107935
2021-08-19 20:03:44 +03:00
Chang-Sun Lin, Jr 0f0905605e
[NFC][InstCombine] Add test for one-use one-index geps in different loops 2021-08-19 20:03:44 +03:00
Arthur Eubanks 33d44b762e [OpaquePtr][Inline] Use byval type instead of pointee type
Reviewed By: #opaque-pointers, dblaikie

Differential Revision: https://reviews.llvm.org/D105711
2021-08-19 09:56:08 -07:00
Owen Anderson 06a4c85890 Use v16i8 rather than v2i64 as the VT for memset expansion on AArch64.
This allows the instruction selector to realize that it can directly
broadcast the low byte of the memset value, rather than replicating
it to a 64-bit GPR before broadcasting.

This fixes PR50985.

Differential Revision: https://reviews.llvm.org/D108354
2021-08-19 16:54:07 +00:00
Simon Pilgrim 94e1442d78 Fix unknown parameter Wdocumentation warnings. NFC. 2021-08-19 17:49:32 +01:00
Yi Kong ca6d5813d1 [clang] Do not warn unused -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
Android enables zero initialisation globally by default, but also allows
subprojects to override with different option. Clang complains the above
flag being unused in this case.

Instead of adding a 75 char long -no-* flag, don't warn unused argument
for this flag.

Differential Revision: https://reviews.llvm.org/D108278
2021-08-20 00:37:01 +08:00
Augie Fackler e59c88294b MemoryBuiltins: trailing , on collection literal
This was probably bugging more than is reasonable, but it makes merging
changes in this file slightly less annoying to have the trailing comma
here. I only noticed this because Rust is currently carrying a patch to
this file and it kept making life a little difficult.
2021-08-19 17:59:23 +02:00
Thomas Preud'homme 9d476f0af9 Fix CodeGen/X86/fsafdo_test2.ll fail in release
Require debug build for CodeGen/X86/fsafdo_test2.ll since it checks for
messages only printed in debug mode.

Reviewed By: wenlei, hoy

Differential Revision: https://reviews.llvm.org/D108364
2021-08-19 16:54:04 +01:00
Simon Pilgrim ff69c65b05 Fix empty paragraph passed to parameter Wdocumentation warning. NFC. 2021-08-19 16:48:28 +01:00
Craig Topper 84cea602f9 Revert "[SelectionDAGBuilder] Compute and cache PreferredExtendType on demand."
This reverts commit add08c8741.

There was a compile time jump on tramp3d-v4 on https://llvm-compile-time-tracker.com/
Want to see if it goes away with this reverted.
2021-08-19 08:42:05 -07:00
Jinsong Ji 0541ce4ef9 [CRT][LIT] build the target_cflags for Popen properly
We recently enabled crt for powerpc in
https://reviews.llvm.org/rGb7611ad0b16769d3bf172e84fa9296158f8f1910.

And we started to see some unexpected error message when running
check-runtimes.

eg:
https://lab.llvm.org/buildbot/#/builders/57/builds/9488/steps/6/logs/stdio
line 100 - 103:

"
clang-14: error: unknown argument: '-m64 -fno-function-sections'
clang-14: error: unknown argument: '-m64 -fno-function-sections'
clang-14: error: unknown argument: '-m64 -fno-function-sections'
clang-14: error: unknown argument: '-m64 -fno-function-sections'
"

Looks like we shouldn't strip the space at the beginning,
or else the command line passed to subprocess won't work well.

Reviewed By: phosek, MaskRay

Differential Revision: https://reviews.llvm.org/D108329
2021-08-19 15:39:53 +00:00
Alfsonso Gregory b0bf0b2e79 [Clang][AST][NFC] Resolve FIXME: Make CXXRecordDecl *Record const.
Differential Revision: https://reviews.llvm.org/D107477
2021-08-19 16:36:32 +01:00
Yaron Keren 1987eb9e9c [docs] Document how to install sphinx and recommonmark on Ubuntu
Differential Revision: https://reviews.llvm.org/D108374
2021-08-19 18:24:17 +03:00