185311 Commits

Author SHA1 Message Date
Alina Sbirlea
ad040616ee [MemorySSA] Do not create memoryaccesses for debug info intrinsics.
Summary:
Do not model debuginfo intrinsics in MemorySSA.
Regularly these are non-memory modifying instructions. With -disable-basicaa, they were being modelled as Defs.

Reviewers: george.burgess.iv

Subscribers: aprantl, Prazek, sanjoy.google, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371565 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 22:35:27 +00:00
David Blaikie
fb9efd7dc8 llvm-reduce: Remove some unused headers/more narrowly include them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371564 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 22:31:35 +00:00
David Blaikie
da0892bd0d llvm-remove: Remove "using namespace" in header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371563 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 22:10:00 +00:00
David Blaikie
5fbb26ea5f llvm-reduce: Add pass to reduce Metadata
Patch by Diego Treviño!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371562 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 22:09:58 +00:00
Eric Christopher
2151a462e9 Move LLVM_ENABLE_ABI_BREAKING_CHECKS variables to their own file
so that you don't have to link Error.o and all of its dependencies.

In more detail: global initializers in Error.o can't be elided with
-ffunction-sections/-gc-sections since they always need to be run
causing a fairly significant binary bloat if all you want is the
ABI breaking checks code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371561 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 22:05:01 +00:00
Philip Reames
ed0d1bcf30 [Loads] Move generic code out of vectorizer into a location it might be reused [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371558 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 21:33:53 +00:00
Philip Reames
faad45dd30 [ValueTracking] Factor our common speculation suppression logic [NFC]
Expose a utility function so that all places which want to suppress speculation (when otherwise legal) due to ordering and/or sanitizer interaction can do so.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371556 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 21:12:29 +00:00
David Blaikie
63f3f17e15 llvm-reduce: Simplify testing using -implicit-check-not
Also fix llvm-reduce to use the specified output file name directly,
without appending '.ll' to the name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371555 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 20:52:14 +00:00
Sanjay Patel
9b4b3b7901 [x86] add test for false dependency with AVX; NFC
Goes with D67363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371551 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 20:04:10 +00:00
Roman Lebedev
6151168324 [NFC][InstCombine] rewrite test added in r371537 to use non-null pointer instead
I only want to ensure that %offset is non-zero there,
it doesn't matter how that info is conveyed.
As filed in PR43267, the assumption way does not work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371550 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 19:30:17 +00:00
Philip Reames
822c3a1dc2 [X86] Updated target specific selection dag code to conservatively check for isAtomic in addition to isVolatile
See D66309 for context.

This is the first sweep of x86 target specific code to add isAtomic bailouts where appropriate. The intention here is to have the switch from AtomicSDNode to LoadSDNode/StoreSDNode be close to NFC; that is, I'm not looking to allow additional optimizations at this time.

Sorry for the lack of tests.  As discussed in the review, most of these are vector tests (for which atomicity is not well defined) and I couldn't figure out to exercise the anyextend cases which aren't vector specific.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371547 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 18:43:15 +00:00
Roman Lebedev
c9e9f6a5e6 [NFC][InstSimplify] rewrite test added in r371537 to use non-null pointer instead
I only want to ensure that %offset is non-zero there,
it doesn't matter how that info is conveyed.
As filed in PR43267, the assumption way does not work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371546 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 18:40:00 +00:00
Matt Arsenault
b7c0307ccf GlobalISel/TableGen: Handle REG_SEQUENCE patterns
The scalar f64 patterns don't work yet because they fail on multiple
results from the unused implicit def of scc in the result bit
operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371542 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:57:33 +00:00
Guozhi Wei
5423bd20ef [BPI] Adjust the probability for floating point unordered comparison
Since NaN is very rare in normal programs, so the probability for floating point unordered comparison should be extremely small. Current probability is 3/8, it is too large, this patch changes it to a tiny number.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371541 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:25:11 +00:00
Matt Arsenault
cae6fe6cdb AMDGPU/GlobalISel: Select G_FABS/G_FNEG
f64 doesn't work yet because tablegen currently doesn't handlde
REG_SEQUENCE.

This does regress some multi use VALU fneg cases since now the
immediate remains in an SGPR, and more moves are used for legalizing
the xor. This is a SIFixSGPRCopies deficiency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371540 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:19:46 +00:00
Matt Arsenault
b4ba7acc49 AMDGPU/GlobalISel: Select cvt pk intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371539 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:17:05 +00:00
Matt Arsenault
2ee28d2387 AMDGPU/GlobalISel: Select llvm.amdgcn.sffbh
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371538 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:16:59 +00:00
Roman Lebedev
47f39c041e [NFC][InstCombine][InstSimplify] PR43251 - and some patterns with offset != 0
https://rise4fun.com/Alive/21b

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371537 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:13:59 +00:00
Matt Arsenault
6c1da931e7 AMDGPU/GlobalISel: RegBankSelect for G_ZEXTLOAD/G_SEXTLOAD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371536 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 16:42:37 +00:00
Matt Arsenault
f37f483128 AMDGPU/GlobalISel: Legalize constant 32-bit loads
Legalize by casting to a 64-bit constant address. This isn't how the
DAG implements it, but it should.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371535 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 16:42:31 +00:00
Sam Elliott
b5e7bf5f78 [RISCV] Support llvm-objdump -M no-aliases and -M numeric
Summary:
Now that llvm-objdump allows target-specific options, we match the
`no-aliases` and `numeric` options for RISC-V, as supported by GNU objdump.

This is done by overriding the variables used for the command-line options, so
that the command-line options are still supported.

This patch updates all tests using `llvm-objdump -riscv-no-aliases` to use
`llvm-objdump -M no-aliases`.

Reviewers: luismarques, asb

Reviewed By: luismarques, asb

Subscribers: pzheng, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371534 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 16:24:03 +00:00
Matt Arsenault
7b1d1c328c AMDGPU/GlobalISel: First pass at attempting to legalize load/stores
There's still a lot more to do, but this handles decomposing due to
alignment. I've gotten it to the point where nothing crashes or
infinite loops the legalizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371533 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 16:20:14 +00:00
Sam Elliott
8a96e2c0c7 [RISCV] Add Option for Printing Architectural Register Names
Summary:
This is an option primarily to use during testing. Instead of always
printing registers using their ABI names, this allows a user to request they
are printed with their architectural name.

This is then used in the register constraint tests to ensure the mapping
between architectural and abi names is correct.

Reviewers: asb, luismarques

Reviewed By: asb

Subscribers: pzheng, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371531 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 15:55:55 +00:00
Sanjay Patel
ff1e69ab36 [x86] add a test for BreakFalseDeps; NFC
As discussed in D67363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371528 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 15:42:22 +00:00
Djordje Todorovic
dcad4a5a55 Revert "[utils] Implement the llvm-locstats tool"
This reverts commit rL371520.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371527 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:48:52 +00:00
Sanjay Patel
358d7c6d81 [ARM] add test for BreakFalseDeps with minsize attribute; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371526 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:29:02 +00:00
Simon Pilgrim
aaef55b50b [X86] Add AVX partial dependency tests as noted on D67363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371525 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:28:29 +00:00
Sanjay Patel
001677094a [ARM] auto-generate complete test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371524 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:26:25 +00:00
Florian Hahn
13a4a210b4 [VectorUtils] Remove unused include. [NFC]
Patch by Francesco Petrogalli <francesco.petrogalli@arm.com>

Reviewers: fhahn

Reviewed By: fhahn

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371523 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:20:20 +00:00
David Zarzycki
82b62b61b6 [CMake] Don't pass all LLVM_COMPILE_FLAGS to the C compiler
GCC (unlike clang!) warns about C++ flags when compiling C.

https://reviews.llvm.org/D67171

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371521 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:19:52 +00:00
Djordje Todorovic
4964f4e3b1 [utils] Implement the llvm-locstats tool
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

The tool will be very useful for tracking improvements regarding the
"debugging optimized code" support with LLVM ecosystem.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371520 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:47:03 +00:00
Roman Lebedev
67231e14c5 [NFC][InstCombine] PR43251 - valid for other predicates too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371519 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:29:40 +00:00
Florian Hahn
06cb385e04 [InstCombine] Use SimplifyFMulInst to simplify multiply in fma.
This allows us to fold fma's that multiply with 0.0. Also, the
multiply by 1.0 case is handled there as well. The fneg/fabs cases
are not handled by SimplifyFMulInst, so we need to keep them.

Reviewers: spatel, anemet, lebedev.ri

Reviewed By: spatel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371518 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:10:28 +00:00
Florian Hahn
36f2c034a9 [InstCombine] Precommit tests for D67351.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371517 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:05:34 +00:00
Sanjay Patel
2a9f347230 [BreakFalseDeps] fix typos/grammar in documentation comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371516 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:00:31 +00:00
Martin Storsjo
c90d6a0b8b [Object] Implement relocation resolver for COFF ARM/ARM64
Adding testscases for this via llvm-dwarfdump.

Also add testcases for the existing resolver support for X86.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371515 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 12:31:40 +00:00
Haojian Wu
a0ae292f06 Fix the "git modified" issue on the preserve-comments-crlf.s.
Summary:
 rL371473 corrected the line ending (to crlf) in preserve-comments-crlf.s, but it causes a wired issue on git
 repository (I ran git pull today, it showed a local change of that file even I did not change anything).

Reviewers: gribozavr

Reviewed By: gribozavr

Subscribers: llvm-commits, cfe-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371513 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 12:17:49 +00:00
Guillaume Chatelet
f7db5e52ae [Alignment][NFC] Use llvm::Align for TargetLowering::getPrefLoopAlignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Reviewed By: courbet

Subscribers: wuzish, arsenm, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, MaskRay, jsji, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371511 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 12:00:43 +00:00
Igor Kudrin
9387344a36 Reland [DWARF] Add a unit test for DWARFUnit::getLength().
This is a follow-up of rL369529, where the return value of
DWARFUnit::getLength() was changed from uint32_t to uint64_t.
The test checks that a unit header with Length > 4G can be successfully
parsed and the value of the Length field is not truncated.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371510 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 11:54:32 +00:00
Alexander Timofeev
6235d9d3b6 [AMDGPU]: PHI Elimination hooks added for custom COPY insertion.
Reviewers: rampitec, vpykhtin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371508 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 10:58:57 +00:00
Dmitri Gribenko
be9f44f943 Revert "Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.""
This reverts commit r371502, it broke tests
(clang/test/CodeGenCXX/auto-var-init.cpp).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371507 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 10:39:09 +00:00
Djordje Todorovic
1b050aba65 [llvm-dwarfdump] Add additional stats fields
The additional fields will be parsed by the llvm-locstats tool in order to
produce more human readable output of the DWARF debug location quality
generated.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371506 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 10:37:28 +00:00
Igor Kudrin
5caea93ebd Revert "[DWARF] Add a unit test for DWARFUnit::getLength()" because it broke ASAN bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371505 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 10:17:48 +00:00
Clement Courbet
ad157ff59a [ExpandMemCmp] Add lit.local.cfg
To prevent AArch64 tests from running when the target is not compiled.

Fixes r371502:

/home/buildslave/ps4-buildslave4/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/Transforms/ExpandMemCmp/AArch64/memcmp.ll:11:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[S1:%.*]] to i64*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371503 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 10:00:15 +00:00
Clement Courbet
9f23a59130 Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."
With a fix for sanitizer breakage (see explanation in D60318).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371502 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 09:18:00 +00:00
Fangrui Song
e6608fd47d [yaml2obj] Set p_align to the maximum sh_addralign of contained sections
The address difference between two sections in a PT_LOAD is a constant.
Consider a hypothetical case (pagesize can be very small, say, 4).

