Commit Graph

127735 Commits

Author SHA1 Message Date
Craig Topper
33543a37a7 [TableGen] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260928 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 02:48:30 +00:00
Vedant Kumar
7e9bf0962b Simplify users of StringRef::{l,r}trim (NFC)
r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260926 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 02:06:01 +00:00
Vedant Kumar
9ae3e2ceaa [ADT] Add StringRef::{l,r}trim(char) overloads (NFC)
Add support for trimming a single kind of character from a StringRef.
This makes the common case of trimming null bytes much neater. It's also
probably a bit speedier too, since it avoids creating a std::bitset in
find_{first,last}_not_of.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260925 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 01:48:39 +00:00
Quentin Colombet
071210eedd [GlobalISel][IRTranslator] Override getPassName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260924 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 01:38:09 +00:00
Quentin Colombet
849184df82 [GlobalISel] Add missing file in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260923 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 01:05:16 +00:00
Quentin Colombet
30880b6d80 [GlobalISel] Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260922 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 00:57:44 +00:00
Amaury Sechet
89e84d7221 Deprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr
Summary: The name is confusing as it matche another method on the module.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260920 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 00:23:52 +00:00
Amaury Sechet
d0aed13e56 Kill LLVMAddTargetData
Summary: It's red, it's dead.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits, axw

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 00:22:02 +00:00
NAKAMURA Takumi
d964cf3e68 MITests: Update libdeps. llvm/Target/TargetOptions.h depends on MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260918 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 00:17:56 +00:00
Zia Ansari
5ed116b04b Implemented stack symbol table ordering/packing optimization to improve data locality and code size from SP/FP offset encoding.
Differential Revision: http://reviews.llvm.org/D15393



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260917 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 23:44:13 +00:00
Amaury Sechet
ab96d57a0b Rename LLVMSetDataLayout's argument to match what they stand for
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 23:40:06 +00:00
Matthias Braun
5cdb7d1d3d unittests/MI: Add Core library reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260915 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 22:09:38 +00:00
Matthias Braun
5f33f2da6d SmallPtrSet: Avoid initializing Array in the small case.
This patch avoids the initial memset at the cost of making iterators
slightly more complex. This should be beneficial as most SmallPtrSets
hold no or only a few elements, while iterating over them is less
common.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 21:38:42 +00:00
Matthias Braun
294f6d04dd APInt: Slightly simplify countLeadingZerosSlowCase()
We always clear the unused bits in the most signifant word so there is
no need to mask them out in countLeadingZerosSlowCase().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260911 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 20:06:22 +00:00
Matthias Braun
17946378fd APInt: Further simplify APInt::EqualSlowCase as suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260910 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 20:06:19 +00:00
Ahmed Bougacha
f3164718c6 [X86] Remove now-dead variable and redundant assert. NFC.
The variable was made dead in NDEBUG by r260901, but the assert
was redundant anyway: get rid of both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 19:32:54 +00:00
Matthias Braun
1ff5bf6bbb Fix typo in LiveIntervalTest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 19:30:11 +00:00
Matthias Braun
372250bdfb LiveIntervalAnalysis: Support moving of subregister defs in handleMove
This is an updated version which fixes a bug that happened with
uses tied to an earlyclobber operand which end at an unusual slotindex.

If two definitions write to independent subregisters then they can be
put in any order. LiveIntervalAnalysis::handleMove() did not support
this previously because it looks like moving a definition of a vreg past
another one.

This is a modified version of a patch proposed (two years ago) by
Vincent Lejeune! This version does not touch the read-undef flags and is
extended for the case of moving a subregister def behind all uses - this
can happen for subregister defs that are completely unused.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260906 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 19:25:36 +00:00
Matthias Braun
d9ede1ac1f Add unittest for LiveIntervalAnalysis::handleMove()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260905 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 19:25:34 +00:00
Matthias Braun
2168cf4b1b MachineVerifier: Add parameter to choose if MachineFunction::verify() aborts
The abort on error behaviour is unpractical for debugger and unittest
usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 19:25:31 +00:00
Colin LeMahieu
c0ad5e2e57 [NFC] Fixing naming convention, lowercase start of function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 18:47:55 +00:00
Colin LeMahieu
5559f929ce [Hexagon] Wrapping all MCExprs inside MCOperands within HexagonMCExpr to simplify handling and allow flags on the expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 18:42:07 +00:00
Ahmed Bougacha
606927f7bb [CodeGen] Document and use getConstant's splat-building feature. NFC.
Differential Revision: http://reviews.llvm.org/D17229

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260901 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 18:07:29 +00:00
Simon Pilgrim
2367de18f3 [X86][SSE2] Regenerated sse2 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 17:57:40 +00:00
Jonas Paulsson
d7ffe9a12e [ScheduleDAGInstrs] isUnsafeMemoryObject() removed
This function was basically useless, since volatile memacesses or MIs with
unmodelled sideffects become global memory objects, and the other little
checks are also done elsewhere.

Reviewed by Andy Trick
http://reviews.llvm.org/D16881

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 16:43:15 +00:00
Krzysztof Parzyszek
aec17f6b38 [Hexagon] Missed testcase update in r260895
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 16:15:02 +00:00
Scott Egerton
4f17f73d87 [mips] Implemented the .hword directive.
Summary:
In order to pass the tests, this required marking R_MIPS_16 relocations
as needing to point to the symbol and not the section.

