Commit Graph

127735 Commits

Author SHA1 Message Date
Jacques Pienaar
9a9aa40b09 [lanai] Add Lanai triple.
Add triple for the Lanai backend.

General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend".

Differential Revision: http://reviews.llvm.org/D17003



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260545 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 17:16:20 +00:00
Jun Bum Lim
7872a566bc Add a test case to show isKnownNonZero() returns correctly; NFC
Summary:
Added a test case just to make sure that isKnownNonZero() returns false
when we cannot guarantee that a ConstantExpr is a non-zero constant.

Reviewers: sanjoy, majnemer, mcrosier, nlewycky

Subscribers: nlewycky, mssimpso, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D16908

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260544 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 17:11:49 +00:00
Jun Bum Lim
307381b3a9 Fixed typo in r260530
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260541 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 16:46:13 +00:00
James Y Knight
5b06a939bd Add -match-full-lines argument to FileCheck.
This is useful for some tests where more-exact matching is useful, such
as clang's Preprocessor tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 16:46:09 +00:00
Hans Wennborg
b03ba0e6af Revert r260507: "[X86] Enable the LEA optimization pass by default."
This caused PR26575.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 16:44:06 +00:00
Jun Bum Lim
45279e6a90 [AArch64] Refactoring findMatchingStore() in aarch64-ldst-opt; NFC
Summary: This change makes findMatchingStore() follow the same coding style introduced in r260275.

Reviewers: gberry, junbuml

Subscribers: aemerson, rengolin, haicheng, bmakam, mssimpso

Differential Revision: http://reviews.llvm.org/D17083

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260534 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 16:18:24 +00:00
Jun Bum Lim
885a68b0cf [InstCombine] Simplify a known nonzero incoming value of PHI
Summary:
When a PHI is used only to be compared with zero, it is possible to replace an
incoming value with any non-zero constant if the incoming value can be proved as
a known nonzero value. For example, in below code, we can replace the incoming value %v with
any non-zero constant based on the fact that the PHI is only used to be compared with zero
and %v is a known non-zero value:
  %v = select %cond, 1, 2
  %p = phi [%v, BB] ...
  %c = icmp eq, %p, 0

Reviewers: mcrosier, jmolloy, sanjoy

Subscribers: hfinkel, mcrosier, majnemer, llvm-commits, haicheng, bmakam, mssimpso, gberry

Differential Revision: http://reviews.llvm.org/D16240

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260530 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 15:50:07 +00:00
Benjamin Kramer
a25f0be03b Drop the hidden visibility from DebugHandlerBase for now.
If a class has hidden visibility all derived classes and all classes
that have it as a member must have hidden visibility too. That may
be fixable here but requires changes to quite a lot of debug info
classes.

This is also one of the things that GCC enforces aggressively while
clang ignores it, making testing more annoying than necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260529 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 15:41:56 +00:00
Chad Rosier
ac5172baad [AArch64] Improve load/store optimizer to handle LDUR + LDR.
This patch allows the mixing of scaled and unscaled load/stores to form
load/store pairs.

This is a reapplication of r259812, which had an incorrect assert.  The
test_stur_str_no_assert() test is a reduced version of the issue hit in
the AArch64 self-host.

PR24465

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260523 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 14:25:08 +00:00
Scott Egerton
a63bae5730 [MC] Fixed parsing of macro arguments where expressions with spaces are present.
Summary:
Fixed an issue for mips with an instruction such as 'sdc1 $f1, 272 +8(a0)' which has a space between '272' and '+'. The parser would then parse '272' and '+8' as two arguments instead of a single expression resulting in one too many arguments in the pseudo instruction.
The reason that the test case has been changed is so that the expected
output matches the output of the GNU assembler.

Reviewers: vkalintiris, dsanders

Subscribers: dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D13592

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 13:48:49 +00:00
Artur Pilipenko
5880de50c1 Make context-sensitive isDereferenceable queries in isSafeToLoadUnconditionally
This is a part of the refactoring to unify isSafeToLoadUnconditionally and isDereferenceablePointer functions. In the subsequent change isSafeToSpeculativelyExecute will be modified to use isSafeToLoadUnconditionally instead of isDereferenceableAndAlignedPointer.   

Reviewed By: reames

