Commit Graph

394503 Commits

Author SHA1 Message Date
Geoffrey Martin-Noble 25c02b32a4 [Bazel] Update for f8c6515554
Update Bazel for
https://github.com/llvm/llvm-project/commit/f8c6515554 by splitting out
an LLVMDWP library target.
2021-07-22 14:53:08 -07:00
Amy Huang 3e2ad26b08 [DebugInfo] Add -fno-ctor-homing for as counterpart to -fuse-ctor-homing
Add an opt out flag for constructor homing.

Differential Revision: https://reviews.llvm.org/D106582
2021-07-22 14:52:36 -07:00
David Blaikie 83225936af PR51158: Don't emit -Wswitch or -Wcovered-switch-default for empty enums
An empty enum is used to implement C++'s new-ish "byte" type (to make
sure it's a separate type for overloading, etc - compared to a typedef)
- without any enumerators. Some clang warnings don't make sense in this
sort of situation, so let's skip them for empty enums.

It's arguable that possibly some situations of enumerations without
enumerators might want the previous-to-this-patch behavior (if the enum
is autogenerated and in some cases comes up empty, then maybe a default
in an empty switch would still be considered problematic - so that when
you add the first enumeration you do get a -Wswitch warning). But I
think that's niche enough & this std::byte case is mainstream enough
that we should prioritize the latter over the former.

If someone's got a middle ground proposal to account for both of those
situations, I'm open to patches/suggestions/etc.
2021-07-22 14:51:56 -07:00
Jianzhou Zhao a806f933a2 [dfsan] Make warn_unimplemented off by default
Because almost all internal use cases need to turn warn_unimplemented off.
2021-07-22 21:45:41 +00:00
Roman Lebedev d7378259aa
[SimplifyCFG] SimplifyCondBranchToTwoReturns(): really only deal with different ret blocks
This function is called when some predecessor of an empty return block
ends with a conditional branch, with both successors being empty ret blocks.

Now, because of the way SimplifyCFG works, it might happen to simplify
one of the blocks in a way that makes a conditional branch
into an unconditional one, since it's destinations are now identical,
but it might not have actually simplified said conditional branch
into an unconditional one yet.

So, we have to check that ourselves first,
especially now that SimplifyCFG aggressively tail-merges
all ret and resume blocks.

Even if it was an unconditional branch already,
`SimplifyCFGOpt::simplifyReturn()` doesn't call `FoldReturnIntoUncondBranch()`
by default.
2021-07-23 00:36:59 +03:00
Roman Lebedev 0d4f2de303
[NFC][LoopDeletion] Autogenerate checlines in simplify-then-delete.ll test 2021-07-23 00:36:59 +03:00
Roman Lebedev b9d8719a04
[NFC][SimplifyCFG] Add test for SimplifyCondBranchToTwoReturns() mishandling 2021-07-23 00:36:59 +03:00
Alexander Yermolovich f8c6515554 [DWP] Refactoring llvm-dwp in to a library part 2
This is follow up to https://reviews.llvm.org/D106198 where llvm-dwp was refactored in to multiple files.
In this patch moving them in to lib/include directories.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D106493
2021-07-22 14:23:29 -07:00
Kirill Stoimenov 7de73da8da [asan] Modified ASAN_MEMORY_ACCESS_CALLBACK to use a function call to ReportGenericErrorWrapper.
This change eliminate the stack frame for the fast path and improves runtime performance.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106505
2021-07-22 21:20:24 +00:00
Shu-Chun Weng 40ec59227a [NFC] Fix test build breakage on Darwin 2021-07-22 14:18:13 -07:00
Nick Fitzgerald 1d445a6e76 Reland: "[WebAssembly] Deduplicate imports of the same module name, field name, and type"
When two symbols import the same thing, only one import should be
emitted in the Wasm file.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50938

