Commit Graph

157261 Commits

Author SHA1 Message Date
Paul Robinson
1f7a128eba Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318861 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 18:39:26 +00:00
Peter Collingbourne
d159fdd448 CachePruning: Allow limiting the number of files in the cache directory.
The default limit is 1000000 but it can be configured with a cache
policy. The motivation is that some filesystems (notably ext4) have
a limit on the number of files that can be contained in a directory
(separate from the inode limit).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318857 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 18:27:31 +00:00
Paul Robinson
6d6a4920f5 [DwarfDump] -debug-line=offset applies to .dwo too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318856 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 18:23:55 +00:00
Craig Topper
22c5379cd1 [X86] Spell penryn correctly in some comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318855 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 18:23:40 +00:00
Yaxun Liu
ac77244cc8 [AMDGPU] Fix SITargetLowering::LowerCall for pointer info of byval argument
SITargetLowering::LowerCall uses dummy pointer info for byval argument, which causes
flat load instead of buffer load.

This patch fixes that.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318844 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 16:13:35 +00:00
Paul Robinson
e8850416f6 [DebugInfo] Dump a .debug_line section, including line-number program,
without any compile units.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318842 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 15:48:30 +00:00
Dmitry Preobrazhensky
6d338d1025 [AMDGPU][mc][tests] Updated generated lit tests for GFX8/9
Summary:
Added tests to better cover features introduced by commit rL318675.
See http://llvm.org/viewvc/llvm-project?view=revision&revision=318675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318841 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 15:47:27 +00:00
Paul Robinson
229c3418bc [DWARFv5] Support DW_FORM_strp in the .debug_line.dwo header.
As a side effect, the .debug_line section will be dumped in physical
order, rather than in the order that compile units refer to their
associated portions of the .debug_line section.  These are probably
always the same order anyway, and no tests noticed the difference.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318839 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 15:33:17 +00:00
Paul Robinson
a513cc4aa1 [DWARF] Fix handling of extended line-number opcodes
Differential Revision: https://reviews.llvm.org/D40200

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318838 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 15:14:49 +00:00
Nicolai Haehnle
72bc6f1e39 AMDGPU: Consider memory dependencies with moved instructions in SILoadStoreOptimizer
Summary:
This bug seems to have gone unnoticed because critical cases with LDS
instructions are eliminated by the peephole optimizer.

