162261 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
a9d6d4cb72 [Hexagon] Implement TTI::shouldMaximizeVectorBandwidth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328648 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 18:10:47 +00:00
Stefan Pintilie
9470442c90 [Power9] Fix the resource list for the COPY instruction.
The COPY instruction was listed as a 4 cycle instruction.
It is now listed correctly as a 2 cycle ALU instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328647 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 17:51:53 +00:00
Pirama Arumuga Nainar
104b129474 Remap values in PromotedFloats
Summary: When a node is about to be erased from ReplacedValues, we should also remap its corresponding values in PromotedFloats.

Patch by Yan Luo (Yan.Luo2@synopsys.com)

Reviewers: pirama

Reviewed By: pirama

Subscribers: lebedev.ri, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328644 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 17:42:36 +00:00
Artur Pilipenko
22c5f7cb54 Fix a reoccuring typo in load-combine tests
%tmp = bitcast i32* %arg to i8*
   %tmp1 = getelementptr inbounds i8, i8* %tmp, i32 0
-  %tmp2 = load i8, i8* %tmp, align 1
+  %tmp2 = load i8, i8* %tmp1, align 1

This doesn't change the semantics of the tests but makes use of %tmp1 which was originally intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328642 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 17:33:50 +00:00
Krzysztof Parzyszek
24feab8919 [Hexagon] Rudimentary support for auto-vectorization for HVX
This implements a set of TTI functions that the loop vectorizer uses.
The only purpose of this is to enable testing. Auto-vectorization is
disabled by default, enabled by -hexagon-autohvx.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328639 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 17:07:52 +00:00
Rafael Auler
1560bf0343 [AArch64] Decorate AArch64 instrs with OPERAND_PCREL
Summary:
This is a canonical way to teach objdump to print the target
symbols for branches when disassembling AArch64 code.

Reviewers: evandro, t.p.northover, espindola

Reviewed By: t.p.northover

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328638 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 16:58:01 +00:00
Fedor Sergeev
558f76fb1d [NFC] OptPassGate extracted from OptBisect
Summary:
This is an NFC refactoring of the OptBisect class to split it into an optional pass gate interface used by LLVMContext and the Optional Pass Bisector (OptBisect) used for debugging of optional passes.

This refactoring is needed for D44464, which introduces setOptPassGate() method to allow implementations other than OptBisect.

Patch by Yevgeny Rouban.

Reviewers: andrew.w.kaylor, fedor.sergeev, vsk, dberlin, Eugene.Zelenko, reames, skatkov
Reviewed By: fedor.sergeev
Differential Revision: https://reviews.llvm.org/D44821

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328637 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 16:57:20 +00:00
Krzysztof Parzyszek
9273bb3570 Use .set instead of = when printing assignment in assembly output
On Hexagon "x = y" is a syntax used in most instructions, and is not
treated as a directive.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328635 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 16:44:41 +00:00
Krzysztof Parzyszek
4153b00c21 [LV] Add TTI::shouldMaximizeVectorBandwidth to allow enabling it per target
The default implementation returns false and keeps the current behavior.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328632 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 16:14:11 +00:00
Andrea Di Biagio
7395f4fb58 [llvm-mca] pass the correct set of used registers in checkRAT.
We were incorrectly initializing the array of used registers in method checkRAT.
As a consequence, the number of register file stalls was misreported.

Added a test to cover this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328629 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 15:23:41 +00:00
Simon Pilgrim
ff39c61111 [X86][Btver2] Add MMX_PMOVMSKBrr to MOVMSK scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328620 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 12:26:12 +00:00
Strahinja Petrovic
4ec907cc28 [PowerPC] Secure PLT support
This patch supports secure PLT mode for PowerPC 32 architecture.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328617 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 11:23:53 +00:00
Alexander Richardson
e0a5279318 [MIPS] Add static_assert that all Fixups are handled in getFixupKind
Summary:
I recently added a new Fixup kind to our fork of LLVM but forgot to add
it to the table in MipsAsmBackend.cpp. With this static_assert the error
would have been caught instead of zero-initializing the array entries for
the new fixups.

Reviewers: sdardis, atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328616 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 10:08:12 +00:00
Max Kazantsev
56b15eb6eb [LoopUnroll][NFC] Remove redundant canPeel check
We check `canPeel` twice: when evaluating the number of iterations to be peeled
and within the method `peelLoop` that performs peeling. This method is only
executed if the calculated peel count is positive. Thus, the check in `peelLoop` can
never fail. This patch replaces this check with an assert.

Differential Revision: https://reviews.llvm.org/D44919
Reviewed By: fhahn


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328615 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 09:40:51 +00:00
Sam Parker
0ba1cd85f0 [IRCE] Enable decreasing loops of non-const bound
As a follow-up to r328480, this updates the logic for the decreasing
safety checks in a similar manner:
- CanBeMax is replaced by CannotBeMaxInLoop which queries
  isLoopEntryGuardedByCond on the maximum value.
- SumCanReachMin is replaced by isSafeDecreasingBound which includes
  some logic from parseLoopStructure and, again, has been updated to
  use isLoopEntryGuardedByCond on the given bounds.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328613 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 08:24:53 +00:00
