129252 Commits

Author SHA1 Message Date
Sanjoy Das
2f8286bd50 Match call and target calling conventions in test
Fixes an issue in rL264329.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:51:24 +00:00
Mike Aizatsky
452d923857 [sancov] adding leading zeros to coverage pct.
Summary:
Using leading zeroes allows you to search for "000%" to find non-covered
items.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:41:18 +00:00
Dimitry Andric
b7a21ad8ca Add <atomic> to ThreadPool.h, since std::atomic is used
Summary:
Apparently, when compiling with gcc 5.3.2 for powerpc64, the order of
headers is such that it gets an error about std::atomic<> use in
ThreadPool.h, since this header is not included explicitly.  See also:

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

Fix this by including <atomic>.  Patch by Bryan Drewery.

Reviewers: chandlerc, joker.eph

Subscribers: bdrewery, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:39:17 +00:00
Reid Kleckner
8418d19d0b Revert "Recommitted r263424 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26942 (the fix is included in this commit)."
This reverts commit r264280.

This broke building Chromium for iOS. We'll upload a reproducer to the
PR soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:38:49 +00:00
Krzysztof Parzyszek
d593c6f133 [Hexagon] Be sure to treat subregisters of a CSR as CSRs as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264331 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:31:41 +00:00
David Blaikie
1825f4d513 [ADT] C++11ify SmallVector::erase's arguments from iterator to const_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:25:51 +00:00
Sanjoy Das
8ba5ebc098 Add lowering support for llvm.experimental.deoptimize
Summary:
Only adds support for "naked" calls to llvm.experimental.deoptimize.
Support for round-tripping through RewriteStatepointsForGC will come
as a separate patch (should be simpler than this one).

Reviewers: reames

Subscribers: sanjoy, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:23:29 +00:00
Krzysztof Parzyszek
d4af74e531 [Hexagon] Add support for run-time stack overflow checking
Patch by Sundeep Kushwaha.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:20:07 +00:00
Teresa Johnson
e3c0e7f6cf [ThinLTO] Use bulk importing in llvm-link
Summary:
Use bulk importing so we can avoid the use of post-pass metadata
linking. Cloned the ModuleLazyLoaderCache from the FunctionImport pass
to facilitate this.

Reviewers: joker.eph

Subscribers: dexonsmith, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264326 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 19:52:20 +00:00
Krzysztof Parzyszek
deffc78c77 [Hexagon] Generate PIC-specific versions of save/restore routines
In PIC mode, the registers R14, R15 and R28 are reserved for use by
the PLT handling code. This causes all functions to clobber these
registers. While this is not new for regular function calls, it does
also apply to save/restore functions, which do not follow the standard
ABI conventions with respect to the volatile/non-volatile registers.

Patch by Jyotsna Verma.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 19:18:48 +00:00
Richard Smith
e4010bf95b Stop relying on mapped_iterator's function having a result_type. That facility
is deprecated in modern C++ and unnecessary since decltype can be used to query
the relevant type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 19:10:58 +00:00
Sanjoy Das
2080172098 [Statepoints] Fix yet another issue around gc pointer uniqueing
Given that StatepointLowering now uniques derived pointers before
putting them in the per-statepoint spill map, we may end up with missing
entries for derived pointers when we visit a gc.relocate on a pointer
that was de-duplicated away.

Fix this by keeping two maps, one mapping gc pointers to their
de-duplicated values, and one mapping a de-duplicated value to the slot
it is spilled in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:57:39 +00:00
Sanjoy Das
7bf7b9ce00 Minor cosmestic changes (NFC)
- Reflow comments
 - Rename function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:57:31 +00:00
Chris Bieneman
c28ee9ced7 [Docs] Updating CMake docs to include LLVM_OPTIMIZED_TABLEGEN
This is based on feedback on llvm-commits from Sean Silvas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:46:43 +00:00
David Blaikie
97f383e4e1 [debuginfo] Include dwo_name in the split unit to improve dwp diagnostics
When multiple DWP files are merged together and duplicate DWO IDs are
found it's currently difficult to give an actionable error message - the
DW_AT_name of the CU could be provided, but might be identical (if the
same source file is built into two different configurations), which
doesn't help the user identify the problem.

When no intermediate DWP files are generated, the path to the two DWO
files could be provided - but is lost once the DWOs are merged into a
DWP.

So, include the name of the DWO (dwo_name) in the split file so that
collissions involving a source CU from a DWP can be better diagnosed.