Reverted in: 16aac493e5.

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D105519
2021-07-22 14:16:05 -07:00
Jacques Pienaar a5b889db7f [mlir] Also update inferReturnTensorTypes (NFC)
Missed this one in the first go.
2021-07-22 13:57:36 -07:00
Med Ismail Bennani 254c4d174e
[lldb] Fix build failure introduced by 3d4cadfb26
This patch updates the `ScriptedProcess::GetGenericInteger` return type
to `llvm::Optional<unsigned long long>` to match implementation.

Differential Revision: https://reviews.llvm.org/D105788

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-07-22 20:54:27 +00:00
Med Ismail Bennani 3d4cadfb26 [lldb/Interpreter] Conform ScriptedProcessPythonInterface to SWIG python types
This patch should address the compiler warnings due to mismatch type
comparaison.

Differential Revision: https://reviews.llvm.org/D105788

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-07-22 22:48:15 +02:00
Martin Storsjö 9dbc4b09af [LLD] [COFF] Make -export-all-symbols work as intended for EXEs
If some symbols are marked with dllexport, we still want to export
all symbols if -export-all-symbols is specified. Previously, this
only worked as it should for DLL output, not for EXE.

This should fix downstream bug
https://github.com/msys2/MINGW-packages/issues/9163.

Differential Revision: https://reviews.llvm.org/D106245
2021-07-22 23:34:03 +03:00
Mircea Trofin a4a4f602c7 [MLGO] Correct protobuf path 2021-07-22 13:24:55 -07:00
Felix Berger cb4c12b611 [clang-tidy] performance-unnecessary-copy-initialization: Create option to exclude container types from triggering the check.
Add string list option of type names analagous to `AllowedTypes` which lets
users specify a list of ExcludedContainerTypes.

Types matching this list will not trigger the check when an expensive variable
is copy initialized from a const accessor method they provide, i.e.:

```
ExcludedContainerTypes = 'ExcludedType'

void foo() {
  ExcludedType<ExpensiveToCopy> Container;
  const ExpensiveToCopy NecessaryCopy = Container.get();
}
```

Even though an expensive to copy variable is copy initialized the check does not
trigger because the container type is excluded.

This is useful for container types that don't own their data, such as view types
where modification of the returned references in other places cannot be reliably
tracked, or const incorrect types.

Differential Revision: https://reviews.llvm.org/D106173

Reviewed-by: ymandel
2021-07-22 16:20:20 -04:00
Paulo Matos 46667a1003 [WebAssembly] Implementation of global.get/set for reftypes in LLVM IR
Reland of 31859f896.

This change implements new DAG notes GLOBAL_GET/GLOBAL_SET, and
lowering methods for load and stores of reference types from IR
globals. Once the lowering creates the new nodes, tablegen pattern
matches those and converts them to Wasm global.get/set.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D104797
2021-07-22 22:07:24 +02:00
Mircea Trofin df0066a1c9 [NFC][MLGO] Fix vector sizing
The bots only build release mode, and the use of `reserve` instead of
`resize`, while not causing invalid memory accesses, is incorrect.
2021-07-22 13:06:00 -07:00
Jake Egan 1b52e9bac2 [AIX] Define __LONGDOUBLE64 macro
This patch defines the macro __LONGDOUBLE64 for AIX when long double is 8 bytes.

Reviewed By: cebowleratibm

Differential Revision: https://reviews.llvm.org/D105477
2021-07-22 16:05:14 -04:00
Roman Lebedev af8fa36bf0
[NFCI][TLI] prepare[US]REMEqFold(): don't add nonsensical 'exact' flag to rotates created
As pointed out by Craig Topper.
2021-07-22 23:02:58 +03:00
Eric Astor a4e964a282 [ms] [llvm-ml] Fix macro case-insensitivity
We previously had issues identifying macros not registered with a lowercase name.

Reviewed By: mstorsjo, thakis

