Commit Graph

370945 Commits

Author SHA1 Message Date
Christudasan Devadasan 9bb2b4f0aa [AMDGPU] Add alignment check for v3 to v4 load type promotion
It should be enabled only when the load alignment is at least 8-byte.

Fixes: SWDEV-256824

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D90404
2020-11-01 12:05:34 +05:30
Fangrui Song 7979f24954 [test] Fix some unused check prefixes in test/Analysis/CostModel/X86 2020-10-31 23:29:57 -07:00
Fangrui Song 96289ce633 [test] Fix unused check prefixes in test/AST 2020-10-31 21:46:45 -07:00
Fangrui Song 1a51bde1b6 [test] Clean up test/Frontend/gnu-mcount.c and fix unused check prefixes 2020-10-31 21:33:46 -07:00
Sam Clegg 1800b44651 [lld][WebAssembly] Remove bad-reloc test
This test was checking behaviour that only exists in the debug
configuration so will fail in release builds.

Perhaps there is way to keep this test around and only run
it in debug builds but for now I'm removing so fix the
release builders.

Differential Revision: https://reviews.llvm.org/D90542
2020-10-31 16:42:55 -07:00
Ayke van Laethem e03ba2198d
[AVR] Improve inline rotate/shift expansions
These expansions were rather inefficient and were done with more code
than necessary. This change optimizes them to use expansions more
similar to GCC. The code size is the same (when optimizing for code
size) but somehow LLVM reorders blocks in a non-optimal way. Still, this
should be an improvement with a reduction in code size of around 0.12%
(when building compiler-rt).

Differential Revision: https://reviews.llvm.org/D86418
2020-10-31 23:15:49 +01:00
River Riddle 235dfcf70a [mlir][AsmPrinter] Fix crash in windows build after D89354
Switch to an index based loop instead of using enumerate.
2020-10-31 14:21:49 -07:00
Florian Hahn aab71d4443 [DSE] Use same logic as legacy impl to check if free kills a location.
This patch updates DSE + MemorySSA to use the same check as the legacy
implementation to determine if a location is killed by a free call.

This changes the existing behavior so that a free does not kill
locations before the start of the freed pointer.

This should fix PR48036.
2020-10-31 20:09:25 +00:00
Florian Hahn 3c12a5bdf1 [DSE] Add additional tests with free, regenerate check lines.
The new test cases are inspired by PR48036.
2020-10-31 20:03:06 +00:00
Reid Kleckner 09662eeb46 Fix lld/wasm test portability issue, and XFAIL the test
I don't see any warnings from lld.wasm locally. Needs more
investigation.
2020-10-31 11:19:28 -07:00
Reid Kleckner 32cc962ef3 [COFF] Move ghash timers under the "add objects" timer
I had envisioned the ghash step as a big up front step, but as currently
written, the timers are nested, and we are notionally adding types from
objects, so we might as well arrange the timers this way.
2020-10-31 11:08:59 -07:00
Simon Pilgrim 70c6b86087 Add missing EOL. NFCI. 2020-10-31 17:32:04 +00:00
Kostya Kortchinsky 63ad087656 [GWP-ASan] Fuchsia specific mapping & utilities functions
This CL introduces the Fuchsia versions of the existing platform
specific functions.

