Commit Graph

127954 Commits

Author SHA1 Message Date
Rafael Espindola
7f7379544d Reapply r260489.
Original commit message:

[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.

The bits of r260488 it depends on have been committed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260970 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 15:16:00 +00:00
Dan Gohman
ab40f7f14f [WebAssembly] Implement support for custom NaN bit patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 15:14:23 +00:00
Rafael Espindola
2352c1884e Introduce a getAsRange helper.
This requires making an error message a bit more generic, but that seems
a reasonable tradeoff.

Extracted from r260488 but simplified a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260967 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 14:50:39 +00:00
Rafael Espindola
8f08340f64 Move DynRegionInfo out of the ELFDumper.
This reduces indentation in preparation to adding a bit more code to it.

Extracted from r260488.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260963 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 14:27:33 +00:00
Rafael Espindola
ed783357b0 This reverts commit r260488 and r260489.
Original messages:
    Revert "[readobj] Handle ELF files with no section table or with no program headers."
    Revert "[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations."

r260489 depends on r260488 and among other issues r260488 deleted error
handling code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260962 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 14:17:48 +00:00
Andrey Turetskiy
e13835e919 [X86] PR26575: Fix LEA optimization pass.
Add a missing check for a type of address displacement operand of the load/store instruction being a candidate for LEA substitution.

Ref: https://llvm.org/bugs/show_bug.cgi?id=26575

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260959 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 12:47:45 +00:00
Benjamin Kramer
d11f0144bb [Hexagon] Hoist nonnull assert up.
Once a pointer is turned into a reference it cannot be nullptr, clang
rightfully warns about this assert being a tautology. Put the assert
before the reference is created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260949 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 09:53:47 +00:00
Amaury Sechet
ab8b27bde8 Make sure the functions' range is empty before going through it in the LLVM C API test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260947 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 08:37:01 +00:00
Craig Topper
72f4f1730e [X86] Fix typos. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 07:45:07 +00:00
Craig Topper
fece2b01a5 [X86] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 07:45:04 +00:00
Amaury Sechet
f1671f6231 Do some refactoring in constant generation in the C API echo test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 07:33:23 +00:00
Craig Topper
2c44092d73 [X86] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260940 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 07:28:03 +00:00
Amaury Sechet
f5261f5dc4 Generate functions in 2 steps in the C API echo test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260939 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 07:08:49 +00:00
Junmo Park
4ee5ab9daf [SCEVExpander] Make findExistingExpansion smarter
Summary:
Extending findExistingExpansion can use existing value in ExprValueMap.
This patch gives 0.3~0.5% performance improvements on 
benchmarks(test-suite, spec2000, spec2006, commercial benchmark)
   
Reviewers: mzolotukhin, sanjoy, zzheng

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260938 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 06:46:58 +00:00
Amaury Sechet
b1fb18e8f7 Restore the capability to manipulate datalayout from the C API
Summary:
This consist in variosu addition to the C API:

  LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M);
  void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL);
  LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T);

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: axw

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 05:11:24 +00:00
Craig Topper
35e38d845b [TableGen] Fix inconsistent spacing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260935 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:24:58 +00:00
Craig Topper
69dced0d4c [TableGen] Stop passing by reference an integer that doesn't get modified. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260934 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:24:56 +00:00
Craig Topper
6ff0feee63 [TableGen] Remove unused member variable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260933 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:24:54 +00:00
Craig Topper
86b7e4c701 Remove an unnecessary std::move to fix -Wpessimizing-move warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260931 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:17:42 +00:00
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