Differential Revision: https://reviews.llvm.org/D106453
2021-07-22 15:50:52 -04:00
Anjan Kumar Guttahalli Krishna 7d669e6666 [AIX] Generate large code model relocations when mcmodel=medium on AIX
This patch makes the changes in the driver that converts the medium code
model to large.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D106371
2021-07-22 15:47:22 -04:00
Shu-Chun Weng 4fa989c7b2 Fix TSAN signal interceptor out-of-bound access
signal(2) and sigaction(2) have defined behaviors for invalid signal number
(EINVAL) and some programs rely on it.

The added test case also reveals that MSAN is too strict in this regard.

Test case passed on x86_64 Linux and AArch64 Linux.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106468
2021-07-22 12:38:07 -07:00
Nikita Popov 4294657bd5 [LICM][SCCP] Regenerate test checks (NFC) 2021-07-22 21:37:21 +02:00
Anjan Kumar Guttahalli Krishna f719dff043 [AIX] Clang's library integration support for 128-bit long double is incomplete on AIX.
Emit the unsupported option error until the Clang's library integration support for 128-bit long double is available for AIX.

Reviewed By: Whitney, cebowleratibm

Differential Revision: https://reviews.llvm.org/D106074
2021-07-22 15:32:48 -04:00
Jacques Pienaar ee7242c662 [mlir] Update to use ValueShapeRange (NFC)
Update to use alias in preparation for changing it to not just be a pure alias.
2021-07-22 12:24:49 -07:00
Jon Chesterfield 9e05c084e5 [libomptarget][amdgpu][nfc] Normalise license headers
Reviewed By: gregrodgers, jdoerfert

Differential Revision: https://reviews.llvm.org/D106581
2021-07-22 20:23:41 +01:00
Roman Lebedev 7ef6f01909
[SimplifyCFG] FoldTwoEntryPHINode(): bailout on inverted logical and/or (PR51149)
The logical (select) form of and/or will now be a source of problems.
We don't really account for it's inverted form, yet it exists,
and presumably we should treat it just like non-inverted form:
https://alive2.llvm.org/ce/z/BU9AXk

https://bugs.llvm.org/show_bug.cgi?id=51149 reports a reportedly-serious
perf regression that will hopefully be mitigated by this.
2021-07-22 22:19:34 +03:00
Roman Lebedev 952dc2e561
[NFC][SimplifyCFG] Add some more tests w/ two-entry PHI nodes and 2021-07-22 22:19:34 +03:00
Felix Berger 00edae9203 [clang-tidy] performance-unnecessary-copy-initialization: Disable check when variable and initializer have different replaced template param types.
This can happen when a template with two parameter types is instantiated with a
single type. The fix would only be valid for this instantiation but fail for
others that rely on an implicit type conversion.

The test cases illustrate when the check should trigger and when not.