(improvements to llvm-dwp using this to come shortly)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:37:08 +00:00
Lang Hames
2e2ed8c746 [docs] Clarify Error example in Programmer's Manual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:05:21 +00:00
Adam Nemet
1123cc74df [LLE] Check for mismatching types between the store and the load earlier
isDependenceDistanceOfOne asserts that the store and the load access
through the same type.  This function is also used by
removeDependencesFromMultipleStores so we need to make sure we filter
out mismatching types before reaching this point.

Now we do this when the initial candidates are gathered.

This is a refinement of the fix made in r262267.

Fixes PR27048.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:59:26 +00:00
Sanjay Patel
8674e1c5a3 don't hardcode the name of the llc checks script
We lose the 'utils' directory name in our advertising line with
this change. We could retain that, but I don't see the point.
This removes a dependency for making the script apply to more than
'llc'. Ie, we'll want to change the script name if it works with 
opt/clang too.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264310 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:30:38 +00:00
Simon Atanasyan
869a02ea85 [MC][mips] Add MipsMCInstrAnalysis class and register it as MC instruction analyzer
The `MipsMCInstrAnalysis` class overrides the `evaluateBranch` method
and calculates target addresses for branch and calls instructions.
That allows llvm-objdump to print functions' names in branch instructions
in the disassemble mode.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:18:14 +00:00
Sanjoy Das
9e88a02522 Remove unnecessary redirect from test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:18:00 +00:00
Sanjay Patel
002b8db36a reorganize llc checks script to allow more flexibility, part 2; NFCI
The goal is to enhance this script to be used with opt and clang:
Break 'main' into functions and change variable names to be more
generic because we want to handle more than x86 asm output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:15:42 +00:00
Rafael Espindola
9d3b0b6716 Fix gold tests for llvm-readobj format change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:45:41 +00:00
Simon Pilgrim
1ae39fa1a5 [X86][XOP] Fixed instruction postfixes to more closely match operands
Suggested by Sanjay in D18189 as the multiple folding options in XOP instructions can be tricky

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:31:30 +00:00
Duncan P. N. Exon Smith
964230413e BitcodeWriter: Move abbreviation for GenericDINode; almost NFC
Simplify ValueEnumerator and WriteModuleMetadata by shifting the logic
for the METADATA_GENERIC_DEBUG abbreviation into WriteGenericDINode.
(This is just like r264302, but for GenericDINode.)

The only change is that the abbreviation is emitted later in the
bitcode, just before the first `GenericDINode` record.  This shouldn't
be observable though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:30:18 +00:00
Duncan P. N. Exon Smith
3601e72b2a BitcodeWriter: Move abbreviation for DILocation; almost NFC
Simplify ValueEnumerator and WriteModuleMetadata by shifting the logic
for the METADATA_LOCATION abbreviation into WriteDILocation.

The only change is that the abbreviation is emitted later in the
bitcode, just before the first `DILocation` record.  This shouldn't be
observable though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:25:51 +00:00
Duncan P. N. Exon Smith
7c9efaa654 BitcodeWriter: Split out named metadata; almost NFC
Split writeNamedMetadata out of WriteModuleMetadata to write named
metadata, and createNamedMetadataAbbrev for the abbreviation.

There should be no effective functionality change, although the layout
of the bitcode will change.  Previously, the abbreviation was emitted at
the top of the block, but now it is delayed until immediately before the
named metadata records are emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264301 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:16:08 +00:00
Simon Atanasyan
cc6b0d4dd4 [llvm-readobj] Decode st_other symbol's flags
The patch supports common STV_xxx visibility flags and MIPS specific
STO_MIPS_xxx flags.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:10:37 +00:00
Duncan P. N. Exon Smith
adb3b8dcbf Bitcode: Module* -> Module&, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:01:46 +00:00
Elena Demikhovsky
56d2e27939 AVX-512: Generate KTEST instead of TEST fir i1 vectors
KTEST instruction may be used instead of TEST in this case:

%int_sel3 = bitcast <8 x i1> %sel3 to i8
%res = icmp eq i8 %int_sel3, zeroinitializer
br i1 %res, label %L2, label %L1

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:53:45 +00:00
NAKAMURA Takumi
89b695a240 ErrorTest.cpp: Move instantiations out of anonymous namespace. gcc didn't complain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:40:46 +00:00
Tim Northover
53308b846f CodeGen: extend RHS when splitting ATOMIC_CMP_SWAP_WITH_SUCCESS.
If the operation's type has been promoted during type legalization, we
need to account for the fact that the high bits of the comparison
operand are likely unspecified.

