Commit Graph

399804 Commits

Author SHA1 Message Date
Ludovic Jozeau 9e8fff26f3 [clang-format][docs] Fix documentation of clang-format BasedOnStyle type
Fix little inconsistency and use `std::string` (which is used everywhere
else) instead of `string`

Reviewed By: MyDeveloperDay, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D108765
2021-09-24 08:15:55 +01:00
mydeveloperday 87ab958641 [clang-format] ensure clang-format command-line argument sets up the default left/right qualifier ordering
When specifying the alignment direction on the command line ensure
we set up the default ordering.

Fix spelling mistakes in the command-line argument

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D110359
2021-09-24 08:11:53 +01:00
Pavel Labath cd6893a5a3 [lldb] Fix target-symbols-add-unwind.test for clang 7647a841
We need a different flag combination to produce .debug_frame.
2021-09-24 09:06:44 +02:00
mydeveloperday 7890afddec [clang-offload-bundler][docs][NFC] invalid indentation cause build issue 2021-09-24 08:03:52 +01:00
Amara Emerson 661ab70314 [AArch64][GlobalISel] Fix crash in the extend(extract_vector_elt) optimization.
It was assuming that GPR extends could only have destination sizes of 32 or 64
bits, but for AArch64 we allow < 32 bits even without matching size physregs.
2021-09-23 23:07:16 -07:00
Lang Hames 0820fbab99 [ORC-RT] Rename ExecutorAddress to ExecutorAddr.
This is an ORC-runtime counterpart to LLVM commit ef391df2b6, and the
motivation is the same: to move to a shorter name to improve the ergonomics of
this type before it's more widely adopted.
2021-09-23 21:42:23 -07:00
Albion Fung 840afbde48 [PowerPC] SemaChecking for darn family of builtins
The __darn family of builtins are only available on Pwr9,
and only __darn_32 is available on both 64 and 32 bit, while the rest
are only available on 64 bit. The patch adds sema checking
for these builtins and separate the __darn_32's 32 bit
test cases.

Differential revision: https://reviews.llvm.org/D110282
2021-09-23 23:38:59 -05:00
David Blaikie 165926aa4c Fix that same path separator issue again... 2021-09-23 21:15:01 -07:00
David Blaikie 8d9ddd4f50 DebugInfo: STN: Handle unreconstitutable types in function types 2021-09-23 21:13:16 -07:00
David Blaikie e70082e9ad Remove non-portable directory separator from test 2021-09-23 20:47:19 -07:00
Lang Hames ef391df2b6 [ORC] Rename ExecutorAddress to ExecutorAddr.
Removing the 'ess' suffix improves the ergonomics without sacrificing clarity.
Since this class is likely to be used more frequently in the future it's worth
some short term pain to fix this now.
2021-09-23 20:35:17 -07:00
Frederic Cambus 4ed05312a1 [docs] Document the --print-passes flag in opt.
Reviewed By: aeubanks, asbirlea

Differential Revision: https://reviews.llvm.org/D109663
2021-09-24 08:57:15 +05:30
David Carlier 3675e147a1 [Sanitizers] intercept ttyent api on FreeBSD.
and ttyentpath separately on NetBSD.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D109843
2021-09-24 04:26:05 +01:00
Christudasan Devadasan 40ddde5d1f [TableGen] Allow targets to entirely ignore Psets for registers
Tablegen currently expects targets to have at least one
pressure set for every broader register category. AMDGPU's
VGPR or AGPR, for instance, seemed to work correctly without
any pset, though we have forced one for each type to avoid
the assertion in computeRegUnitSets. However, psets can not
be entirely empty. At least one set is mandatory for every
target. This patch bypasses the assertion for the classes
when GeneratePressureSet is zero while ensuring the
RegUnitSets are not empty.

Reviewed By: arsenm, rampitec

Differential Revision: https://reviews.llvm.org/D110305
2021-09-23 23:07:35 -04:00
LLVM GN Syncbot 58d9ed2c93 [gn build] Port a2c1cf09df 2021-09-24 03:01:20 +00:00
Lang Hames a2c1cf09df [ORC] Introduce EPCGenericDylibManager / SimpleExecutorDylibManager.
EPCGenericDylibManager provides an interface for loading dylibs and looking up
symbols in the executor, implemented using EPC-calls to functions in the
executor.