For Fuchsia, we need to track the VMAR (https://fuchsia.dev/fuchsia-src/reference/kernel_objects/vm_address_region)
of the Guarded Pool mapping, and for this purpose I added some platform
specific data structure that remains empty on POSIX platforms.

`getThreadID` is not super useful for Fuchsia so it's just left as a
stub for now.

While testing the changes in my Fuchsia tree, I realized that
`guarded_pool_allocator_tls.h` should have closed the namespace before
including `GWP_ASAN_PLATFORM_TLS_HEADER`, otherwise drama ensues.

This was tested in g3, upstream LLVM, and Fuchsia (with local changes).

Differential Revision: https://reviews.llvm.org/D90483
2020-10-31 10:22:58 -07:00
Florian Hahn 799033d8c5 Reland "[SLP] Consider alternatives for cost of select instructions."
This reverts the revert commit a1b53db324.

This patch includes a fix for a reported issue, caused by
matchSelectPattern returning UMIN for selects of pointers in
some cases by looking to some connected casts.

For now, ensure integer instrinsics are only returned for selects of
ints or int vectors.
2020-10-31 16:52:36 +00:00
Mark de Wever b231396122 [Sema] Diagnose annotating `if constexpr` with a likelihood attribute
Adds a diagnostic when the user annotates an `if constexpr` with a
likelihood attribute. The `if constexpr` statement is evaluated at compile
time so the attribute has no effect. Annotating the accompanied `else`
with a likelihood attribute has the same effect as annotating a generic
statement. Since the attribute there is most likely not intended, a
diagnostic will be issued. Since the attributes can't conflict, the
"conflict" won't be diagnosed for an `if constexpr`.

Differential Revision: https://reviews.llvm.org/D90336
2020-10-31 17:51:36 +01:00
Mark de Wever b46fddf75f [CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop.
The attribute has no effect on a do statement since the path of execution
will always include its substatement.

It adds a diagnostic when the attribute is used on an infinite while loop
since the codegen omits the branch here. Since the likelihood attributes
have no effect on a do statement no diagnostic will be issued for
do [[unlikely]] {...} while(0);

Differential Revision: https://reviews.llvm.org/D89899
2020-10-31 17:51:29 +01:00
Paul C. Anagnostopoulos ef6f6d1c1a [TableGen] Eliminate uses of true and false in .td files.
They occurred in one NVPTX file and some test files.

Differential Revision: https://reviews.llvm.org/D90513
2020-10-31 10:54:33 -04:00
David Sanders d915d403d7 Use ANSI escape codes for --use-color on Windows
On Windows the --use-color option cannot be used for its originally
intended purpose of forcing color when piping stdout, since Windows
does not use ANSI escape codes by default. This change turns on ANSI
escape codes on Windows when forcing color to a non-displayed stdout
(e.g. piped).
2020-10-31 10:36:42 -04:00
David Green 30ad742644 [ARM] Fix crash for gather of pointer costs.
If the elt size is unknown due to it being a pointer, a comparison
against 0 will cause an assert. Make sure the elt size is large enough
before comparing and for the moment just return the scalar cost.
2020-10-31 13:10:14 +00:00
Serge Pavlov 5963e028e7 Temporarily remove test CodeGen/pragma-fp-exc
This test fails on buildbots where CPU architecture does not fully
support constrained intrinsics.
2020-10-31 19:48:44 +07:00
Simon Pilgrim 538fdb0189 [InstCombine] foldSelectRotate - generalize to foldSelectFunnelShift
This is the last of the rotate->funnel shift InstCombine generalizations for PR46896

We still have foldGuardedRotateToFunnelShift to deal with in AggressiveInstCombine

Differential Revision: https://reviews.llvm.org/D90382
2020-10-31 12:32:34 +00:00
Simon Pilgrim 9e406ee808 [X86] Make some basic VarArgsLoweringHelper helper methods const. NFCI.
Fixes a number of cppcheck remarks.
2020-10-31 12:16:49 +00:00
Simon Pilgrim e0cbcf96ce [X86] Make the X86FrameSortingComparator operator const. NFCI.
Fixes a cppcheck remark.
2020-10-31 12:16:49 +00:00
Simon Pilgrim 4da6a48399 [CSE] Make some basic EarlyCSE::StackNode helper methods const. NFCI.
Fixes a number of cppcheck remarks.
2020-10-31 12:16:48 +00:00
Simon Pilgrim bd76f3724d [Bitcode] Make some basic PlaceholderQueue/MetadataLoaderImpl helper methods const. NFCI.
Fixes a number of cppcheck remarks.
2020-10-31 12:16:48 +00:00
Andrea Di Biagio 0e20666db3 [MCA][LSUnit] Correctly update the internal group flags on store barrier execution. Fixes PR48024.
This is likely to be a regressigion introduced by my last refactoring of the
LSUnit (commit 5578ec32f9). Before this patch, the
"CurrentStoreBarrierGroupID" index was not correctly reset on store barrier
executions.  This was leading to unexpected crashes like the one reported as
PR48024.
2020-10-31 11:57:27 +00:00
Simon Pilgrim 55dbb7d823 [X86] X86MCTargetDesc - ensure the declaration/definition variable names match. NFCI.
Silences cppcheck mismatch warnings.
2020-10-31 11:50:00 +00:00
Simon Pilgrim 30a1d91127 [X86] Reduce scope of DestReg and use specific Register type not unsigned. NFCI. 2020-10-31 11:46:07 +00:00
Simon Pilgrim ae80ac6db2 [X86] printAsmMRegister - make the X86AsmPrinter arg a const reference. NFC.
Fixes cppcheck warning.
2020-10-31 11:41:14 +00:00
Simon Pilgrim 39f77b3224 [X86] assignValueToReg - fix Wshadow warning. NFCI.
X86OutgoingValueHandler already has a MIB member
2020-10-31 11:39:26 +00:00
Simon Pilgrim 33e20008d1 [X86] printAsmVRegister - remove unused argument. NFC. 2020-10-31 11:34:28 +00:00
Simon Pilgrim ec547a7517 [X86] X86AsmPrinter - ensure the declaration/definition variable names match. NFCI.
Silences cppcheck mismatch warnings.
2020-10-31 11:31:46 +00:00
Simon Pilgrim 5eec049689 [X86] No need to determine pointer when the type is already a MachineInstr*. NFCI.
Caught by cppcheck - appears to be a copy+paste typo as the other var is an iterator that does need the &* pointer operation.
2020-10-31 11:26:25 +00:00
Pedro Gonnet 43e451f9f3 Fix gendered documentation
Changed two references to developers as "he" or "him" to the more neutral "they".

Reviewed By: JDevlieghere, sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D78807
2020-10-31 12:17:19 +01:00
Vitaly Buka f9dd0166f1 [sanitizer] Disabled 2 tests on Android
They block bot upgrade to NDK 21.
2020-10-31 03:56:52 -07:00
Serge Pavlov 6021cbea4d Add option 'exceptions' to pragma clang fp
Pragma 'clang fp' is extended to support a new option, 'exceptions'. It
allows to specify floating point exception behavior more flexibly.

Differential Revision: https://reviews.llvm.org/D89849
2020-10-31 17:36:12 +07:00
Nikita Popov 27f647d117 [Inliner] Consistently apply callsite noalias metadata
Previously, !noalias and !alias.scope metadata on the call site was
applied as part of CloneAliasScopeMetadata(), which short-circuits
if the callee does not use any noalias metadata itself. However,
these two things have no relation to each other.

Consistently apply !noalias and !alias.scope metadata by integrating
this into an existing function that handled !llvm.access.group and
!llvm.mem.parallel_loop_access metadata. The handling for all of
these metadata kinds essentially the same.
2020-10-31 10:54:45 +01:00
Nikita Popov 61b1446a9e [Inliner] Add extra test for callsite noalias metadata (NFC)
Test the case where the callee does not use noalias metadata itself.
This case is currently handled inconsistently.
2020-10-31 10:54:45 +01:00
Petr Hosek 11efd002b1 [CMake] Avoid accidental C++ standard library dependency in sanitizers
While sanitizers don't use C++ standard library, we could still end
up accidentally including or linking it just by the virtue of using
the C++ compiler. Pass -nostdinc++ and -nostdlib++ to avoid these
accidental dependencies.

Reviewed By: smeenai, vitalybuka

Differential Revision: https://reviews.llvm.org/D88922
2020-10-31 02:37:38 -07:00
Arthur Eubanks 5c31b8b94f Revert "Use uint64_t for branch weights instead of uint32_t"
This reverts commit 10f2a0d662.

More uint64_t overflows.
2020-10-31 00:25:32 -07:00
Fangrui Song e2a1639c73 [test] Fix unused check prefixes in test/Driver
Note, the deprecated AArch64 -msign-return-address= does not accept b-key. So
delete the incorrect tests.
2020-10-31 00:14:59 -07:00
Fangrui Song 3eaec1fead [test] Fix unused check prefixes in test/DebugInfo 2020-10-30 23:29:24 -07:00
Jonas Devlieghere 136d06749b [lldb] Fix XcodeSDKModuleTests
Update XcodeSDKModuleTests for YAMLModuleTester changes in D90393.
2020-10-30 23:08:35 -07:00
LLVM GN Syncbot 6144dbf09e [gn build] Port 756f597841 2020-10-31 05:19:04 +00:00
Liu, Chen3 756f597841 [X86] Support Intel avxvnni
This patch mainly made the following changes:

1. Support AVX-VNNI instructions;
2. Introduce ExplicitVEXPrefix flag so that vpdpbusd/vpdpbusds/vpdpbusds/vpdpbusds instructions only use vex-encoding when user explicity add {vex} prefix.

Differential Revision: https://reviews.llvm.org/D89105
2020-10-31 12:39:51 +08:00
Petr Hosek d11710dae6 [NFC][CMake] Move some COMPILER_RT variables setup
Part of D88922
2020-10-30 20:09:50 -07:00
Petr Hosek 59d5031591 [CMake] Add -fno-rtti into tsan unittests
And some other NFC parts of D88922
2020-10-30 20:03:38 -07:00
Petr Hosek 6db314e86b [CMake] Remove cxx-headers from runtime deps
Part of D88922
2020-10-30 20:03:38 -07:00
Petr Hosek ed4fbe6d9c [CMake] Replace ctime with time.h in memprof
Part of D88922
2020-10-30 20:02:53 -07:00
Richard Smith dd8297b066 PR42513: Fix handling of function definitions lazily instantiated from
friends.

When determining whether a function has a template instantiation
pattern, look for other declarations of that function that were
instantiated from a friend function definition, rather than assuming
that checking for member specialization information on whichever
declaration name lookup found will be sufficient.
2020-10-30 18:35:12 -07:00