The LHS is usually zero-extended, but MIPS sign extends it, so we have
to be slightly careful.

Patch by Simon Dardis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:38:38 +00:00
Tom Stellard
53598f2a0d AMDGPU/SI: Add Polaris support
Patch By: Sonny Jiang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:31:05 +00:00
Simon Pilgrim
d531b13c19 [X86][XOP] Merged 128/256 bit 4op instruction definitions. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:28:02 +00:00
NAKAMURA Takumi
389c434b57 Define ErrorInfo::ID explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:26:43 +00:00
Rafael Espindola
c0521dd4a2 Fix another case where we were unconditionally linking linkonce GVs.
With this I think that now llvm-link,  lld and the gold plugin should
agree on which symbol is kept.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:23:01 +00:00
NAKAMURA Takumi
ca458d6ebb Error.cpp: Fix a warning. [-Wpedantic]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:19:39 +00:00
NAKAMURA Takumi
f043736d85 ErrorTest.cpp: Fix an expression, possibly typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:19:22 +00:00
Rafael Espindola
87fa43be91 Fix resolution of linkonce symbols in comdats.
After comdat processing, the symbols still go through regular symbol
resolution.

We were not doing it for linkonce symbols since they are lazy linked.

This fixes pr27044.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 14:58:44 +00:00
Daniel Sanders
f7a07617aa [mips] Range check vsplat_simm5 and vsplat_simm10
Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 14:53:40 +00:00
Pirama Arumuga Nainar
84db1ccc7a Remove unsafe AssertZext after promoting result of FP_TO_FP16
Summary:
Some target lowerings of FP_TO_FP16, for instance ARM's vcvtb.f16.f32
instruction, do not guarantee that the top 16 bits are zeroed out.
Remove the unsafe AssertZext and add tests to exercise this.

Reviewers: jmolloy, sbaranga, kristof.beyls, aadg

Subscribers: llvm-commits, srhines, aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 14:06:03 +00:00
Nemanja Ivanovic
c4a24ae263 [PowerPC] Disable direct moves for extractelement and bitcast in 32-bit mode
This patch corresponds to review:
http://reviews.llvm.org/D17711

It disables direct moves on these operations in 32-bit mode since the patterns
assume 64-bit registers. The final patch is slightly different from the
Phabricator review as the bitcast operations needed to be disabled in 32-bit
mode as well. This fixes PR26617.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 13:40:33 +00:00
Amjad Aboud
dbe22520b6 Recommitted r263424 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26942 (the fix is included in this commit).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 13:30:16 +00:00
Daniel Sanders
da7ce1c8eb [mips] Range check simm10
Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264279 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 13:26:59 +00:00
Simon Pilgrim
b4ecd3cfe6 [X86][XOP] Support for VPPERM byte shuffle instruction
This patch begins adding support for lowering to the XOP VPPERM instruction - adding the X86ISD::VPPERM opcode.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 11:52:43 +00:00
Daniel Sanders
74591f1a32 [mips] Tidy up cnMIPS tablegen definitions. NFC.
Summary:
In particular, make the cnMIPS predicates much more obvious and prefer
  def ... : ... {
    let Foo = bar;
  }
over:
  let Foo = bar in
  def ... : ...;

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 11:40:48 +00:00
Vasileios Kalintiris
26bfbf7c8d Fix sequence point warning. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 10:53:28 +00:00
James Molloy
66d1cd5130 [llvm-nm] Fix r264247
I committed the test changes successfully but managed to miss the actual code change! (lack of git -a)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 09:23:51 +00:00
Zlatko Buljan
48945fb1c0 [mips][microMIPS] Add CodeGen support for DIV, MOD, DIVU, MODU, DDIV, DMOD, DDIVU and DMODU instructions
Differential Revision: http://reviews.llvm.org/D17137


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 09:22:45 +00:00
James Molloy
d49b347df5 [llvm-nm] Correct -P ELF output
Correctly add a space between the address and size when outputting in posix mode (-P).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264247 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 09:18:09 +00:00
Hrvoje Varga
405224b9ee [mips][microMIPS] Implement MTC*, MTHC* and DMTC* instructions
Differential Revision: http://reviews.llvm.org/D17328


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 08:02:09 +00:00