Max Kazantsev
0048092b9c [NFC] Fix comments in getExact()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328612 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 08:13:55 +00:00
Max Kazantsev
8f8f2fa4dd [SCEV] Make exact taken count calculation more optimistic
Currently, `getExact` fails if it sees two exit counts in different blocks. There is
no solid reason to do so, given that we only calculate exact non-taken count
for exiting blocks that dominate latch. Using this fact, we can simply take min
out of all exits of all blocks to get the exact taken count.

This patch makes the calculation more optimistic with enforcing our assumption
with asserts. It allows us to calculate exact backedge taken count in trivial loops
like

  for (int i = 0; i < 100; i++) {
    if (i > 50) break;
    . . .
  }

Differential Revision: https://reviews.llvm.org/D44676
Reviewed By: fhahn


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328611 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 07:30:38 +00:00
Max Kazantsev
10568deedd [SCEV] Add one more case in computeConstantDifference
This patch teaches `computeConstantDifference` handle calculation of constant
difference between `(X + C1)` and `(X + C2)` which is `(C2 - C1)`.

Differential Revision: https://reviews.llvm.org/D43759
Reviewed By: anna


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328609 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 04:54:00 +00:00
Craig Topper
fa067e8cb8 [MachineScheduler] Add itinerary to schedcover.py. Make default work in the command line filter
Summary:
This patch adds itinerary support to the schedcover.py script. I've been trying to use this script to figure out why SSE and AVX instructions are ending up in separate tablegen scheduler classes and sometimes its because we are using different itineraries.

Rather than using None to indicate the default scheduler model, I now use the string "default". I had to hack around the sorting a little to keep "default" at the beginning. But this also makes it so you can specify "default" on the command line to just get the defaults

I also fixed the regular expression code so that the no_default wasn't evaluated twice.

Reviewers: RKSimon, atrick, jmolloy, javed.absar

Reviewed By: javed.absar

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328608 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 04:26:39 +00:00
Mircea Trofin
7348dc2750 Revert "Revert "[lit] Generalized /dev/null support on Windows.""
Summary:
This reverts commit r328596.

Checking if the arguments are strings before testing if they contain "/dev/null".

Reviewers: rnk

Reviewed By: rnk

Subscribers: delcypher, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328603 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 01:39:17 +00:00
Sanjay Patel
678a72e748 [x86] add RUN for target before roundss; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328601 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 00:32:19 +00:00
Jan Korous
771829b640 [lit] Temporarily disable shtest-timeout.py on darwin
Disabled until fixed in order to avoid random failures on green dragon.

rdar://problem/38774530

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328598 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-27 00:16:28 +00:00
Mircea Trofin
35e080b536 Revert "[lit] Generalized /dev/null support on Windows."
This reverts commit ca7fdbb974384ce5a05528b22a41d46b1cc13e92.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328596 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 23:59:39 +00:00
David Blaikie
22f6baa132 Add a build dependency from libMC to libDebugInfoCodeView to match the reality of header dependencies here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328595 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 23:48:52 +00:00
David Blaikie
1d4a167c65 Move CVDebugRecord from CodeView to Object to fix layering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328593 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 23:37:02 +00:00
Sanjay Patel
8fd84ebcf3 [x86] add tests for ftrunc; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328592 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 23:18:32 +00:00
Aaron Smith
2b889957ee [DebugInfoPDB] Print the method name along with the variant value
Before this change, using dumpProperties() with PDBSymbolData
would look like this:

  get_locationType: 3
  1

After this change:

  get_locationType: 3
  get_value: 1



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328590 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 22:53:38 +00:00
Mircea Trofin
ca7fdbb974 [lit] Generalized /dev/null support on Windows.
Generalized /dev/null remapping on Windows, and added test.

Reviewers: rnk

Reviewed By: rnk

Subscribers: amccarth, zturner, delcypher, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328589 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 22:41:06 +00:00
Aaron Smith
28ec98c907 [DebugInfoPDB] Add methods to get the compiland and line numbers with PDBSymbolData
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328587 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 22:17:12 +00:00
Aaron Smith
f975bab62f [DebugInfoPDB] Add DIA implementation of findLineNumbersByRVA
This method is used to find line numbers for PDBSymbolData
that have an invalid virtual address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328586 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 22:13:22 +00:00
Aaron Smith
af0c1412d9 [DebugInfoPDB] Add DIA implementation of addressForVA and addressForRVA
These are used in finding line numbers for PDBSymbolData


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328585 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 22:10:02 +00:00
Simon Pilgrim
aa18302e4f Fix newlines. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328583 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 21:07:59 +00:00
Simon Pilgrim
b72ac7e9e8 [X86] Add WriteCRC32 scheduler class
Currently CRC32 instructions use the WriteFAdd class, this patch splits them off into their own, at the moment it is still mostly just a duplicate of WriteFAdd but it can now be tweaked on a target by target basis.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328582 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 21:06:14 +00:00
Rafael Espindola
f9941d3c0d Use local symbols for creating .stack-size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328581 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 20:40:22 +00:00
Reid Kleckner
13e4ac0111 Fix go bindings test when using goma distributed build tool
Goma[1] is a distributed build system similar to distcc and icecc
primarily used to compile Chromium. The client is open source, and
hopefully soon the server will be as well. The intended usage model is
similar to most distributed build systems: prefix gomacc onto your
compiler command line, and it transparently distributes compilation.

