Rui Ueyama [Tue, 22 Nov 2016 04:13:09 +0000 (04:13 +0000)]
Convert MipsOptionsSection to SyntheticSection.
llvm-svn: 287615
Rui Ueyama [Tue, 22 Nov 2016 03:57:08 +0000 (03:57 +0000)]
Convert MipsReginfoSection to SyntheticSection.
llvm-svn: 287614
Rui Ueyama [Tue, 22 Nov 2016 03:57:06 +0000 (03:57 +0000)]
Convert MipsAbiFlagsSection to SyntheticSection.
llvm-svn: 287613
Craig Topper [Tue, 22 Nov 2016 03:51:53 +0000 (03:51 +0000)]
[AVX-512] Add support for changing the element size of PALIGNR/VALIGND/VALIGNQ shuffles if they feed a vselect with a different type
Summary:
Shuffle lowering widens the element size of a shuffle if elements are contiguous. This is sometimes help because wider element types have more shuffle options. If the shuffle is one of the arguments to a vselect this shuffle widening can introduce a bitcast between the vselect and the shuffle. This will prevent isel from selecting a masked operation. If the shuffle can be written equally efficiently with a different element size to match the vselect type we should change the shuffle type to allow masking.
This patch does this conversion for all VALIGND/VALIGNQ sizes. It also supports turning 128-bit PALIGNR into VALIGND/VALIGNQ. This fixes the case shown in PR31018.
I plan to add support for more operations in future patches.
Reviewers: RKSimon, zvi, delena
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26902
llvm-svn: 287612
Peter Collingbourne [Tue, 22 Nov 2016 03:38:40 +0000 (03:38 +0000)]
Object: Make SymbolicFile::symbol_{begin,end}() virtual and remove unnecessary wrappers.
llvm-svn: 287611
Chandler Carruth [Tue, 22 Nov 2016 03:27:43 +0000 (03:27 +0000)]
[ADT] Add initializer list support to SmallPtrSet so that sets can be
easily initialized with some initial values.
llvm-svn: 287610
Ed Maste [Tue, 22 Nov 2016 02:25:41 +0000 (02:25 +0000)]
Turn on LLDB_EDITLINE_USE_WCHAR on FreeBSD
llvm-svn: 287609
Stanislav Mekhanoshin [Tue, 22 Nov 2016 01:42:34 +0000 (01:42 +0000)]
[AMDGPU] Fix multiple vreg definitions in si-lower-control-flow
Differential Revision: https://reviews.llvm.org/D26939
llvm-svn: 287608
Rui Ueyama [Tue, 22 Nov 2016 01:36:19 +0000 (01:36 +0000)]
Remove redundant assignment.
llvm-svn: 287607
Rui Ueyama [Tue, 22 Nov 2016 01:31:32 +0000 (01:31 +0000)]
Convert BuildId a derived class of SyntheticSection.
Some synthetic sections are not derived calsses of SyntehticSection.
They are derived directly from InputSection. For consistencly, we should
use SyntheticSection.
llvm-svn: 287606
Rui Ueyama [Tue, 22 Nov 2016 01:10:34 +0000 (01:10 +0000)]
Remove a parameter from getOutputLoc and rename for readability. NFC.
llvm-svn: 287605
Peter Collingbourne [Tue, 22 Nov 2016 01:03:40 +0000 (01:03 +0000)]
Analysis: gep inbounds (gep inbounds (...)) is inbounds.
Differential Revision: https://reviews.llvm.org/D26441
llvm-svn: 287604
Rui Ueyama [Tue, 22 Nov 2016 00:54:15 +0000 (00:54 +0000)]
Merge BuildId subclasses.
We had five different BuildId subclasses for five different types
of build-ids. They can simply be merged to a single class.
llvm-svn: 287603
Peter Collingbourne [Tue, 22 Nov 2016 00:43:30 +0000 (00:43 +0000)]
Fix -Asserts build, and add some more test cases.
llvm-svn: 287602
Peter Collingbourne [Tue, 22 Nov 2016 00:21:43 +0000 (00:21 +0000)]
Sema, CodeGen: Ensure that an implicit copy ctor is available more often under the Microsoft C++ ABI.
This is needed because whether the constructor is deleted can control whether
we pass structs by value directly.
To fix this properly we probably want a more direct way for CodeGen to ask
whether the constructor was deleted.
Fixes PR31049.
Differential Revision: https://reviews.llvm.org/D26822
llvm-svn: 287600
Richard Smith [Mon, 21 Nov 2016 23:43:54 +0000 (23:43 +0000)]
Indicate in AST dump whether special member functions are defaulted and trivial.
llvm-svn: 287599
Zachary Turner [Mon, 21 Nov 2016 23:18:13 +0000 (23:18 +0000)]
Fix a bug caught by adding LLVM_NODISCARD to StringRef.
llvm-svn: 287598
Zachary Turner [Mon, 21 Nov 2016 23:18:07 +0000 (23:18 +0000)]
Add the new Args / entry-access API.
The long-term goal here is to get rid of the functions
GetArgumentAtIndex() and GetQuoteCharAtIndex(), instead
replacing them with operator based access and range-based for
enumeration. There are a lot of callsites, though, so the
changes will be done incrementally, starting with this one.
Differential Revision: https://reviews.llvm.org/D26883
llvm-svn: 287597
Zachary Turner [Mon, 21 Nov 2016 23:17:15 +0000 (23:17 +0000)]
Remove LLVM_NODISCARD in one more place.
llvm-svn: 287596
Rui Ueyama [Mon, 21 Nov 2016 23:17:09 +0000 (23:17 +0000)]
Remove useless newlines.
llvm-svn: 287595
Zachary Turner [Mon, 21 Nov 2016 23:02:28 +0000 (23:02 +0000)]
Remove LLVM_NODISCARD from two more StringRef members.
This should be everything.
llvm-svn: 287594
Matt Arsenault [Mon, 21 Nov 2016 22:56:42 +0000 (22:56 +0000)]
DAG: Ignore call site attributes when emitting target intrinsic
A target intrinsic may be defined as possibly reading memory,
but the call site may have additional knowledge that it doesn't read
memory. The intrinsic lowering will expect the pessimistic
assumption of the intrinsic definition, so the chain should
still be used.
llvm-svn: 287593
Geoff Berry [Mon, 21 Nov 2016 22:51:10 +0000 (22:51 +0000)]
[AArch64LoadStoreOptimizer] Don't treat write to XZR/WZR as a clobber.
Summary:
When searching for load/store instructions to pair/merge don't treat
writes to WZR/XZR as clobbers since they don't change the value read
from WZR/XZR (which is always 0).
Reviewers: mcrosier, junbuml, jmolloy, t.p.northover
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: https://reviews.llvm.org/D26921
llvm-svn: 287592
Justin Lebar [Mon, 21 Nov 2016 22:49:15 +0000 (22:49 +0000)]
[CodeGenPrepare] Don't sink non-cheap addrspacecasts.
Summary:
Previously, CGP would unconditionally sink addrspacecast instructions,
even going so far as to sink them into a loop.
Now we check that the cast is "cheap", as defined by TLI.
We introduce a new "is-cheap" function to TLI rather than using
isNopAddrSpaceCast because some GPU platforms want the ability to ask
for non-nop casts to be sunk.
Reviewers: arsenm, tra
Subscribers: jholewinski, wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26923
llvm-svn: 287591
Justin Lebar [Mon, 21 Nov 2016 22:49:11 +0000 (22:49 +0000)]
[CodeGenPrepare] Rewrite a loop in terms of llvm::none_of. NFC.
Reviewers: arsenm
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26924
llvm-svn: 287590
Zachary Turner [Mon, 21 Nov 2016 22:47:23 +0000 (22:47 +0000)]
Remove LLVM_NODISCARD from getAsInteger().
llvm-svn: 287589
Eli Friedman [Mon, 21 Nov 2016 22:35:34 +0000 (22:35 +0000)]
[LoopReroll] Make root-finding more aggressive.
Allow using an instruction other than a mul or phi as the base for
root-finding. For example, the included testcase includes a loop
which requires using a getelementptr as the base for root-finding.
Differential Revision: https://reviews.llvm.org/D26529
llvm-svn: 287588
Zachary Turner [Mon, 21 Nov 2016 22:29:38 +0000 (22:29 +0000)]
Fix attribute list syntax.
llvm-svn: 287587
Zachary Turner [Mon, 21 Nov 2016 22:19:25 +0000 (22:19 +0000)]
Remove LLVM_NODISCARD from StringRef.
This is a bit too aggressive of a warning, as it is forces
ANY function which returns a StringRef to have its return
value checked. While useful on classes like llvm::Error which
are designed to require checking, this is not the case for
StringRef, and it is perfectly reasonable to have a function
return a StringRef for which the return value is not checked.
Move LLVM_NODISCARD to each of the individual member functions
where it makes sense instead.
llvm-svn: 287586
Sanjay Patel [Mon, 21 Nov 2016 22:04:14 +0000 (22:04 +0000)]
[InstCombine] canonicalize min/max constant to select's false value
This is a first step towards canonicalization and improved folding/codegen
for integer min/max as discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html
Here, we're just matching the simplest min/max patterns and adjusting the
icmp predicate while swapping the select operands.
I've included FIXME tests in test/Transforms/InstCombine/select_meta.ll
so it's easier to see how this might be extended (corresponds to the TODO
comment in the code). That's also why I'm using matchSelectPattern()
rather than a simpler check; once the backend is patched, we can just
remove some of the restrictions to allow the obfuscated min/max patterns
in the FIXME tests to be matched.
Differential Revision: https://reviews.llvm.org/D26525
llvm-svn: 287585
Evgeny Stupachenko [Mon, 21 Nov 2016 21:55:03 +0000 (21:55 +0000)]
LSR debug fix.
Summary:
Dump instruction instead of address.
Reviewers: hfinkel
Differential Revision: http://reviews.llvm.org/D26877
From: Evgeny Stupachenko <evstupac@gmail.com>
llvm-svn: 287584
Hubert Tong [Mon, 21 Nov 2016 21:53:01 +0000 (21:53 +0000)]
reassociate-deadinst.ll: avoid accidental match on path
Pipe from stdin to avoid accidentally matching on the path.
llvm-svn: 287583
Sanjay Patel [Mon, 21 Nov 2016 21:48:36 +0000 (21:48 +0000)]
fix formatting; NFC
llvm-svn: 287582
Kuba Mracek [Mon, 21 Nov 2016 21:48:25 +0000 (21:48 +0000)]
[asan] Specialize the initialization-bug.cc testcase for Darwin (it needs a deployment target of 10.11+)
The ODR detection in initialization-bug.cc now works on Darwin (due to the recently enabled "live globals" on-by-default), but only if the deployment target is 10.11 or higher. Let's adjust the testcases.
Differential Revision: https://reviews.llvm.org/D26927
llvm-svn: 287581
Ivan Krasin [Mon, 21 Nov 2016 21:23:56 +0000 (21:23 +0000)]
Add a test for vcall on a null ptr.
Summary:
Turns out that in the case of -fsanitize=null and a virtual call,
the type check was generated *after* reading from vtable, which
causes a non-interpretable segfault. The check has been moved up
in https://reviews.llvm.org/D26559 and this CL adds a test for this case.
Reviewers: pcc
Subscribers: cfe-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D26560
llvm-svn: 287578
Reid Kleckner [Mon, 21 Nov 2016 20:40:56 +0000 (20:40 +0000)]
[asan] Un-XFAIL Windows global dead stripping test cases
Test update for r287576
llvm-svn: 287577
Reid Kleckner [Mon, 21 Nov 2016 20:40:37 +0000 (20:40 +0000)]
[asan] Make ASan compatible with linker dead stripping on Windows
Summary:
This is similar to what was done for Darwin in rL264645 /
http://reviews.llvm.org/D16737, but it uses COFF COMDATs to achive the
same result instead of relying on new custom linker features.
As on MachO, this creates one metadata global per instrumented global.
The metadata global is placed in the custom .ASAN$GL section, which the
ASan runtime will iterate over during initialization. There are no other
references to the metadata, so normal linker dead stripping would
discard it. However, the metadata is put in a COMDAT group with the
instrumented global, so that it will be discarded if and only if the
instrumented global is discarded.
I didn't update the ASan ABI version check since this doesn't affect
non-Windows platforms, and the WinASan ABI isn't really stable yet.
Implementing this for ELF will require extending LLVM IR and MC a bit so
that we can use non-COMDAT section groups.
Reviewers: pcc, kcc, mehdi_amini, kubabrecka
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26770
llvm-svn: 287576
Mandeep Singh Grang [Mon, 21 Nov 2016 20:39:08 +0000 (20:39 +0000)]
[MemorySSA] Fix unit tests broken by D26704
Summary:
D26704 fixed the non-determinism in codegen by sorting basic blocks before
iteration so as to have a defined iteration order. As a result we need to fix
the names (numbers) of the temporaries in the following unit tests:
test/Transforms/Util/MemorySSA/multi-edges.ll
test/Transforms/Util/MemorySSA/multiple-backedges-hal.ll
Reviewers: dberlin, david2050, mgrang
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26926
llvm-svn: 287575
Simon Dardis [Mon, 21 Nov 2016 20:34:10 +0000 (20:34 +0000)]
[mips] Add tests for half precision floating point support.
These should have been part of r287349.
llvm-svn: 287574
Simon Dardis [Mon, 21 Nov 2016 20:30:41 +0000 (20:30 +0000)]
[mips] seq macro support
This patch adds the seq macro.
This partially resolves PR/30381.
Thanks to Sean Bruno for reporting the issue!
Reviewers: zoran.jovanovic, vkalintiris, seanbruno
Differential Revision: https://reviews.llvm.org/D24607
llvm-svn: 287573
Hongbin Zheng [Mon, 21 Nov 2016 20:27:55 +0000 (20:27 +0000)]
Update comment for r287566
llvm-svn: 287572
Krzysztof Parzyszek [Mon, 21 Nov 2016 20:24:12 +0000 (20:24 +0000)]
Check proper live range in extendPHIRanges
The function extendPHIRanges checks the main range of the original live
interval, even when dealing with a subrange. This could also lead to an
assert when the subrange is not live at the extension point, but the
main range is. To avoid this, check the corresponding subrange of the
original live range, instead of always checking the main range.
Review (as a part of a bigger set of changes):
https://reviews.llvm.org/D26359
llvm-svn: 287571
Marcin Koscielnicki [Mon, 21 Nov 2016 20:20:39 +0000 (20:20 +0000)]
[TLI] Fix breakage introduced by D21739.
The initialize function has an early return for AMDGPU targets. If taken,
the ShouldExtI32* initialization code will not be executed, resulting in
invalid values in the corresponding fields. Fix this by moving the code
to the top of the function.
llvm-svn: 287570
Rafael Espindola [Mon, 21 Nov 2016 20:20:04 +0000 (20:20 +0000)]
Use the correct page size.
Config->MaxPageSize is what we use for the segment alignment, so that
is the one that we have to use for placing the header.
llvm-svn: 287569
Hongbin Zheng [Mon, 21 Nov 2016 20:17:00 +0000 (20:17 +0000)]
Fix format
llvm-svn: 287568
Shoaib Meenai [Mon, 21 Nov 2016 20:13:32 +0000 (20:13 +0000)]
[AsmPrinter] Enable codeview for windows-itanium
Enable codeview emission for windows-itanium targets. Co-opt an existing
test (which is derived from a C source file and should therefore be
identical across the Itanium and MS ABIs).
Differential Revision: https://reviews.llvm.org/D26693
llvm-svn: 287567
Hongbin Zheng [Mon, 21 Nov 2016 20:09:40 +0000 (20:09 +0000)]
Split ScopInfo::addScopStmt into two versions. NFC
One for adding statement for region, another one for BB
llvm-svn: 287566
Rafael Espindola [Mon, 21 Nov 2016 19:59:33 +0000 (19:59 +0000)]
Fix address computation for headers.
If the linker script has SECTIONS, the address computation is now
always done in LinkerScript::assignAddresses, like for any other
section.
Before fixHeaders would do a tentative computation that
assignAddresses would sometimes override.
This patch also splits the cases where assignAddresses needs to add
the headers to the first PT_LOAD and the address computation. The net
effect is that we no longer create an empty page for no reason in the
included test case, which matches bfd behavior.
llvm-svn: 287565
Rui Ueyama [Mon, 21 Nov 2016 19:46:04 +0000 (19:46 +0000)]
Move a function definition to SyntheticSections.cpp.
This should have been moved along with r287554.
llvm-svn: 287564
Mandeep Singh Grang [Mon, 21 Nov 2016 19:33:02 +0000 (19:33 +0000)]
[MemorySSA] Fix for non-determinism in codegen
This patch fixes the non-determinism caused due to iterating SmallPtrSet's
which was uncovered due to the experimental "reverse iteration order " patch:
https://reviews.llvm.org/D26718
The following unit tests failed because of the undefined order of iteration.
LLVM :: Transforms/Util/MemorySSA/cyclicphi.ll
LLVM :: Transforms/Util/MemorySSA/many-dom-backedge.ll
LLVM :: Transforms/Util/MemorySSA/many-doms.ll
LLVM :: Transforms/Util/MemorySSA/phi-translation.ll
Reviewers: dberlin, mgrang
Subscribers: dberlin, llvm-commits, david2050
Differential Revision: https://reviews.llvm.org/D26704
llvm-svn: 287563
Hongbin Zheng [Mon, 21 Nov 2016 19:26:10 +0000 (19:26 +0000)]
Minor change
llvm-svn: 287562
Simon Pilgrim [Mon, 21 Nov 2016 18:24:44 +0000 (18:24 +0000)]
[VectorLegalizer] Remove EVT::getSizeInBits code duplications. NFCI.
We were calling SVT.getSizeInBits() several times in a row - just call it once and reuse the result.
llvm-svn: 287556
Rui Ueyama [Mon, 21 Nov 2016 17:22:35 +0000 (17:22 +0000)]
Do plumbing work for CodeView debug info.
Previously, we discarded .debug$ sections. This patch adds them to
files so that PDB.cpp can access them.
This patch also adds a debug option, /dumppdb, to dump debug info
fed to createPDB so that we can verify that valid data has been passed.
llvm-svn: 287555
Eugene Leviant [Mon, 21 Nov 2016 16:59:33 +0000 (16:59 +0000)]
[ELF] Convert Version*** sections to input sections
Differential revision: https://reviews.llvm.org/D26918
llvm-svn: 287554
Jun Bum Lim [Mon, 21 Nov 2016 16:47:28 +0000 (16:47 +0000)]
[CodeGenPrep] Skip merging empty case blocks
Summary: Merging an empty case block into the header block of switch could cause
ISel to add COPY instructions in the header of switch, instead of the case
block, if the case block is used as an incoming block of a PHI. This could
potentially increase dynamic instructions, especially when the switch is in a
loop. I added a test case which was reduced from the benchmark I was targetting.
Reviewers: t.p.northover, mcrosier, manmanren, wmi, davidxl
Subscribers: qcolombet, danielcdh, hfinkel, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D22696
llvm-svn: 287553
Jonathan Peyton [Mon, 21 Nov 2016 16:24:59 +0000 (16:24 +0000)]
Set task->td_dephash to NULL after free
llvm-svn: 287552
Jonathan Peyton [Mon, 21 Nov 2016 16:18:57 +0000 (16:18 +0000)]
Fix for D25504 - segfault because of double free()-ing in shutdown code.
Paul Osmialowski pointed out a double free bug in shutdown code. This patch
Moves the freeing of the implicit task to above the freeing of all fast memory
to prevent the double-free issue.
Differential Revision: https://reviews.llvm.org/D26860
llvm-svn: 287551
Daniel Marjamaki [Mon, 21 Nov 2016 16:08:17 +0000 (16:08 +0000)]
clang-tidy: improve my test for readability-redundant-declaration
llvm-svn: 287550
Eugene Leviant [Mon, 21 Nov 2016 15:52:10 +0000 (15:52 +0000)]
[ELF] Convert EhFrameHeader to input section
Differential revision: https://reviews.llvm.org/D26906
llvm-svn: 287549
Coby Tayree [Mon, 21 Nov 2016 15:50:56 +0000 (15:50 +0000)]
small fixup which enables the issuing of the aforementioned instruction (w/o operands), on MS/Intel syntax.
Differential Revision: https://reviews.llvm.org/D26913
llvm-svn: 287548
Eugene Leviant [Mon, 21 Nov 2016 15:49:56 +0000 (15:49 +0000)]
[ELF] Better error reporting for linker scripts
Differential revision: https://reviews.llvm.org/D26795
llvm-svn: 287547
Daniel Marjamaki [Mon, 21 Nov 2016 15:46:40 +0000 (15:46 +0000)]
clang-tidy: Attempt to fix build bot failure with mismatching size_t platform type.
llvm-svn: 287546
Yaxun Liu [Mon, 21 Nov 2016 15:42:31 +0000 (15:42 +0000)]
Fix known zero bits for addrspacecast.
Currently LLVM assumes that a pointer addrspacecasted to a different addr space is equivalent to trunc or zext bitwise, which is not true. For example, in amdgcn target, when a null pointer is addrspacecasted from addr space 4 to 0, its value is changed from i64 0 to i32 -1.
This patch teaches LLVM not to assume known bits of addrspacecast instruction to its operand.
Differential Revision: https://reviews.llvm.org/D26803
llvm-svn: 287545
Benjamin Kramer [Mon, 21 Nov 2016 15:28:50 +0000 (15:28 +0000)]
[include-fixer plugin] Make the plugin emit proper fixits in case multiple errors are found.
The standalone tool only fixes the first one and we managed to bake that
assumption into the code :(
Also fix a crash when no header is found at all.
llvm-svn: 287544
Simon Pilgrim [Mon, 21 Nov 2016 15:28:21 +0000 (15:28 +0000)]
[X86][SSE] Add SSE reciprocal estimate tests
llvm-svn: 287543
Omair Javaid [Mon, 21 Nov 2016 15:18:58 +0000 (15:18 +0000)]
Fix remote-linux regression due to stringRef changes
This is to fix a regression in remote-linux lldb-server connections.
We were wrongly passing a copy of uri and expecting a stringRef back.
llvm-svn: 287542
Simon Pilgrim [Mon, 21 Nov 2016 14:36:19 +0000 (14:36 +0000)]
[SelectionDAG] Add ComputeNumSignBits support for CONCAT_VECTORS opcode
llvm-svn: 287541
Daniel Marjamaki [Mon, 21 Nov 2016 14:29:53 +0000 (14:29 +0000)]
readability-redundant-declaration: Fix crash
Differential Revision: https://reviews.llvm.org/D26911
llvm-svn: 287540
Alex Lorenz [Mon, 21 Nov 2016 14:00:04 +0000 (14:00 +0000)]
[llvm-cov] Avoid 0% when reporting something that's 0/0
This commit makes llvm-cov avoid showing 0% (0/0) coverage for things
like file function coverage, etc. in reports and HTML output. This can happen
for files like headers that have macros but no functions. This commit makes
llvm-cov report - (0/0) instead.
rdar://
29246480
Differential Revision: https://reviews.llvm.org/D26615
llvm-svn: 287539
Eugene Leviant [Mon, 21 Nov 2016 13:57:50 +0000 (13:57 +0000)]
[ELF] Attempt to fix Windows buidbot
llvm-svn: 287538
Rui Ueyama [Mon, 21 Nov 2016 13:49:57 +0000 (13:49 +0000)]
Change the way how we print out line numbers.
LLD's error messages contain line numbers, function names or section names.
Currently they are formatter as follows.
foo.c (32): symbol 'foo' not found
foo.c (function bar): symbol 'foo' not found
foo.c (.text+0x1234): symbol 'foo' not found
This patch changes them so that they are consistent with Clang's output.
foo.c:32: symbol 'foo' not found
foo.c:(function bar): symbol 'foo' not found
foo.c:(.text+0x1234): symbol 'foo' not found
Differential Revision: https://reviews.llvm.org/D26901
llvm-svn: 287537
Benjamin Kramer [Mon, 21 Nov 2016 13:15:38 +0000 (13:15 +0000)]
Adjust arm64-irtranslator.ll test to changes from r287368
The test is currently broken, and this CL should fix it.
Patch by Adrian Kuegel!
Differential Revision: https://reviews.llvm.org/D26910
llvm-svn: 287536
Simon Pilgrim [Mon, 21 Nov 2016 12:05:49 +0000 (12:05 +0000)]
[X86][SSE] Allow PACKSS to be used to truncate any type of all/none sign bits input
At the moment we only use truncateVectorCompareWithPACKSS with direct vector comparison results (just one example of a known all/none signbits input).
This change relaxes the direct matching of a SETCC opcode by moving the logic up into SelectionDAG::ComputeNumSignBits and accepting any input with a known splatted signbit.
llvm-svn: 287535
Marcin Koscielnicki [Mon, 21 Nov 2016 11:57:19 +0000 (11:57 +0000)]
[InstrProfiling] Mark __llvm_profile_instrument_target last parameter as i32 zeroext if appropriate.
On some architectures (s390x, ppc64, sparc64, mips), C-level int is passed
as i32 signext instead of plain i32. Likewise, unsigned int may be passed
as i32, i32 signext, or i32 zeroext depending on the platform. Mark
__llvm_profile_instrument_target properly (its last parameter is unsigned
int).
This (together with the clang change) makes compiler-rt profile testsuite pass
on s390x.
Differential Revision: http://reviews.llvm.org/D21736
llvm-svn: 287534
Marcin Koscielnicki [Mon, 21 Nov 2016 11:57:11 +0000 (11:57 +0000)]
[TLI] Add functions determining if int parameters/returns should be zeroext/signext.
On some architectures (s390x, ppc64, sparc64, mips), C-level int is passed
as i32 signext instead of plain i32. Likewise, unsigned int may be passed
as i32, i32 signext, or i32 zeroext depending on the platform. Add this
information to TargetLibraryInfo, to be used whenever some LLVM pass
inserts a compiler-rt call to a function involving int parameters
or returns.
Differential Revision: http://reviews.llvm.org/D21739
llvm-svn: 287533
Michael Zuckerman [Mon, 21 Nov 2016 11:52:11 +0000 (11:52 +0000)]
Fixing a small typo (A->U).
This seem to fixes PR30992.
- HasAVX512 ? X86::VMOVAPSZ128rm_NOVLX
+ HasAVX512 ? X86::VMOVUPSZ128rm_NOVLX
llvm-svn: 287532
Eric Fiselier [Mon, 21 Nov 2016 11:26:10 +0000 (11:26 +0000)]
Revert r287435 because of OS X test failures
llvm-svn: 287531
Alex Lorenz [Mon, 21 Nov 2016 11:16:30 +0000 (11:16 +0000)]
[ObjC] Prevent infinite loops when iterating over redeclaration
of a method that was declared in an invalid interface
This commit fixes an infinite loop that occurs when clang tries to iterate over
redeclaration of a method that was declared in an invalid @interface. The
existing validity checks don't catch this as that @interface is a duplicate of
a previously declared valid @interface declaration, so we have to verify that
the found redeclaration is in a valid declaration context.
rdar://
29220965
Differential Revision: https://reviews.llvm.org/D26664
llvm-svn: 287530
Alex Lorenz [Mon, 21 Nov 2016 11:05:15 +0000 (11:05 +0000)]
[Frontend] Add a predefined macro that describes the Objective-C bool type
This commit adds a new predefined macro named __OBJC_BOOL_IS_BOOL that describes
the Objective-C boolean type: its value is zero if the Objective-C boolean uses
the signed character type, otherwise its value is one as the Objective-C boolean
uses the builtin boolean type.
rdar://
21170440
Differential Revision: https://reviews.llvm.org/D26234
llvm-svn: 287529
Jacob Baungard Hansen [Mon, 21 Nov 2016 09:33:05 +0000 (09:33 +0000)]
[Sparc] Use target name instead of namespace as prefix for MCRegisterClasses array
Summary:
For Sparc the namespace (SP) is different from the target name (Sparc),
which causes the name of the array in this declaration to differ from
the name used in the definition.
Patch by Daniel Cederman.
Reviewers: jyknight
Subscribers: llvm-commits, jyknight
Differential Revision: https://reviews.llvm.org/D23650
llvm-svn: 287528
Eugene Leviant [Mon, 21 Nov 2016 09:28:07 +0000 (09:28 +0000)]
[ELF] Better error reporting for broken archives
Differential revision: https://reviews.llvm.org/D26852
llvm-svn: 287527
Eugene Leviant [Mon, 21 Nov 2016 09:24:43 +0000 (09:24 +0000)]
[ELF] Convert GdbIndexSection to input section
Differential revision: https://reviews.llvm.org/D26854
llvm-svn: 287526
Tobias Grosser [Mon, 21 Nov 2016 09:07:30 +0000 (09:07 +0000)]
[ScopDetect] Use mayReadOrWriteMemory to shorten condition
llvm-svn: 287525
Tobias Grosser [Mon, 21 Nov 2016 09:04:45 +0000 (09:04 +0000)]
[ScopDetect] Remove unnecessary namespace qualifier
llvm-svn: 287524
Craig Topper [Mon, 21 Nov 2016 07:51:31 +0000 (07:51 +0000)]
[AVX-512] Add EVEX form of VMOVZPQILo2PQIZrm to load folding tables to match SSE and AVX.
llvm-svn: 287523
Alexei Starovoitov [Mon, 21 Nov 2016 07:26:23 +0000 (07:26 +0000)]
[bpf] attempt to fix big-endian bots
attempt to fix big-endian bots failing on new dwarfdump test
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 287522
Alexei Starovoitov [Mon, 21 Nov 2016 06:21:23 +0000 (06:21 +0000)]
[bpf] fix dwarf elf relocs and line numbers
- teach RelocVisitor to recognize bpf relocations
- fix AsmInfo->PointerSize to make sure dwarf is emitted correctly
- add a test for the above
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 287521
Craig Topper [Mon, 21 Nov 2016 04:07:58 +0000 (04:07 +0000)]
[TableGen][ISel] Do a better job of factoring ScopeMatchers created during creation of SwitchTypeMatcher.
Previously we were factoring when the ScopeMatcher was initially created, but it might get more Matchers added to it later. Delay factoring until we have fully created/populated the ScopeMatchers.
This reduces X86 isel tables by 154 bytes.
llvm-svn: 287520
Craig Topper [Mon, 21 Nov 2016 04:07:56 +0000 (04:07 +0000)]
[X86] Remove duplicate instructions for (v)movq and replace with patterns on other instructions. NFC
llvm-svn: 287519
Dean Michael Berris [Mon, 21 Nov 2016 03:24:59 +0000 (03:24 +0000)]
[XRay] Support AArch64 in Clang
This patch adds XRay support in Clang for AArch64 target.
This patch is one of a series:
LLVM: https://reviews.llvm.org/D26412
compiler-rt: https://reviews.llvm.org/D26413
Author: rSerge
Reviewers: rengolin, dberris
Subscribers: aemerson, cfe-commits, iid_iunknown
Differential Revision: https://reviews.llvm.org/D26415
llvm-svn: 287518
Dean Michael Berris [Mon, 21 Nov 2016 03:20:43 +0000 (03:20 +0000)]
[XRay] Support AArch64 in compiler-rt
This patch adds XRay support in compiler-rt for AArch64 targets.
This patch is one of a series:
LLVM: https://reviews.llvm.org/D26412
Clang: https://reviews.llvm.org/D26415
Author: rSerge
Reviewers: rengolin, dberris
Subscribers: aemerson, mgorny, llvm-commits, iid_iunknown
Differential Revision: https://reviews.llvm.org/D26413
llvm-svn: 287517
Dean Michael Berris [Mon, 21 Nov 2016 03:01:43 +0000 (03:01 +0000)]
[XRay][AArch64] Implemented a test for the compile-time sleds emitted, and fixed a bug in the jump instruction
This patch adds a test for the assembly code emitted with XRay
instrumentation. It also fixes a bug where the operand of a jump
instruction must be not the number of bytes to jump over, but rather the
number of 4-byte instructions.
Author: rSerge
Reviewers: dberris, rengolin
Differential Revision: https://reviews.llvm.org/D26805
llvm-svn: 287516
Rui Ueyama [Mon, 21 Nov 2016 02:11:05 +0000 (02:11 +0000)]
Add comments.
This patch rearranges code a bit to make it easy to explain.
llvm-svn: 287515
Rui Ueyama [Mon, 21 Nov 2016 02:10:12 +0000 (02:10 +0000)]
Simplify. NFC.
llvm-svn: 287514
Eric Fiselier [Mon, 21 Nov 2016 01:10:52 +0000 (01:10 +0000)]
Mark variadic lock guard tests as XFAIL with modules, since they have to define macros to expose the new ABI
llvm-svn: 287513
Eric Fiselier [Mon, 21 Nov 2016 00:41:32 +0000 (00:41 +0000)]
Adjust uses_alloc_types helpers for later changes
llvm-svn: 287512
Davide Italiano [Mon, 21 Nov 2016 00:28:23 +0000 (00:28 +0000)]
[GlobalSplit] Port to the new pass manager.
llvm-svn: 287511
Rui Ueyama [Sun, 20 Nov 2016 23:15:56 +0000 (23:15 +0000)]
Simplify. NFC.
llvm-svn: 287510
Rui Ueyama [Sun, 20 Nov 2016 23:15:54 +0000 (23:15 +0000)]
Update comments.
llvm-svn: 287509
Rui Ueyama [Sun, 20 Nov 2016 23:15:52 +0000 (23:15 +0000)]
Add a flag to InputSectionBase for linker script.
Previously, we set (uintptr_t)-1 to InputSectionBase::OutSec to record
that a section has already been set to be assigned to some output section
by linker scripts. Later, we restored nullptr to the pointer to use
the field for the original purpose. That overloading is not very easy to
understand.
This patch adds a bit flag for that purpose, so that we don't need
to piggyback the flag on an unrelated pointer.
llvm-svn: 287508