Commit Graph

369800 Commits

Author SHA1 Message Date
Alexander Kornienko 37558fd29e [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
Alexander Belyaev d2ed2f16b8 [mlir] Add MemRefReshapeOp definition to Standard.
https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15

Differential Revision: https://reviews.llvm.org/D89784
2020-10-22 13:29:13 +02:00
Max Kazantsev cc2eb3b5e2 [SCEV][NFC] Simplify internals of BackedgeTakenInfo 2020-10-22 17:39:56 +07:00
Luís Marques 89840380d5 [RISCV][NFC] Add more tests for 32-bit constant materialization
The existing tests were mostly for 64-bit constants.

Differential Revision: https://reviews.llvm.org/D83210
2020-10-22 11:36:34 +01:00
LLVM GN Syncbot 1c3bbdb866 [gn build] Port be39a6fe6f 2020-10-22 09:39:53 +00:00
Max Kazantsev e2858bf633 [SCEV][NFC] Rename MaxAndComplete -> ConstantMaxAndComplete
This better reflects what this variable is about.
2020-10-22 16:37:06 +07:00
Tianqing Wang be39a6fe6f [X86] Add User Interrupts(UINTR) instructions
For more details about these instructions, please refer to the latest
ISE document:
https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D89301
2020-10-22 17:33:07 +08:00
Evgeny Leviant efcb3952e0 [llvm-mca] Improve test case 2020-10-22 12:08:08 +03:00
Mikhail Goncharov 40f360c2e9 [libc++] Update continous integration scripts
Now libc++ pipeline will be triggered from the "premerge-checks" and the
combined result are going to be returned to Harbormaster.

Reviewed-by: ldionne

Differential Revision: https://reviews.llvm.org/D89113
2020-10-22 10:49:40 +02:00
Max Kazantsev 6379090ea7 [SCEV][NFC] Rename getMax -> getConstantMax
This better reflects what this logic actually does.
2020-10-22 15:12:54 +07:00
Max Kazantsev 113ad90a34 Revert "[DWARFLinker] Capitalize type names (NFC)"
This reverts commit 3fce5ea7ce.

`make check` broken.
2020-10-22 15:09:45 +07:00
Sjoerd Meijer 51d7df3fa1 [InstructionSimplify] icmp (X+Y), (X+Z) simplification
This improves simplifications for pattern `icmp (X+Y), (X+Z)` -> `icmp Y,Z`
if only one of the operands has NSW set, e.g.:

    icmp slt (x + 0), (x +nsw 1)

We can still safely rewrite this to:

    icmp slt 0, 1

because we know that the LHS can't overflow if the RHS has NSW set and
C1 < C2 && C1 >= 0, or C2 < C1 && C1 <= 0

This simplification is useful because ScalarEvolutionExpander which is used to
generate code for SCEVs in different loop optimisers is not always able to put
back NSW flags across control-flow, thus inhibiting CFG simplifications.

Differential Revision: https://reviews.llvm.org/D89317
2020-10-22 08:55:52 +01:00
Fangrui Song b0c12474ed [ShrinkWrap] Delete unneeded nullptr checks for the save point. NFC
findNearestCommonDominator never returns nullptr.
2020-10-22 00:27:01 -07:00
Jonas Devlieghere 3fce5ea7ce [DWARFLinker] Capitalize type names (NFC)
Make these types conform to the LLVM Coding Standards:

> Type names (including classes, structs, enums, typedefs, etc) should
> be nouns and start with an upper-case letter.
2020-10-22 00:18:07 -07:00
Alex Lorenz de1016ce5c [driver][arm64] Set target CPU to A12 for compiler invocations that
target Apple Silicon macOS machines

Differential Revision: https://reviews.llvm.org/D82699
2020-10-21 23:35:27 -07:00
Martin Storsjö 78ba1e93a6 [libcxx] [test] Move use of statvfs to helper header
Implement the corresponding thing using windows functions as well.

Differential Revision: https://reviews.llvm.org/D89864
2020-10-22 09:00:57 +03:00
Martin Storsjö 545fb7a71c [libcxx] [test] Mark bits of fs.enum tests as libcpp specific
The individual enum values in copy_options and file_type aren't
specified in the standard.

The standard doesn't require fs::path::format to be a scoped enum.

Differential Revision: https://reviews.llvm.org/D89866
2020-10-22 09:00:57 +03:00
Martin Storsjö 586892d583 [libcxx] [test] Add another (void) cast for a function marked nodiscard in MS STL
Differential Revision: https://reviews.llvm.org/D89867
2020-10-22 09:00:57 +03:00
Martin Storsjö 5449ea9f90 [libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers
Copy over the compiler detection structure from libcxx, and set
_LIBCXXABI_WEAK like _LIBCPP_WEAK is set in libcxx.

This allows users to override operator new/delete, if using those
operators from libcxxabi instead of from libcxx.

Differential Revision: https://reviews.llvm.org/D89863
2020-10-22 09:00:57 +03:00
Tony 8e8cc587a5 [NFC][AMDGPU] Reorder SIMemoryLegalizer functions to be consistent
- Make the SIMemoryLegalizer insertAcquire function be in the same
  order for each target to be consistent.

Differential Revision: https://reviews.llvm.org/D89880
2020-10-22 05:39:18 +00:00
Douglas Yung ade107360f Revert "Add "not" to an llvm-symbolizer test that expects to fail"
A recent commit to revert llvm-symbolizer changes forgot to revert this test fix.

This reverts commit 5e656ee48b.
2020-10-21 21:59:48 -07:00
Arthur Eubanks 55c4ff9860 [test] Fix tests using -analyze that fail under NPM
Many of these tests don't use the output of -analyze.
2020-10-21 21:54:30 -07:00
Serguei Katkov 75d0e0cd5f [IRCE] consolidate profitability check
Use BFI if it is available and BPI otherwise.
This is a promised follow-up after D89541.

Reviewers: ebrevnov, mkazantsev
Reviewed By: ebrevnov
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D89773
2020-10-22 11:26:45 +07:00
Arthur Eubanks 5b68772ca9 [test] Fix shrunk-constant.ll under NPM 2020-10-21 21:21:24 -07:00
Vy Nguyen e2858997ab Do not intercept __libc_memalign and cfree on Android because neither of these exists in Bionic.
Differential Revision: https://reviews.llvm.org/D89616
2020-10-21 23:21:45 -04:00
Arthur Eubanks da43d428d0 [NPM][opt] Disallow -analyze under NPM
-analyze does not work with the NPM.
'print<foo>' passes should be used instead.
2020-10-21 20:18:48 -07:00
Richard Smith 5e2c9a05b7 Fix test failure on Windows. 2020-10-21 20:02:37 -07:00
Teresa Johnson 1bb68c9b18 [sanitizer] Allow log_path to distinguish default from explicit stderr
Split out of D89086 as suggested.

Change the default of the log_path flag to nullptr, and the code
consuming that flag (ReportFile::SetReportPath), to treat nullptr as
stderr (so no change to the behavior of existing users). This allows
code to distinguish between the log_path being specified explicitly as
stderr vs the default.

This is so the flag can be used to override the new report path variable
that will be encoded in the binary for memprof for runtime testing.

Differential Revision: https://reviews.llvm.org/D89629
2020-10-21 19:32:36 -07:00
Xiang1 Zhang 7c3fea7721 [X86] Support customizing stack protector guard
Reviewed By: nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D88631
2020-10-22 10:08:14 +08:00
Arthur Eubanks 007ffdc18c [test] Fix LoopDistribute tests under NPM 2020-10-21 19:05:30 -07:00
Chen Zheng 2d71f26c81 [LSR] add testcase for LSR profitable chain change, nfc 2020-10-21 21:55:37 -04:00
Richard Smith 8156074352 Ensure that the "value" of an unnamed bit-field isn't taken into
account when determining the identity of a class NTTP.
2020-10-21 18:51:55 -07:00
Arthur Eubanks 716338a09a [test] Fix LoopDeletion tests under NPM 2020-10-21 18:32:35 -07:00
Craig Topper 9e884169a2 [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding toward negative infinity
Some of our conversion algorithms produce -0.0 when converting unsigned i64 to double when the rounding mode is round toward negative. This switches them to other algorithms that don't have this problem. Since it is undefined behavior to change rounding mode with the non-strict nodes, this patch only changes the behavior for strict nodes.

There are still problems with unsigned i32 conversions too which I'll try to fix in another patch.

Fixes part of PR47393

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87115
2020-10-21 18:12:54 -07:00
Richard Smith e04ba2bc05 Make APValue profiling a little more compact. 2020-10-21 18:07:00 -07:00
Vy Nguyen 3b3aef198b [sanitizer]Update tests to be compatible with Android.
Split off from D89251

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D89884
2020-10-21 17:16:54 -07:00
Zequan Wu 2f29341114 Revert "Revert "SimplifyCFG: Clean up optforfuzzing implementation""
This reverts commit 716f7636e1.
2020-10-21 17:08:56 -07:00
Zequan Wu 716f7636e1 Revert "SimplifyCFG: Clean up optforfuzzing implementation"
See discussion: https://reviews.llvm.org/D89590
This reverts commit cdd006eec9.
2020-10-21 16:56:32 -07:00
Gaurav Jain 4634ad6c0b [NFC] Set return type of getStackPointerRegisterToSaveRestore to Register
Differential Revision: https://reviews.llvm.org/D89858
2020-10-21 16:19:38 -07:00
David Blaikie a67d164a82 Revert several changes related to llvm-symbolizer exiting non-zero on failure.
Seems users have enough different uses of the symbolizer where they
might have unknown binaries and offsets such that "best effort" behavior
is all that's expected of llvm-symbolizer - so even erroring on unknown
executables and out of bounds offsets might not be suitable.

This reverts commit 1de0199748.
This reverts commit a7b209a6d4.
This reverts commit 338dd138ea.
2020-10-21 15:21:44 -07:00
Quentin Colombet ee6abef532 [ValueTracking] Interpret GEPs as a series of adds multiplied by the related scaling factor
Prior to this patch, computeKnownBits would only try to deduce trailing zeros
bits for getelementptrs. This patch adds the logic to treat geps as a series
of add * scaling factor.

Thanks to this patch, using a gep or performing an address computation
directly "by hand" (ptrtoint followed by adds and mul followed by inttoptr)
offers the same computeKnownBits information.

Previously, the "by hand" approach would have given more information.

This is related to https://llvm.org/PR47241.

Differential Revision: https://reviews.llvm.org/D86364
2020-10-21 15:07:04 -07:00
Richard Smith e97e9851b2 [c++20] For P0732R2: permit class template argument deduction for non-type template parameters. 2020-10-21 15:03:22 -07:00
Louis Dionne 28270234f1 [libc++] Fix the benchmarks build 2020-10-21 17:55:35 -04:00
Louis Dionne 1913bb622c [libc++][ci] Also install the library in the CI scripts
It's good to run the installation step to make sure it works properly,
as build system changes can break that.
2020-10-21 17:34:58 -04:00
rdzhabarov 281e0f3636 [mlir] Simplify DDR matching patterns with equal operands for operators where it's applicable. Added documentation.
This https://reviews.llvm.org/D89254 diff introduced implicit matching between same name operands.

Differential Revision: https://reviews.llvm.org/D89598
2020-10-21 21:31:39 +00:00
Felix Berger 1c1f794c2b Always allow std::function to be copied.
Since its call operator is const but can modify the state of its underlying
functor we cannot tell whether the copy is necessary or not.

This avoids false positives.

Reviewed-by: aaron.ballman, gribozavr2

Differential Revision: https://reviews.llvm.org/D89332
2020-10-21 17:20:35 -04:00
Richard Smith caf30e7f03 [c++20] For P0732R2: Give class NTTPs the proper type when examined with 'decltype'.
This requires that we track enough information to determine the original
type of the parameter in a substituted non-type template parameter, to
distinguish the reference-to-class case from the class case.
2020-10-21 14:15:54 -07:00
Joseph Huber cd4a4ae97a [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts
The changes made in D88594 caused the test OpenMP/driver.c to fail on a 32-bit host becuase it was offloading to a 64-bit architecture by default. The offloading test was moved to a new file and a feature was added to the lit config to check for a 64-bit host.

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D89904
2020-10-21 17:01:36 -04:00
Louis Dionne 69c2087283 [libc++] Fix compiler-rt build by copying libc++ headers to <build>/include
This commit should really be named "Workaround external projects depending
on libc++ build system implementation details". It seems that the compiler-rt
build (and perhaps other projects) is relying on the fact that we copy libc++
and libc++abi headers to `<build-root>/include/c++/v1`. This was changed
by 5d796645, which moved the headers to `<build-root>/projects/libcxx/include/c++/v1`
and broke the compiler-rt build.

I'm committing this workaround to fix the compiler-rt build, but we should
remove reliance on implementation details like that. The correct way to
setup the compiler-rt build would be to "link" against the `cxx-headers`
target in CMake, or to run `install-cxx-headers` using an appropriate
installation prefix, and then manually add a `-I` path to that location.
2020-10-21 16:56:33 -04:00
Thomas Raoux ac2cf07195 [spirv] Fix legalize standard to spir-v for transfer ops
Forward missing attributes when creating the new transfer op otherwise the
builder would use default values.

Differential Revision: https://reviews.llvm.org/D89907
2020-10-21 13:56:01 -07:00