Differential Revision: http://reviews.llvm.org/D16227


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 13:42:59 +00:00
Tamas Berghammer
e7f78979df Fix MSVC 2013 build after rL260504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260511 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 11:27:51 +00:00
Artur Pilipenko
1ea08bcb76 Don't propagate dereferenceable attribute through gc.relocate in InstCombine
Reviewed By: reames

Differential Revision: http://reviews.llvm.org/D16143


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 11:22:46 +00:00
Andrey Turetskiy
3dd618f0dc [X86] Enable the LEA optimization pass by default.
Differential Revision: http://reviews.llvm.org/D16877



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260507 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 10:51:26 +00:00
Ashutosh Nema
30082e800b Fixed typo in comment & coding style for LoopVersioningLICM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 09:23:53 +00:00
Craig Topper
7f53bedefc [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:29 +00:00
Craig Topper
a78623e3e8 [TableGen] Don't call emitSourceFileHeader a second time in the middle of the output file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260501 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:27 +00:00
Craig Topper
083ca64734 [TableGen] Whitespace cleanup in output file. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:25 +00:00
Craig Topper
269f2734b8 [TableGen] Simplify code slightly. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260499 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:22 +00:00
Simon Atanasyan
9fab895e0b [MC][ELF] Handle MIPS specific .sdata and .sbss directives
MIPS specific .sdata and .sbss directives create corresponding sections
with proper initialized ELF flags including ELF::SHF_MIPS_GPREL.

Differential Revision: http://reviews.llvm.org/D17001

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 06:45:54 +00:00
Matt Arsenault
d581c66591 AMDGPU: Fix constant bus use check with subregisters
If the two operands to an instruction were both
subregisters of the same super register, it would incorrectly
think this counted as the same constant bus use.

This fixes the verifier error in fmin_legacy.ll which
was missing -verify-machineinstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260495 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 06:15:39 +00:00
Matt Arsenault
33e18796f1 AMDGPU: Fix passes depending on dominator tree for no reason
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 06:15:34 +00:00
Matt Arsenault
fae18e933b AMDGPU: Remove some old intrinsic uses from tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 06:02:01 +00:00
Matt Arsenault
5911f21abb AMDGPU: Fix not handling new workitem intrinsics in DivergenceAnalysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 05:32:51 +00:00
Matt Arsenault
b49a0edca2 AMDGPU: Split R600 and SI store lowering
These were only sharing some somewhat incorrect
logic for when to scalarize or split vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 05:32:46 +00:00
Michael J. Spencer
9be04e4c36 [readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 04:59:53 +00:00
Michael J. Spencer
f8cdb803c2 [readobj] Handle ELF files with no section table or with no program headers.
This adds support for finding the dynamic table and dynamic symbol table via
the section table or the program header table. If there's no section table an
attempt is made to figure out the length of the dynamic symbol table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 04:59:45 +00:00
Michael J. Spencer
c2545ee719 [readobj] Move dynamic table parsing to a new function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 04:59:37 +00:00
Michael J. Spencer
71498d2261 [readobj] Sort switch by enum value.
Sort by enum value, but keep related entries adjacent. This makes it
easier to compare against documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 04:59:32 +00:00
Michael J. Spencer
7341f9694a [readobj] Parse sections before dynamic table.
NFC. This code will be expanded to handle dynamic tables that don't have a
PT_DYNAMIC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 04:59:26 +00:00
Hemant Kulkarni
8e2d778ca9 Fix const confusion while lambda function usage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 03:41:34 +00:00
Tom Stellard
4ea8ee7c76 [AMDGPU] Assembler: Fix VOP3 only instructions
Separate methods to convert parsed instructions to MCInst:

  - VOP3 only instructions (always create modifiers as operands in MCInst)
  - VOP2 instrunctions with modifiers (create modifiers as operands
    in MCInst when e64 encoding is forced or modifiers are parsed)
  - VOP2 instructions without modifiers (do not create modifiers
    as operands in MCInst)
  - Add VOP3Only flag. Pass HasMods flag to VOP3Common.
  - Simplify code that deals with modifiers (-1 is now same as
    0). This is no longer needed.
  - Add few tests (more will be added separately).
    Update error message now correct.

Patch By: Nikolay Haustov

Differential Revision: http://reviews.llvm.org/D16778

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 03:28:15 +00:00
Davide Italiano
e48f9ae77d [llvm-nm] Simplify code logic. Rewrite a single function an inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 02:56:02 +00:00
Quentin Colombet
30335031a5 [GlobalISel][MachineRegisterInfo] Add a method to create generic vregs.
For now, generic virtual registers will not have a register class. We may want
to change that. For instance, if we want to use all the methods from
TargetRegisterInfo with generic virtual registers, we need to either have some
sort of generic register classes that do what we want, or teach those methods
how to deal with nullptr register class.

Although the latter seems easy enough to do, we may still want to differenciate
generic register classes from nullptr to catch cases where nullptr gets
introduced by a bug of some sort.

Anyway, I will file a PR to keep track of that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260474 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 00:19:17 +00:00
Hemant Kulkarni
74be0c550d Fix build failure caused in r260430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 00:01:47 +00:00
Davide Italiano
1c4040b68f [llvm-nm] Minor style change. Prefer EXIT_SUCCESS over 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:56:18 +00:00
Teresa Johnson
4048cffec2 Fix Windows bot failure in Transforms/FunctionImport/funcimport.ll
Make sure we split ":" from the end of the global function id (which
is <path>:<function> for local functions) instead of the beginning to
avoid splitting at the wrong place for Windows file paths that contain
a ":".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260469 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:47:38 +00:00
Quentin Colombet
d3bd0e5e8b [GlobalISel] Remember the size of generic virtual registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260468 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:43:48 +00:00
Mehdi Amini
34b34e0d3e FunctionImport: add a progressive heuristic to limit importing too deep in the callgraph
The current function importer will walk the callgraph, importing
transitively any callee that is below the threshold. This can
lead to import very deep which is costly in compile time and not
necessarily beneficial as most of the inline would happen in
imported function and not necessarilly in user code.

The actual factor has been carefully chosen by flipping a coin ;)
Some tuning need to be done (just at the existing limiting threshold).

Reviewers: tejohnson

Differential Revision: http://reviews.llvm.org/D17082

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:31:45 +00:00
Hemant Kulkarni
156817cf0a Make llvm-nm test consistent with other tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260464 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:28:43 +00:00
Mehdi Amini
f1539bbfd8 Use a StringSet in Internalize, and allow to create the pass from an existing one (NFC)
There is not reason to pass an array of "char *" to rebuild a set if
the client already has one.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:24:31 +00:00
Mehdi Amini
0f2eb3b005 Add the ability to initialize a StringSet from a pair of iterators (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:24:21 +00:00
Davide Italiano
e1244044f3 [llvm-nm] Prefer range-based loop over explicit iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:16:17 +00:00
Mehdi Amini
f181d046e0 Add a new insert_as() method to DenseMap and use it for ConstantUniqueMap
Summary:
Just like the existing find_as() method, the new insert_as() accepts
an extra parameter which is used as a key to find the bucket in the
map.
When creating a Constant, we want to check the map before actually
creating the object. In this case we have to perform two queries to
the map, and this extra parameter can save recomputing the hash value
for the second query.

Reviewers: dexonsmith, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16268

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:07:29 +00:00
Quentin Colombet
de48097969 [CMake] Add a macro definition to detect if we are building GlobalISel:
LLVM_BUILD_GLOBAL_ISEL


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260457 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 23:00:57 +00:00
Quentin Colombet
f62b31051b [GlobalISel] More detailed skeleton for the IRTranslator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 22:59:27 +00:00
Mehdi Amini
5e9b7afcd9 Bitcode reader: replace DecodeChar6() with a lookup table (NFC)
Summary: Measured to be more performant when reading bitcode.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16285

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 22:47:48 +00:00
Mehdi Amini
4c69696279 Simplify handleOperandChangeImpl() removing last argument (NFC)
The Use argument was used to compute the operand number for a fast
path when replacing only one operand. However we always have to go
through all the operands. So the argument number can be recomputed
locally anyway.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 22:47:15 +00:00
Philip Reames
18fb862ea7 Follow up to 260439, Speculative fix to clang builders
It looks like clang has a couple of test cases which caught the fact LVI was not slightly more precise after 260439.  When looking at the failures, it struck me as wasteful to be querying nullness of a constant via LVI, so instead of tweaking the clang tests, let's just stop querying constants from this source.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 22:22:41 +00:00
Rong Xu
2465700839 [PGO] Make the number of records for each value site metada adjustable
The patch adds a parameter in annotateValueSite() to control the max number
of records written to the value profile meta data for each value site. The
default is kept as the current value of 3.

Differential Revision: http://reviews.llvm.org/D17084


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 22:19:43 +00:00