Reviewers: vkalintiris, dsanders

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260896 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 16:11:51 +00:00
Krzysztof Parzyszek
5e17ebd723 [Hexagon] Use zero-extending loads for anyext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 16:01:01 +00:00
Silviu Baranga
23340531a1 [LV] Add support for insertelt/extractelt processing during type truncation
Summary:
While shrinking types according to the required bits, we can
encounter insert/extract element instructions. This will cause us to
reach an llvm_unreachable statement.

This change adds support for truncating insert/extract element
operations, and adds a regression test.

Reviewers: jmolloy

Subscribers: mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 15:38:17 +00:00
Roman Gareev
78d3a49fad Tweak the LICM code to reuse the first sub-loop instead of creating a new one
LICM starts with an *empty* AST, and then merges in each sub-loop. While the
add code is appropriate for sub-loop 2 and up, it's utterly unnecessary for
sub-loop 1. If the AST starts off empty, we can just clone/move the contents
of the subloop into the containing AST.

Reviewed-by: Philip Reames <listmail@philipreames.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 14:48:50 +00:00
Simon Pilgrim
6cde049097 [X86] More thorough partial-register division checks
For when grep counts are just not enough...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 14:09:35 +00:00
Simon Pilgrim
f1de1fab94 [X86] Regenerated 64/128 bit multiply tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 14:04:05 +00:00
Simon Pilgrim
b5a2cb5b20 [X86][SSE] More thorough testing of all-ones vectors re-materialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260889 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 13:50:48 +00:00
Simon Pilgrim
2ad8deec9c [X86][SSE] Regenerated uint2fp special case tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 13:41:41 +00:00
NAKAMURA Takumi
a8f262c12e Make llvm/test/tools/llvm-symbolizer/pdb/pdb.test Py3-compatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260887 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 13:19:13 +00:00
Simon Pilgrim
a6e564a058 [X86][SSE] Regenerated fast isel intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 12:32:16 +00:00
Scott Egerton
894a6f0e19 Reverted r260879 as it caused test failures in lld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260880 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 10:04:38 +00:00
Scott Egerton
77405b1467 [mips] Removed the SHF_ALLOC flag from the .pdr section.
Summary:
This section is used for debug information and has no need to be
in memory at runtime. With this patch, LLVM now emits the same flags as 
the GNU assembler. This patch also fixes an error when compiling 
the Linux kernel, The error is that there are relocations within the 
.pdr section in a VDSO.

Reviewers: vkalintiris, dsanders

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260879 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 09:34:15 +00:00
Igor Breger
0dd3e9d55e AVX512: Change store size of kmask. Store size of v8i1, v4i1 , v2i1 and i1 are changed to 16 bits.
If KMOVB not supported (require AVX512DQ) only KMOVW can be used so store size should be 2 bytes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 08:25:28 +00:00
Junmo Park
c7b710ea8f Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15 04:30:37 +00:00
Sylvestre Ledru
3c5ec72fb6 Fix some typos in the llvm doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 20:16:22 +00:00
Simon Pilgrim
71895b613a [X86][AVX] Fixed copy+paste typo in shuffle test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260852 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 18:11:52 +00:00
Amaury Sechet
6a26a01259 Use report_fatal_error more consistently in the C API echo test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 10:06:34 +00:00
Amaury Sechet
1ca39a4149 Get constant cloning out of CloneValue so it can be used when creating globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 09:30:42 +00:00
Amaury Sechet
6e0e354551 Move clone_params around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 09:14:30 +00:00
Amaury Sechet
a1d1faf8dd Fix star alignment in Core.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 08:58:49 +00:00
Craig Topper
487820cc86 [TableGen] Remove constant string argument from a method that's only called once. We can just hardcode the string inside. There already other things that make the method not reusable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 05:22:01 +00:00
Chandler Carruth
6f603acaaa [PM/AA] Wire BasicAA's new pass manager class up to the pass registry.
This ensures that all of the various pieces are working. The next patch
will wire up commandline-driven alias analysis chain building and allow
BasicAA to work with the AAManager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260838 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 23:46:24 +00:00
Chandler Carruth
26bf6ea447 [PM/AA] Actually wire the AAManager I built for the new pass manager
into the new pass manager and fix the latent bugs there.

This lets everything live together nicely, but it isn't really useful
yet. I never finished wiring the AA layer up for the new pass manager,
and so subsequent patches will change this to do that wiring and get AA
stuff more fully integrated into the new pass manager. Turns out this is
necessary even to get functionattrs ported over. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 23:32:00 +00:00
Duncan P. N. Exon Smith
9b2a3ba3ec Support: Fix incremental build when re-configuring targets
r180893 added an indirect include of llvm/Config/Targets.def to
llvm/Support/CodeGen.h, which in turn is included by things like
llvm/IR/Module.h.  After a full build of LLVM and Clang, ninja had to
rebuild 1274 files after reconfiguring.

This commit strips CodeGen.h back down to just a pile of enums and moves
the expensive includes over to CodeGenCWrappers.h (which is only
included in two places).  This gets ninja down to 88 files if you
reconfigure with, e.g., -DLLVM_TARGETS_TO_BUILD=X86.

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