Differential Revision: https://reviews.llvm.org/D106011
2021-07-22 15:17:24 -04:00
Jon Chesterfield e8da963922 [nfc] Fix typo in comment, s/node/note 2021-07-22 20:16:53 +01:00
Simon Pilgrim 4185c5502c [CostModel][X86] Adjust shift SSE4 legalized costs based on llvm-mca reports.
Update shl/lshr/ashr costs based on the worst case costs from the script in D103695 - many of the 128-bit shifts (usually where integer multiplies aren't used) have similar behaviour to AVX1 so we can merge them.
2021-07-22 20:07:32 +01:00
Simon Pilgrim 2657fe1721 [CostModel][X86] Fix funnel shift check prefixes
We'd lost AVX1 test coverage due to bulldozer (XOP) trying to use the same check prefixes - we really need to fix the update script to avoid this!
2021-07-22 20:07:31 +01:00
Jon Chesterfield 14e34a83b0 [libomptarget][amdgpu][nfc] Replace use of gelf.h with libelf.h
AMDGPU can assume Elf64 so doesn't need to abstract over Elf32

Drop a few other unused headers at the same time. Now only llvm elf
and libelf are used by the plugin.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106579
2021-07-22 20:04:13 +01:00
Aaron Ballman 178c2b4c1e Correctly diagnose taking the address of a register variable in C
We caught the cases where the user would explicitly use the & operator,
but we were missing implicit conversions such as array decay.

Fixes PR26336. Thanks to Samuel Neves for inspiration for the patch.
2021-07-22 14:53:23 -04:00
LLVM GN Syncbot 4e0cefc640 [gn build] Port 3959c95deb 2021-07-22 18:41:45 +00:00
Simon Pilgrim d073b19dbf [X86] Fix SLM FP<->INT throughputs.
Noticed while trying to clean up the shift costs model for SSE4 targets using the script in D10369 - SLM double-pumps all the 128-bit vector conversion ops and only use FP0 pipe - numbers taken from Intel AOM + Agner.
2021-07-22 19:39:04 +01:00
Thomas Johnson 1cda1e6186 [ARC] Add disassembly for the conditioned RSUB immediate instruction
Differential Revision: https://reviews.llvm.org/D106497
2021-07-22 11:34:39 -07:00
Fangrui Song 3b181568db [Matrix] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D106457. NFC 2021-07-22 11:33:02 -07:00
Louis Dionne 3959c95deb [libc++] Add helper type non-propagating-cache
Differential Revision: https://reviews.llvm.org/D102121
2021-07-22 14:30:16 -04:00
zoecarver 6f5064cd0c [libc++][docs] Take lock for range.single.view.
Mark this item as in progress and assigned to me.
2021-07-22 11:15:24 -07:00
Alex Lorenz 40d2d0c412 [clang][test] Add -fuse-ld= to test case added in 2542c1a5a1 to resolve test failure with CLANG_DEFAULT_LINKER=lld 2021-07-22 11:12:38 -07:00
Adam Nemet ce5b1320a7 [Matrix] Fix miscompile for NT matmul if the transpose has other use
We should only add the fake lowering entry for the matrix remark if the
transpose is not lowered on its own.  `MapVector::insert` is used to insert
the entry during proper lowering which does not overwrite the fake entry in
the map.

We actually had test coverage for this but the reference output code was
wrong; it was storing undef rather than the transposed column.

Also add an assert that would have caught this.

Differential Revision: https://reviews.llvm.org/D106457
2021-07-22 10:45:56 -07:00
Marius Brehler 49d840c35c [mlir] Improve description of interface options
Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D106539
2021-07-22 19:35:56 +02:00
Krishna Kariya ae4e8f7d52 [InstCombine][test] add coverage for possible fabs folds; NFC
This goes with D101727 (adds FMF to the select).

Differential Revision: https://reviews.llvm.org/D106563
2021-07-22 13:22:56 -04:00
Alex Lorenz 2542c1a5a1 [clang][driver][darwin] Add driver support for Mac Catalyst
This commit adds driver support for the Mac Catalyst target,
as supported by the Apple clang compile

Differential Revision: https://reviews.llvm.org/D105960
2021-07-22 10:20:19 -07:00
David Green c9cebda772 [AArch64] Adjust the cost of integer sum reductions
This changes the cost to (LT.first-1) * cost(add) + 2, where the cost of
an add is assumed to be 1. This brings it inline with the other
reductions.

Differential Revision: https://reviews.llvm.org/D106240
2021-07-22 18:19:54 +01:00
Simon Pilgrim e1bdb57958 [CostModel][X86] Adjust shift SSE legalized costs based on llvm-mca reports.
Update shl/lshr/ashr costs based on the worst case costs from the script in D103695.
2021-07-22 18:12:49 +01:00
Shilei Tian 1a7f779022 [OpenMPOpt] Add support for BooleanStateWithSetVector
D101977 added `BooleanStateWithPtrSetVector` to store pointers to a set meanwhile
tracking boolean state. One of the limitation is that it can only store pointer.
We might want it to store other types of values, such as integer for parallel
level. This patch generalizes the idea and create `BooleanStateWithSetVector`.
`BooleanStateWithPtrSetVector` therefore becomes a type alias of `BooleanStateWithSetVector`.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106149
2021-07-22 13:12:29 -04:00