SimpleExecutorDylibManager is an executor-side service that provides the
functions used by EPCGenericDylibManager.

SimpleRemoteEPC is updated to use an EPCGenericDylibManager instance to
implement the ExecutorProcessControl loadDylib and lookup methods. In a future
commit these methods will be removed, and clients updated to use
EPCGenericDylibManagers directly.
2021-09-23 19:59:35 -07:00
David Blaikie 25ac0d3c73 DebugInfo: Implement the -gsimple-template-names functionality
This excludes certain names that can't be rebuilt from the available
DWARF:

* Atomic types - no DWARF differentiating int from atomic int.
* Vector types - enough DWARF (an attribute on the array type) to do
  this, but I haven't written the extra code to add the attributes
  required for this
* Lambdas - ambiguous with any other unnamed class
* Unnamed classes/enums - would need column info for the type in
  addition to file/line number
* noexcept function types - not encoded in DWARF
2021-09-23 19:58:32 -07:00
Christudasan Devadasan 7a62a5b56d [AMDGPU] Legalize initialized LDS variables
We don't allow an initializer for LDS variables
and there is an early abort during instruction
selection. This patch legalizes them by ignoring
the init values. During assembly emission, proper
error reporting already exists for such instances.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D109901
2021-09-23 22:53:20 -04:00
Fangrui Song afab3c488f [Driver] Default Generic_GCC x86 to -fasynchronous-unwind-tables
to match GCC and Clang's own x86-64.
2021-09-23 19:39:50 -07:00
Michael Kruse e470f9268a [Polly] Implement user-directed loop distribution/fission.
This is a simple version without the possibility to define distribute
points or followup-transformations. However, it is the first
transformation that has to check whether the transformation is correct.

It interprets the same metadata as the LoopDistribute pass.

Re-apply after revert in c7bcd72a38 with
fix: Take isBand out of #ifndef NDEBUG since it now is used
unconditionally.
2021-09-23 21:11:01 -05:00
Mehdi Amini 83f3c615dd Add missing storageType to AttrDef to ODS
This is only noticeable when using an attribute across dialects I think.
Previously the namespace would be ommited, but it wouldn't matter as
long as the generated code stays within a single namespace.

Differential Revision: https://reviews.llvm.org/D110367
2021-09-24 01:30:29 +00:00
Matthias Springer 2190f8a8b1 [mlir][linalg] Support tile+peel with TiledLoopOp
Only scf.for was supported until now.

Differential Revision: https://reviews.llvm.org/D110220
2021-09-24 10:23:31 +09:00
Matthias Springer 8dc16ba8d2 [mlir][linalg] Merge all tiling passes into a single one.
Passes such as `linalg-tile-to-tiled-loop` are merged into `linalg-tile`.

Differential Revision: https://reviews.llvm.org/D110214
2021-09-24 10:16:46 +09:00
Teresa Johnson 7da4ee2df0 [ThinLTO] Fix bot failures
Fix bot failures after 2c1defeee4. The new
GUID I added isn't matching because it is a local with the source path
prepended. There isn't much use in matching the GUID's exactly anyway,
so remove those from the patterns.
2021-09-23 18:00:48 -07:00
Teresa Johnson 2c1defeee4 [ThinLTO] Don't emit original GUID for locals to distributed indexes
In ThinLTO for locals we normally compute the GUID from the name after
prepending the source path to get a unique global id. SamplePGO indirect
call profiles contain the target GUID without this uniquification,
however (unless compiling with -funique-internal-linkage-names).
Therefore, the index contains the original GUID of the local symbols
(without module path prepended to uniquify), in order to correctly
handle the call edges added for these indirect call profile targets
with SamplePGO.

We were emitting these to the combined index when writing it out as
bitcode, which is unnecessary and causes overhead when writing out the
indexes for distributed backends. The only use of the original GUID name
is in the thin link. Suppress it in that case. This reduced the thin
link time for a large distributed build by about 7%, and the aggregate
size of the serialized indexes by over 2%.

Continue to print it when writing out the full index, since that is just
used for debugging and testing.