However, equivalent situations arise with buffer loads and stores
as well, so this fixes regressions since r317751 ("AMDGPU: Merge
S_BUFFER_LOAD_DWORD_IMM into x2, x4").

Fixes at least:
KHR-GL45.shader_storage_buffer_object.basic-operations-case1-cs
KHR-GL45.cull_distance.functional
piglit tes-input-gl_ClipDistance.shader_test
... and probably more

Change-Id: I0e371536288eb8e6afeaa241a185266fd45d129d

Reviewers: arsenm, mareko, rampitec

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 12:25:21 +00:00
Jonas Paulsson
249b36857b [DAGCombiner] Bugfix in isAlias().
Since i1 is a legal type, this:

  NumBytes = Op1->getMemoryVT().getSizeInBits() >> 3;

is wrong and should be instead

  NumBytes = Op0->getMemoryVT().getStoreSize();

There seems to be more places where this should be fixed outside DAGCombiner.

Review: Hal Finkel
https://bugs.llvm.org/show_bug.cgi?id=35366

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 08:58:30 +00:00
Craig Topper
5698a7a1d6 [X86] Add an X86ISD::MSCATTER node for consistency with the X86ISD::MGATHER.
This makes the fact that X86 needs an explicit mask output not part of the type constraint for the ISD::MSCATTER.

This also gives the X86ISD::MGATHER/MSCATTER nodes a common base class simplifying the address selection code in X86ISelDAGToDAG.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318823 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 08:10:54 +00:00
George Rimar
808577ca74 [llvm-tblgen] - Stop using std::string in RecordKeeper.
RecordKeeper::getDef() is a hot place, it shows up in profiling
and it creates std::string instance for each search in RecordMap
though RecordKeeper::RecordMap can use StringRef as a key
instead to avoid that. Patch do that change.

Differential revision: https://reviews.llvm.org/D40170

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 07:53:48 +00:00
Craig Topper
fa5b169130 [X86] Lower all ISD::MGATHER nodes to X86ISD:MGATHER.
Now we consistently represent the mask result without relying on isel ignoring it.

We now have a more general SDNode and type constraints to represent these nodes in isel patterns. This allows us to present both both vXi1 and XMM/YMM mask types with a single set of constraints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318821 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 07:11:03 +00:00
Craig Topper
4b9371c251 [SelectionDAG] Add a isel matcher op to check the type of node results other than result 0.
I plan to use this to check the type of the mask result of masked gathers in the X86 backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318820 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 07:11:01 +00:00
Max Kazantsev
f66b47b328 [SCEV] Strengthen variance condition in calculateLoopDisposition
Given loops `L1` and `L2` with AddRecs `AR1` and `AR2` varying in them respectively.
When identifying loop disposition of `AR2` w.r.t. `L1`, we only say that it is varying if
`L1` contains `L2`. But there is also a possible situation where `L1` and `L2` are
consecutive sibling loops within the parent loop. In this case, `AR2` is also varying
w.r.t. `L1`, but we don't correctly identify it.

It can lead, for exaple, to attempt of incorrect folding. Consider:
  AR1 = {a,+,b}<L1>
  AR2 = {c,+,d}<L2>
  EXAR2 = sext(AR1)
  MUL = mul AR1, EXAR2
If we incorrectly assume that `EXAR2` is invariant w.r.t. `L1`, we can end up trying to
construct something like: `{a * {c,+,d}<L2>,+,b * {c,+,d}<L2>}<L1>`, which is incorrect
because `AR2` is not available on entrance of `L1`.

Both situations "`L1` contains `L2`" and "`L1` preceeds sibling loop `L2`" can be handled
with one check: "header of `L1` dominates header of `L2`". This patch replaces the old
insufficient check with this one.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318819 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 06:21:39 +00:00
Davide Italiano
882fbe3d4c [SCCP] Pick the right lattice value for constants.
After the dataflow algorithm proves that an argument is constant,
it replaces it value with the integer constant and drops the lattice
value associated to the DEF.

e.g. in the example we have @f() that's called twice:
call @f(undef, ...)
call @f(2, ...)

`undef` MEET 2 = 2 so we replace the argument and all its uses with
the constant 2.

Shortly after, tryToReplaceWithConstantRange() tries to get the lattice
value for the argument we just replaced, causing an assertion.
This function is a little peculiar as it runs when we're doing replacement
and not as part of the solver but still queries the solver.

The fix is that of checking whether we replaced the value already and
get a temporary lattice value for the constant.

Thanks to Zhendong Su for the report!

Fixes PR35357.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318817 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 03:04:55 +00:00
Craig Topper
bb324a11f8 [X86] Move the information about the feature bits used by compiler-rt and shared by Host.cpp to a .def file and TargetParser.h so clang can make use of it.
Since we keep Host.cpp and compiler-rt relatively in sync, clang can use this information as a proxy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318814 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 23:36:42 +00:00
Krzysztof Parzyszek
dbf2cce7ab [Hexagon] Add HexagonSubtarget::getVectorLength()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318807 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 22:13:16 +00:00
Peter Collingbourne
93e2dfd1c0 Object: Improve COFF irsymtab comdat representation.
Change the representation of COFF comdats so that a COFF linker
is able to accurately resolve comdats between IR and native object
files. Specifically, apply name mangling to comdat names consistently
with native object files, and do not export comdats with an internal
leader because they do not affect symbol resolution.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318805 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 22:06:20 +00:00
Evandro Menezes
8304ff28f1 [TableGen] Improve error reporting
When searching for a resource unit, use the reference location instead of
the definition location in case of an error.

Differential revision: https://reviews.llvm.org/D40263

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318803 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 21:33:52 +00:00
Krzysztof Parzyszek
c3a6d30355 [Hexagon] Make sure that RDF does not remove EH_LABELs
Since EH_LABELs (and other labels) no longer have "side-effects", they
should be checked for separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318801 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 21:05:51 +00:00
Craig Topper
bc4487d11b [X86] Allow vpclmulqdq instructions to be commuted during isel to allow load folding.
The commuting patterns for the AVX version actually still had priority over the new patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318800 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 21:05:21 +00:00
Craig Topper
8bf63c0132 [X86] Add BITALG, VAES, VBMI2, VNNI, VPCLMULQDQ, and VPOPCNTDQ instructions to icelake CPU.
This is based on table 1-1 of the October 2017 revision of Intel® Architecture Instruction Set Extensions and Future Features Programming Reference

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318799 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 21:05:18 +00:00
Nirav Dave
d35da7d92b Avoid unecessary opsize byte in segment move to memory
Segment moves to memory are always 16-bit. Remove invalid 32 and 64
bit variants.

Recommiting with missing clang inline assembly test change.

Fixes PR34478.

Reviewers: rnk, craig.topper

Subscribers: llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 19:28:13 +00:00
Craig Topper
063a34cd40 [X86] Sort bits in getHostCPUFeatures again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318792 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 18:50:41 +00:00
Chad Rosier
83ff5e44f4 [AArch64] Mark mrs of TPIDR_EL0 (thread pointer) as *having* side effects.
This partially reverts r298851.  The the underlying issue is that we don't
currently model the dependency between mrs (read system register) and
msr (write system register) instructions.

Something like the below should never be reordered:

 msr TPIDR_EL0, x0  ;; set thread pointer
 mrs x8, TPIDR_EL0  ;; read thread pointer

but was being reordered after r298851.  The functional part of the patch
that wasn't reverted needed to remain in place in order to not break
r299462.

PR35317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 18:08:34 +00:00
Hans Wennborg
a5579c645a Fix r318786
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318787 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 18:00:01 +00:00
Nuno Lopes
c4d4e4220d removed unused private method decl. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 17:53:19 +00:00
Hans Wennborg
05ebb04b0c Rename test/Transforms/CountingFunctionInserter -> EntryExitInstrumenter
The pass was renamed in r318195.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318784 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 17:22:19 +00:00
Hans Wennborg
11764345cd EntryExitInstrumenter: support __cyg_profile_func_enter_bare
It works just like __cyg_profile_func_enter but takes no arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318783 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 17:22:19 +00:00
Oliver Stannard
36acc9a9f4 [ARM] Remove pre-UAL FLDM/FSTM aliases
These are pre-UAL syntax, and we don't support any other pre-UAL instructions,
with the exception of FLDMX/FSTMX, which don't have a UAL equivalent. Therefore
there's no reason to keep them or their AsmParser hacks around.

With the AsmParser hacks removed, the FLDMX and FSTMX instructions get the same
operand diagnostics as the UAL instructions.

Differential revision: https://reviews.llvm.org/D39196



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318777 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 16:20:25 +00:00
Alina Sbirlea
a694e228c2 Add MemorySSA as loop dependency, disabled by default [NFC].
Summary:
First step in adding MemorySSA as dependency for loop pass manager.
Adding the dependency under a flag.

New pass manager: MSSA pointer in LoopStandardAnalysisResults can be null.
Legacy and new pass manager: Use cl::opt EnableMSSALoopDependency. Disabled by default.

Reviewers: sanjoy, davide, gberry

Subscribers: mehdi_amini, Prazek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318772 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:45:46 +00:00
Oliver Stannard
14544e6ee7 [ARM] Don't omit non-default predication code
This was causing the (invalid) predicated versions of the NEON VRINTX and
VRINTZ instructions to be accepted, with the condition code being ignored.

Also, there is no NEON VRINTR instruction, so that part of the check was not
necessary.

Differential revision: https://reviews.llvm.org/D39193



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318771 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:34:15 +00:00
Oliver Stannard
252ae7370a [Asm] Improve "too few operands" errors
- We can still emit this error if the actual instruction has two or more
  operands missing compared to the expected one.
- We should only emit this error once per instruction.

Differential revision: https://reviews.llvm.org/D36746



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318770 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:16:50 +00:00
Oliver Stannard
175246cb2c [Asm] Finish matching once end of formal and actual lists reached (NFC)
This is NFC, as the matcher would continue looping up to the maximum
number of operands with no effect, but this should improve performance a
bit, and makes the debug trace clearer.

Differential revision: https://reviews.llvm.org/D36744



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318769 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:12:05 +00:00
Sander de Smalen
b181279f89 Revert r318759 due to make check-all failure on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318768 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:07:43 +00:00
Oliver Stannard
3149db1b8c [ARM] Add diagnostics for SPR/DPR lists
Differential revision: https://reviews.llvm.org/D39195



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:06:01 +00:00
Alexey Bataev
a010e1809c [InstCombine] Test for PR35354: unable to vectorize loop with std::max
on floats, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 14:49:13 +00:00
Sam Kolton
61f91c55c9 [AMDGPU] SDWA: remove omod src operand for VOP2b instructions
Summary: VOP2b instructions (v_subbrev_u32, v_add_i32 ...) shouldn't support OMod operand in SDWA encoding

Reviewers: rampitec, dp

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318761 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 14:11:59 +00:00
Alex Bradbury
d0f69295c9 [RISCV][NFC] Remove unnecessary {} around single statement if block
Almost too trivial to worry about, but it seems worth having consistency with
upcoming commits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318760 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 12:41:41 +00:00
Sander de Smalen
4f7355afcd [TableGen] AsmMatcher: Fix bug with reported diagnostic for operand.
Summary:
The generated diagnostic by the AsmMatcher isn't always applicable to the AsmOperand.

This is because the code will only update the diagnostic if it is more specific than the previous diagnostic. However, when having validated operands and 'moved on' to a next operand (for some instruction/alias for which all previous operands are valid), if the diagnostic is InvalidOperand, than that should be set as the diagnostic, not the more specific message about a previous operand for some other instruction/alias candidate.

Reviewers: craig.topper, olista01, rengolin, stoklund

Reviewed By: olista01

Subscribers: javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318759 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 12:26:06 +00:00
Simon Pilgrim
4ef99ab683 [X86][XOP] Add missing scheduler classes to XOP instructions
All match equivalent basic classes (WritePHAdd, WriteFAdd etc.) according to both the AMD 15h SOG and Agner's tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318758 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 12:02:18 +00:00
Alex Bradbury
906bf03f28 [RISCV][NFC] Clean up RISCVDAGToDAGISel::Select
As pointed out in post-commit review of r318738, `return ReplaceNode(..)` when 
both ReplaceNode and the current function return void is confusing. This patch 
moves to using a more obvious early return, and moves to just using an if to 
catch the one case we currently care about. A future patch that adds further 
custom instruction selection can introduce a switch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318757 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 12:00:19 +00:00
Martell Malone
5bc846a955 [ARM] Use SEH exceptions on thumbv7-windows
Reviewers: mstorsjo

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318756 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 11:30:20 +00:00
Simon Pilgrim
6f46cf274f [X86][LWP] Add missing LWP itinerary class to lwpins instructions
It's on all other LWP instruction but I missed it from lwpins, despite similar scheduling behaviour. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318751 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 11:17:11 +00:00
Eugene Leviant
ec5c18ff12 [MI scheduler] Fix VADD and VSUB in cortex-a57 model
This patch fixes instregex for interger vector add/sub instructions

Differential revision: https://reviews.llvm.org/D40254


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318749 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 11:01:28 +00:00
Coby Tayree
09a18aac31 [x86][icelake]BITALG
vpopcnt{b,w}
Differential Revision: https://reviews.llvm.org/D40213



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318748 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 10:32:42 +00:00
Diana Picus
c8436a52c0 [ARM GlobalISel] Add comment for r318398. NFC.
Mention the purpose of the BICri tests added by r318398, as requested in
post-commit review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318747 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 10:17:02 +00:00
Coby Tayree
b9468385f3 [x86][icelake]VNNI
Introducing Vector Neural Network Instructions, consisting of:
vpdpbusd{s}
vpdpwssd{s}
Differential Revision: https://reviews.llvm.org/D40208


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318746 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 10:04:28 +00:00