The go lit config wants to determine the host compiler binary, so it
needs some extra logic to avoid looking at these prefixes.

[1] https://chromium.googlesource.com/infra/goma/client/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328580 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 20:19:14 +00:00
Paul Robinson
c7df4e42af Use correct format specifier.
Review comment on r328235 by James Henderson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328578 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 19:55:01 +00:00
Eli Friedman
b972acbf78 [MemorySSA] Fix exponential compile-time updating MemorySSA.
MemorySSAUpdater::getPreviousDefRecursive is a recursive algorithm, for
each block, it computes the previous definition for each predecessor,
then takes those definitions and combines them. But currently it doesn't
remember results which it already computed; this means it can visit the
same block multiple times, which adds up to exponential time overall.

To fix this, this patch adds a cache. If we computed the result for a
block already, we don't need to visit it again because we'll come up
with the same result. Well, unless we RAUW a MemoryPHI; in that case,
the TrackingVH will be updated automatically.

This matches the original source paper for this algorithm.

The testcase isn't really a test for the bug, but it adds coverage for
the case where tryRemoveTrivialPhi erases an existing PHI node. (It's
hard to write a good regression test for a performance issue.)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328577 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 19:52:54 +00:00
Krzysztof Parzyszek
cc9e41f605 [Hexagon] Assertion failure in HexagonSubtarget.cpp
In restoreLatency, replace range-for loop with std::find.

Patch by Jyotsna Verma.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328574 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 19:04:58 +00:00
Simon Pilgrim
ac9701c363 [X86][Btver2] Add (U)COMISD/(U)COMISD scheduler costs
Account for the "+i" integer pipe transfer cost (1cy use of JALU0 for GPR PRF write)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328573 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 19:01:06 +00:00
Haicheng Wu
648a6091ec [SLP] Add more checks to a test case. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328572 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:59:28 +00:00
Reid Kleckner
ff1d4d27d7 [X86] Fix Windows i1 zeroext conventions to use i8 instead of i32
Summary:
Re-lands r328386 and r328443, reverting r328482.

Incorporates fixes from @mstorsjo in D44876 (thanks!) so that small
parameters in i8 and i16 do not end up in the SysV register parameters
(EDI, ESI, etc).

I added tests for how we receive small parameters, since that is the
important part. It's always safe to store more bytes than will be read,
but the assumptions you make when loading them are what really matter.

I also tested this by self-hosting clang and it passed tests on win64.

Reviewers: mstorsjo, hans

Subscribers: hiraditya, mstorsjo, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328570 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:49:48 +00:00
Simon Pilgrim
33b38a21e8 [X86] Add WriteBitScan/WriteLZCNT/WriteTZCNT/WritePOPCNT scheduler classes (PR36881)
Give the bit count instructions their own scheduler classes instead of forcing them into existing classes.

These were mostly overridden anyway, but I had to add in costs from Agner for silvermont and znver1 and the Fam16h SoG for btver2 (Jaguar).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328566 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:19:28 +00:00
David Blaikie
a9c6c33abc Remove unused file, ExecutionEngine/MCJIT/ObjectBuffer.h
This header also wasn't self contained/modular - but with no users, it
didn't seem worth fixing because it'd break so easily again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328565 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:10:31 +00:00
Mandeep Singh Grang
61e5f25ff1 [XCore] Change std::sort to llvm::sort in response to r327219
Summary:
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.

To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.

Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in D44363 for a list of all the required patches.

Reviewers: dblaikie, RKSimon, robertlytton

Reviewed By: robertlytton

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328564 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:08:26 +00:00
Reid Kleckner
d15fdc63fa [lit] Implement 'cat' command for internal shell
Fixes PR36449

Patch by Chamal de Silva

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328563 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:05:12 +00:00
Zachary Turner
01931073eb Delete pdbutil diff mode.
This has been made obsolete by the fact that almost all of the
things it previously checked for are no longer relevant since
we can just compare bytes in a lot of places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328562 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 18:01:07 +00:00
Krzysztof Parzyszek
03a0661f60 [Hexagon] Add more lit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328561 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 17:53:48 +00:00
Sanjay Patel
99cf6a153e [InstCombine] improve code comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328560 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 17:52:02 +00:00
Lei Huang
ae98859fc1 [Power9]Legalize and emit code for quad-precision convert from double-precision
Legalize and emit code for quad-precision floating point operation xscvdpqp
and add option to guard the quad precision operation support.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328558 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 17:46:25 +00:00
Stefan Pintilie
ba5863e984 [PowerPC] Infrastructure work. Implement getting the opcode for a spill in one place.
A new function getOpcodeForSpill should now be the only place to get
the opcode for a given spilled register.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328556 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-26 17:39:18 +00:00