Update a distributed thinlto index test to contain a local and ensure
that we don't get a COMBINED_ORIGINAL_NAME record.

Differential Revision: https://reviews.llvm.org/D110296
2021-09-23 17:35:47 -07:00
Leonard Chan c579c658cd [compiler-rt][profile] Make corrupted-profile.c more robust
This test specifically checks that profiles are not mergeable if there's a
change in the CounterPtr in the profile header. The test manually changes
CounterPtr by explicitly calling memset on some offset into the profile file.
This test would fail if binary IDs were emitted because the offset calculation
does not take into account the binary ID sizes.

This patch updates the test to use types provided in profile/InstrProfData.inc
to make it more resistant to profile layout changes.

Differential Revision: https://reviews.llvm.org/D110277
2021-09-23 17:16:47 -07:00
Lang Hames c965fde7c2 [ORC] Shut down services in SimpleRemoteEPCServer.
This should have been included with ExecutorBootstrapService in 78b083dbb7,
but was accidentally left out. It give services a chance to release any
resources that they have acquired.
2021-09-23 16:27:28 -07:00
Nemanja Ivanovic 76d845cb16 [clang-format] Fix unittest failures with -Werror
Commit a44ab17025 added a unit test that fails to build with
-Werror which causes build bot breaks on bots that include that
option in their build. This patch just adds the necessary casts to
silence the warnings.
2021-09-23 18:24:39 -05:00
Fangrui Song 7647a8413b Fix -fno-unwind-tables -fasynchronous-unwind-tables to emit unwind tables
This matches GCC.