```
.text     sh_addralign=4
.text.hot sh_addralign=16
```

If we set p_align to 4, the PT_LOAD will be loaded at an address which
is a multiple of 4. The address of .text.hot is guaranteed to be a
multiple of 4, but not necessarily a multiple of 16.

This patch deletes the constraint

  if (SHeader->sh_offset == PHeader.p_offset)

Reviewed By: grimar, jhenderson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371501 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 09:16:34 +00:00
Igor Kudrin
591903131e [DWARF] Add a unit test for DWARFUnit::getLength().
This is a follow-up of rL369529, where the return value of
DWARFUnit::getLength() was changed from uint32_t to uint64_t.
The test checks that a unit header with Length > 4G can be successfully
parsed and the value of the Length field is not truncated.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371499 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 09:03:24 +00:00
Guillaume Chatelet
008c0fc12c [Alignment] Use Align for TargetLowering::MinStackArgumentAlignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371498 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 09:01:18 +00:00
Craig Topper
9682de0176 [LegalizeTypes] Teach SoftenFloatOp_SELECT_CC to handle operand 2 or 3 being softened.
This can only happen on X86 when fp128 is a legal type, but we
go through softening to generate libcalls. This causes fp128 to
be softened to fp128 instead of an integer type. This can be
removed if D67128 lands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371493 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 07:56:02 +00:00
Nico Weber
c1ff64f88c gn build: Merge r371488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371489 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 06:31:59 +00:00