Change the CC1 option to encode the unwind table level (1: needed by exceptions,
2: asynchronous) so that we can support two modes in the future.
2021-09-23 16:15:40 -07:00
Daniil Fukalov 4f28a2eb03 [NFC] Refactor tests to improve readability. 2021-09-24 01:57:30 +03:00
Craig Topper 40b230f685 [RISCV] Limit transformAddImmMulImm to prevent an infinite loop.
This fixes an issue reported in D108607.
2021-09-23 15:53:11 -07:00
Hongtao Yu e9d1a679a1 [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.
The correponding linker switch has been removed by https://reviews.llvm.org/D110209, so do not pass it in clang.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D110371
2021-09-23 15:50:40 -07:00
Leonard Chan eb115aa6c8 Revert "[compiler-rt][profile] Add padding after binary IDs"
This reverts commit 6bc9c8dfe3.

Reverted because this broke some PPC buildbots.
2021-09-23 15:48:59 -07:00
Lang Hames 2ce73f13c9 [ORC] Fix file header. 2021-09-23 15:48:08 -07:00
Louis Dionne a6406ce18c [libc++][NFC] Refactor the std::reverse_view tests
Mostly, remove the global assumption that all ranges have size 8.
I should have called this out during the initial review.
2021-09-23 18:35:56 -04:00
Vang Thao 1443ba6163 [AMDGPU] Propagate defining src reg for AGPR to AGPR Copys
On targets that do not support AGPR to AGPR copying directly, try to find the
defining accvgpr_write and propagate its source vgpr register to the copies
before register allocation so the source vgpr register does not get clobbered.

The postrapseudos pass also attempt to propagate the defining accvgpr_write but
if the register to propagate is clobbered, it will give up and create new
temporary vgpr registers instead.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D108830
2021-09-23 15:17:53 -07:00
Roland McGrath 80b92db02c [profile][fuchsia] Don't include extra NUL in log messages
Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D110361
2021-09-23 15:16:31 -07:00
Ted Woodward 953ddded1a [lldb] Handle malformed qfThreadInfo reply
If the remote gdbserver's qfThreadInfo reply has a trailing comma,
GDBRemoteCommunicationClient::GetCurrentProcessAndThreadIDs will return
an empty vector of thread ids. This will cause lldb to recurse through
three functions trying to get the list of threads, until it blows its
stack and crashes.

A trailing comma is a malformed response, but it shouldn't cause lldb to
crash. This patch will return the tids received before the malformed
response.

Reviewed By: clayborg, labath

Differential Revision: https://reviews.llvm.org/D109937
2021-09-23 17:03:47 -05:00
Joseph Huber d83ca624a1 [OpenMP] Fix data-race in new device RTL
This patch fixes a data-race observed when using the new device runtime
library. The Internal control variable for the parallel level is read in
the `__kmpc_parallel_51` function while it could potentially be written
by other threads. This causes data corruption and will cause
nondetermistic behaviour in the runtime. This patch fixes this by adding
an explicit synchronization before the region starts.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D110366
2021-09-23 17:28:07 -04:00
Matt Arsenault 2875d3d484 RegAllocGreedy: Remove an unhelpful auto, and don't use a reference 2021-09-23 17:25:25 -04:00
Craig Topper 70f50114f3 [RISCV] Add another isel optimization for (and (shl x, c2), c1)
Turn (and (shl x, c2), c1) -> (slli (srli x, c3-c2), c3) if c1 is a
shifted mask with no leading zeros and c3 trailing zeros where c3
is greater than c2.
2021-09-23 14:18:07 -07:00
Craig Topper 8811227a0c [RISCV] Add more tests for (and (shl x, C2), C1) that can be improved by using a pair of shifts. NFC
These tests have C1 as a shifted mask having no leading zeros and
C3 trailing zeros. If C3 is more than C2, we can select this as
(slli (srli x, C3-C2), C3).
2021-09-23 14:18:07 -07:00
Petr Hosek 093245ed9e [CMake] Pass llvm-readelf to CMake external builds
This matches other LLVM binary tools.

Differential Revision: https://reviews.llvm.org/D110313
2021-09-23 14:16:14 -07:00
David Goldman d75fb1ee79 [clangd] Support `#pragma mark` in the outline
Xcode uses `#pragma mark -` to draw a divider in the outline view
and `#pragma mark Note` to add `Note` in the outline view. For more
information, see https://nshipster.com/pragma/.

Since the LSP spec doesn't contain dividers for the symbol outline,
instead we treat `#pragma mark -` as a group with children - the
decls that come after it, implicitly terminating when the symbol's
parent ends.

The following code:

```
@implementation MyClass

- (id)init {}

- (int)foo;
@end
```

Would give an outline like

```
MyClass
        > Overrides
                    > init
        > Public Accessors
                    > foo
```

Differential Revision: https://reviews.llvm.org/D105904
2021-09-23 17:13:30 -04:00
mydeveloperday 5fcde57b73 [clang-format] NFC ensure Penality variable is passed back with Fixes
Fix set but not used warning
2021-09-23 22:05:20 +01:00
Petr Hosek c7bcd72a38 Revert "[Polly] Implement user-directed loop distribution/fission."
This reverts commit 52c30adc7d which
breaks the build when NDEBUG is defined.
2021-09-23 14:04:25 -07:00
Duncan P. N. Exon Smith c7b1279a38 Support: Add closing namespace comment in raw_ostream_test.cpp, NFC
The closing namespace comment prevents clang-format from dropping a
blank line after the final test. Also add in a blank line (which
simplifies merging/rebasing/etc. WIP patches).
2021-09-23 16:59:03 -04:00
Michael Kruse 07e7cb9433 [Polly] Remove -polly-opt-fusion option.
The name of the option is misleading and has been renamed by isl to
"serialize-sccs". Instead of also renaming the option, remove it.
The option is still accessible using

    -polly-isl-arg=--no-schedule-serialize-sccs
2021-09-23 15:43:08 -05:00
peter klausler f6ecea1a35 [flang] Represent (parentheses around derived types)
The strongly typed expression representation classes supported
a representation of parentheses only around intrinsic types
with specific kinds.  Parentheses around derived type variables
must also be preserved so that expressions may be distinguished
from variables; this distinction matters for actual arguments &
construct associations.

Differential Revision: https://reviews.llvm.org/D110355
2021-09-23 13:03:13 -07:00
Augusto Noronha fbaf367217 [lldb] Show fix-it applied even if expression didn't evaluate succesfully
If we applied a fix-it before evaluating an expression and that
expression didn't evaluate correctly, we should still tell users about
the fix-it we applied since that may be the reason why it didn't work
correctly.

Differential Revision: https://reviews.llvm.org/D109908
2021-09-23 16:45:04 -03:00