Dmitry Preobrazhensky [Wed, 5 Apr 2017 17:26:45 +0000 (17:26 +0000)]
[AMDGPU][MC] Fix for Bug 28158 + LIT tests
Added support of the following instructions:
- s_cbranch_cdbgsys
- s_cbranch_cdbgsys_and_user
- s_cbranch_cdbgsys_or_user
- s_cbranch_cdbguser
- s_setkill
Reviewers: vpykhtin
Differential Revision: https://reviews.llvm.org/D31469
llvm-svn: 299567
Daniel Berlin [Wed, 5 Apr 2017 17:26:25 +0000 (17:26 +0000)]
MemorySSA: Fix and use optimized_def_chain
llvm-svn: 299566
Reid Kleckner [Wed, 5 Apr 2017 17:16:37 +0000 (17:16 +0000)]
[lit] Revert to old execution strategy while I debug these pickling errors
llvm-svn: 299565
Reid Kleckner [Wed, 5 Apr 2017 17:05:31 +0000 (17:05 +0000)]
[lit] Use Python 3 style print to satisfy some bots
llvm-svn: 299564
Matthias Braun [Wed, 5 Apr 2017 16:58:41 +0000 (16:58 +0000)]
ARMFrameLowering: Slight cleanups; NFC
llvm-svn: 299562
David Blaikie [Wed, 5 Apr 2017 16:50:19 +0000 (16:50 +0000)]
Fix -Wmissing-field-initializer warnings to unbreak the -Werror build
llvm-svn: 299561
Reid Kleckner [Wed, 5 Apr 2017 16:44:56 +0000 (16:44 +0000)]
[lit] Use process pools for test execution by default
Summary:
This drastically reduces lit test execution startup time on Windows. Our
previous strategy was to manually create one Process per job and manage
the worker pool ourselves. Instead, let's use the worker pool provided
by multiprocessing. multiprocessing.Pool(jobs) returns almost
immediately, and initializes the appropriate number of workers, so they
can all start executing tests immediately. This avoids the ramp-up
period that the old implementation suffers from. This appears to speed
up small test runs.
Here are some timings of the llvm-readobj tests on Windows using the
various execution strategies:
# multiprocessing.Pool:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-process-pool |& grep real: ; done
real: 0m1.156s
real: 0m1.078s
real: 0m1.094s
# multiprocessing.Process:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-processes |& grep real: ; done
real: 0m6.062s
real: 0m5.860s
real: 0m5.984s
# threading.Thread:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-threads |& grep real: ; done
real: 0m9.438s
real: 0m10.765s
real: 0m11.079s
I kept the old code to launch processes in case this change doesn't work
on all platforms that LLVM supports, but at some point I would like to
remove both the threading and old multiprocessing execution strategies.
Reviewers: modocache, rafael
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31677
llvm-svn: 299560
Rui Ueyama [Wed, 5 Apr 2017 16:33:44 +0000 (16:33 +0000)]
Do not use relocateOne() to just write 32-bit words.
llvm-svn: 299559
Renato Golin [Wed, 5 Apr 2017 16:27:11 +0000 (16:27 +0000)]
[ARM] Try to re-enable MachineBranchProb.ll for ARM/AArch64
Commit r298799 changed code that made the XFAIL on MachineBranchProb.ll
irrelevant, but some configurations still failed. I can't reproduce it
locally, so I'm hoping that enabling this will tell me if some
configurations will really fail or if they were just too slow.
llvm-svn: 299558
Sanjay Patel [Wed, 5 Apr 2017 16:21:38 +0000 (16:21 +0000)]
[InstCombine] add tests for missing icmp fold (PR32524)
llvm-svn: 299557
Rui Ueyama [Wed, 5 Apr 2017 16:15:59 +0000 (16:15 +0000)]
Rename GotEntryAddr -> GotPltEntryAddr.
Because they are addresses in .got.plt and not in .got.
llvm-svn: 299556
Dmitry Preobrazhensky [Wed, 5 Apr 2017 16:08:21 +0000 (16:08 +0000)]
[AMDGPU][MC] Fix for Bug 28167 + LIT tests
Corrected src0 for v_writelane_b32:
- Enabled inline constants and literals for SI/CI (VOP2)
- Enabled inline constants for VI (VOP3)
Reviewers: vpykhtin, arsenm
https://reviews.llvm.org/D31463
llvm-svn: 299555
Rui Ueyama [Wed, 5 Apr 2017 16:07:44 +0000 (16:07 +0000)]
Remove unnecessary local variable.
This patch does what r299506 was trying to do in a different way.
llvm-svn: 299554
Rui Ueyama [Wed, 5 Apr 2017 16:01:33 +0000 (16:01 +0000)]
Fix PLT and GOTPLT entries for 32-bit x86 PIC.
Previously, the code we set to our .plt entries expected that .got
and .got.plt are consecutive in the virtual address space.
Since %ebx points to the last entry of .got for position-independent
code, it assumed that .got is accessible with small negative
displacements and .got.plt are accessible with small positive
displacements.
That assumption was simply wrong. We don't impose any restrictions on
relative layout of .got and .got.plt. As a result, the control is
transferred to a bogus address from .plt at runtime, which resulted in
segfaults.
This patch removes that wrong assumption. We still assume that .got.plt
has a fixed relative address to .got, but we no longer assume that they
are consecutive in memory.
With this change, a "hello world" program compiled with -fPIC works.
Fixes https://bugs.llvm.org/show_bug.cgi?id=31332.
Differential Revision: https://reviews.llvm.org/D31682
llvm-svn: 299553
Nirav Dave [Wed, 5 Apr 2017 15:42:48 +0000 (15:42 +0000)]
[SystemZ] Prevent Merging Bitcast with non-normal loads
Fixes PR32505.
Reviewers: uweigand, jonpa
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31609
llvm-svn: 299552
Davide Italiano [Wed, 5 Apr 2017 15:18:16 +0000 (15:18 +0000)]
[yaml2obj] Factor out error handling code.
llvm-svn: 299551
Artem Dergachev [Wed, 5 Apr 2017 15:06:17 +0000 (15:06 +0000)]
Revert "[analyzer] Add a modular constraint system to the CloneDetector"
This reverts commit r299544.
Crashes on tests on some buildbots.
llvm-svn: 299550
Davide Italiano [Wed, 5 Apr 2017 15:05:05 +0000 (15:05 +0000)]
[llvm-ar] Remove unneeded std::, NFCI.
This makes it more consistent with other exit() calls in llvm-ar
(and the tools in general).
llvm-svn: 299549
Davide Italiano [Wed, 5 Apr 2017 14:52:17 +0000 (14:52 +0000)]
[llvm-ar] errors go on stderr and not on stdout.
llvm-svn: 299548
Jonathan Roelofs [Wed, 5 Apr 2017 14:49:46 +0000 (14:49 +0000)]
Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages
This is a re-work of r297516, which was reverted in r297545.
https://reviews.llvm.org/D30906
llvm-svn: 299547
Davide Italiano [Wed, 5 Apr 2017 14:44:00 +0000 (14:44 +0000)]
[yaml2obj] Improve error message when output file cannot be opened.
Patch by Sam Clegg!
Differential Revision: https://reviews.llvm.org/D31351
llvm-svn: 299546
Matthew Simpson [Wed, 5 Apr 2017 14:34:13 +0000 (14:34 +0000)]
[LV] Make test case more robust
This test case depends on the loop being vectorized without forcing the
vectorization factor. If the profitability ever changes in the future (due to
cost model improvements), the test may no longer work as intended. Instead of
checking the resulting IR, we should just check the instruction costs. The
costs will be computed regardless if vectorization is profitable.
llvm-svn: 299545
Artem Dergachev [Wed, 5 Apr 2017 14:17:36 +0000 (14:17 +0000)]
[analyzer] Add a modular constraint system to the CloneDetector
A big part of the clone detection code is functionality for filtering clones and
clone groups based on different criteria. So far this filtering process was
hardcoded into the CloneDetector class, which made it hard to understand and,
ultimately, to extend.
This patch splits the CloneDetector's logic into a sequence of reusable
constraints that are used for filtering clone groups. These constraints
can be turned on and off and reodreder at will, and new constraints are easy
to implement if necessary.
Unit tests are added for the new constraint interface.
This is a refactoring patch - no functional change intended.
Patch by Raphael Isemann!
Differential Revision: https://reviews.llvm.org/D23418
llvm-svn: 299544
Antonio Maiorano [Wed, 5 Apr 2017 14:13:45 +0000 (14:13 +0000)]
clang-format-vsix: Add "Format on Save" feature
This change adds a feature to the clang-format VS extension that optionally
enables the automatic formatting of documents when saving. Since developers
always need to save their files, this eases the workflow of making sure source
files are properly formatted.
Differential Revision: https://reviews.llvm.org/D29221
llvm-svn: 299543
Sanjay Patel [Wed, 5 Apr 2017 14:09:39 +0000 (14:09 +0000)]
[DAGCombiner] add and use TLI hook to convert and-of-seteq / or-of-setne to bitwise logic+setcc (PR32401)
This is a generic combine enabled via target hook to reduce icmp logic as discussed in:
https://bugs.llvm.org/show_bug.cgi?id=32401
It's likely that other targets will want to enable this hook for scalar transforms,
and there are probably other patterns that can use bitwise logic to reduce comparisons.
Note that we are missing an IR canonicalization for these patterns, and we will probably
prefer the pair-of-compares form in IR (shorter, more likely to fold).
Differential Revision: https://reviews.llvm.org/D31483
llvm-svn: 299542
Alex Lorenz [Wed, 5 Apr 2017 14:07:21 +0000 (14:07 +0000)]
-Wunreachable-code: 'true' and 'false' should not be treated as configuration
macros
Clang should emit -Wunreachable-code warnings in C mode for code that's
unreachable because of a 'false' or '!true' condition.
llvm-svn: 299541
Jonas Paulsson [Wed, 5 Apr 2017 13:45:37 +0000 (13:45 +0000)]
[DAGCombiner] Don't make a BUILD_VECTOR with operands of illegal type.
When DAGCombiner visits a SIGN_EXTEND_INREG of a BUILD_VECTOR with
constant operands, a new BUILD_VECTOR node will be created transformed
constants.
Llvm-stress found a case where the new BUILD_VECTOR had constant operands
of an illegal type, because the (legal) element type is in fact not a legal
scalar type.
This patch changes this so that the new BUILD_VECTOR has the same operand
type as the old one.
Review: Eli Friedman, Nirav Dave
https://bugs.llvm.org//show_bug.cgi?id=32422
llvm-svn: 299540
Sanjay Patel [Wed, 5 Apr 2017 13:33:10 +0000 (13:33 +0000)]
[InstCombine] add tests for missing add canonicalization; NFC
llvm-svn: 299539
Daniel Sanders [Wed, 5 Apr 2017 13:14:03 +0000 (13:14 +0000)]
[globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.
Summary:
Temporaries are now allocated to operands instead of predicates and this
allocation is used to correctly pair up the rendered operands with the
matched operands.
Previously, ComplexPatterns were allocated temporaries independently in the
Src Pattern and Dst Pattern, leading to mismatches. Additionally, the Dst
Pattern failed to account for the allocated index and therefore always used
temporary 0, 1, ... when it should have used base+0, base+1, ...
Thanks to Aditya Nandakumar for noticing the bug.
Depends on D30539
Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar
Reviewed By: rovka
Subscribers: igorb, dberris, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D31054
llvm-svn: 299538
Egor Churaev [Wed, 5 Apr 2017 12:47:10 +0000 (12:47 +0000)]
[OpenCL] Extended diagnostics for atomic initialization
Summary:
I saw the same changes in the following review: https://reviews.llvm.org/D17438
I don't know in that way I could determine that atomic variable was initialized by macro ATOMIC_VAR_INIT. Anyway I added check that atomic variables can be initialize only in global scope.
I think that we can discuss this change.
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D30643
llvm-svn: 299537
Sam Kolton [Wed, 5 Apr 2017 12:00:45 +0000 (12:00 +0000)]
[AMDGPU] SDWA peephole: enable by default
Reviewers: vpykhtin, rampitec, arsenm
Subscribers: qcolombet, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye
Differential Revision: https://reviews.llvm.org/D31671
llvm-svn: 299536
Alexander Kornienko [Wed, 5 Apr 2017 11:50:43 +0000 (11:50 +0000)]
Fix WebAssembly after r299529.
llvm-svn: 299535
Tobias Grosser [Wed, 5 Apr 2017 11:50:31 +0000 (11:50 +0000)]
Add two Polly images
llvm-svn: 299534
Martin Probst [Wed, 5 Apr 2017 10:56:07 +0000 (10:56 +0000)]
clang-format: [JS] fix whitespace around "of" operator.
Summary:
Previously:
import {of } from 'x';
of (null);
Now:
import {of} from 'x';
of(null);
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D31698
llvm-svn: 299533
Simon Pilgrim [Wed, 5 Apr 2017 10:44:42 +0000 (10:44 +0000)]
[X86][SSE] Renamed combine to make it clear that it only handles the vector shift by immediate opcodes. NFCI
llvm-svn: 299532
James Molloy [Wed, 5 Apr 2017 10:44:38 +0000 (10:44 +0000)]
[AArch64] Crypto requires FP.
So if FP is disabled, crypto should also be disabled.
llvm-svn: 299531
Peter Smith [Wed, 5 Apr 2017 10:30:09 +0000 (10:30 +0000)]
[ELF] Make createThunks a class [NFC]
For range extension thunks we will need to repeatedly call createThunks()
until no more thunks are created. We will need to retain the state of
Thunks that we have created so far to avoid recreating them on later
passes. This change does not change the functionality of createThunks().
Differential Revision: https://reviews.llvm.org/D31654
llvm-svn: 299530
Alex Bradbury [Wed, 5 Apr 2017 10:16:14 +0000 (10:16 +0000)]
Add MCContext argument to MCAsmBackend::applyFixup for error reporting
A number of backends (AArch64, MIPS, ARM) have been using
MCContext::reportError to report issues such as out-of-range fixup values in
their TgtAsmBackend. This is great, but because MCContext couldn't easily be
threaded through to the adjustFixupValue helper function from its usual
callsite (applyFixup), these backends ended up adding an MCContext* argument
and adding another call to applyFixup to processFixupValue. Adding an
MCContext parameter to applyFixup makes this unnecessary, and even better -
applyFixup can take a reference to MCContext rather than a potentially null
pointer.
Differential Revision: https://reviews.llvm.org/D30264
llvm-svn: 299529
George Rimar [Wed, 5 Apr 2017 10:03:25 +0000 (10:03 +0000)]
[ELF] - Define __bss_start symbol.
GNU linkers define __bss_start symbol.
Patch teaches LLD to do that. This is PR32051.
Below is part of standart ld.bfd script:
.data1 : { *(.data1) }
_edata = .; PROVIDE (edata = .);
. = .;
__bss_start = .;
.bss :
{
Currently LLD can emit up to 3 .bss* sections as one of testcase shows.
Implementation inserts this symbol before first .bss* output section.
Differential revision: https://reviews.llvm.org/D30419
llvm-svn: 299528
Nitesh Jain [Wed, 5 Apr 2017 09:31:43 +0000 (09:31 +0000)]
Fix a typo introduce in r299200.
llvm-svn: 299527
James Molloy [Wed, 5 Apr 2017 09:24:26 +0000 (09:24 +0000)]
[LAA] Correctly return a half-open range in expandBounds
This is a latent bug that's been hanging around for a while. For a loop-invariant
pointer, expandBounds would return the range {Ptr, Ptr}, but this was interpreted
as a half-open range, not a closed range. So we ended up planting incorrect
bounds checks. Even worse, they were tautological, so we ended up incorrectly
executing the optimized loop.
llvm-svn: 299526
George Rimar [Wed, 5 Apr 2017 09:19:29 +0000 (09:19 +0000)]
Revert r299506 "Simplify. NFC."
It was not NFC unfortunaly,
one of changes decrements begin() iterator and
that is not allowed by MSVS.
llvm-svn: 299525
Egor Churaev [Wed, 5 Apr 2017 09:02:56 +0000 (09:02 +0000)]
[OpenCL] Enables passing sampler initializer to function argument
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: yaxunl, bader
Differential Revision: https://reviews.llvm.org/D31594
llvm-svn: 299524
Daniel Marjamaki [Wed, 5 Apr 2017 08:57:04 +0000 (08:57 +0000)]
[analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe
Summary:
The alpha.core.Conversion was too strict about compound assignments and could warn even though there is no problem.
Differential Revision: https://reviews.llvm.org/D25596
llvm-svn: 299523
Stephan Bergmann [Wed, 5 Apr 2017 08:36:58 +0000 (08:36 +0000)]
Don't issue a warning if the shadowing declaration is in a class
Follow-up to r299363 "Enhance -Wshadow to warn when shadowing typedefs or type
aliases".
Patch by Ahmed Asadi.
Differential Revision: https://reviews.llvm.org/D31235
llvm-svn: 299522
Rui Ueyama [Wed, 5 Apr 2017 05:50:28 +0000 (05:50 +0000)]
Make readAssert() to return an AssertCommand object.
llvm-svn: 299521
Rui Ueyama [Wed, 5 Apr 2017 05:50:08 +0000 (05:50 +0000)]
Add a file comment.
llvm-svn: 299520
Rui Ueyama [Wed, 5 Apr 2017 05:40:21 +0000 (05:40 +0000)]
Simplify. NFC.
Looks like we can use consume() in many more places.
llvm-svn: 299519
Rui Ueyama [Wed, 5 Apr 2017 05:40:01 +0000 (05:40 +0000)]
Inline leftShift and rightShift. NFC.
llvm-svn: 299518
Gor Nishanov [Wed, 5 Apr 2017 05:26:26 +0000 (05:26 +0000)]
[coroutines] Add syntax coloring to examples in Coroutines.rst
Subscribers: EricWF
Differential Revision: https://reviews.llvm.org/D31699
llvm-svn: 299517
Rui Ueyama [Wed, 5 Apr 2017 05:08:01 +0000 (05:08 +0000)]
Do not make ScriptParser class public.
This class is used only within this file, so it can be file-local.
llvm-svn: 299516
Rui Ueyama [Wed, 5 Apr 2017 05:07:39 +0000 (05:07 +0000)]
Move the parser for the linker script to a separate file.
LinkerScript.cpp contains both the linker script processor and the
linker script parser. I put both into a single file, but the file grown
too large, so it's time to put them into two different files.
llvm-svn: 299515
Rui Ueyama [Wed, 5 Apr 2017 05:07:18 +0000 (05:07 +0000)]
Remove unused typedef.
llvm-svn: 299514
Rui Ueyama [Wed, 5 Apr 2017 05:06:58 +0000 (05:06 +0000)]
Do not use public inheritance where it is not needed.
ScriptParser is not a ScriptLexer, so this should be a private inheritance.
llvm-svn: 299513
Rui Ueyama [Wed, 5 Apr 2017 05:06:37 +0000 (05:06 +0000)]
Simplify. NFC.
llvm-svn: 299512
Rui Ueyama [Wed, 5 Apr 2017 05:06:17 +0000 (05:06 +0000)]
Simplify. NFC.
A for-loop is more boring than a find_if, but I think this is easier to read.
llvm-svn: 299511
Gor Nishanov [Wed, 5 Apr 2017 04:55:03 +0000 (04:55 +0000)]
[coroutines] Add coro.end handling
Summary:
For WinEH, We add a funclet bundle to a coro.end call, so that CoroSplit in LLVM can replace it with cleanup ret and cut the rest out.
For landing pad, we add a branch to resume block if coro.end returns true.
LLVM Part: https://reviews.llvm.org/D25445
Reviewers: majnemer
Reviewed By: majnemer
Subscribers: EricWF, cfe-commits, rsmith, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25444
llvm-svn: 299510
Rui Ueyama [Wed, 5 Apr 2017 03:52:47 +0000 (03:52 +0000)]
Fix memory leak found by asan.
llvm-svn: 299509
Rui Ueyama [Wed, 5 Apr 2017 03:52:28 +0000 (03:52 +0000)]
Simplify and update comment.
llvm-svn: 299508
Akira Hatanaka [Wed, 5 Apr 2017 03:44:09 +0000 (03:44 +0000)]
[ObjCArc] Do not dereference an invalidated iterator.
Fix a bug in ARC contract pass where an iterator that pointed to a
deleted instruction was dereferenced.
It appears that tryToContractReleaseIntoStoreStrong was incorrectly
assuming that a call to objc_retain would not immediately follow a call
to objc_release.
rdar://problem/
25276306
llvm-svn: 299507
Rui Ueyama [Wed, 5 Apr 2017 03:21:01 +0000 (03:21 +0000)]
Simplify. NFC.
llvm-svn: 299506
Rui Ueyama [Wed, 5 Apr 2017 03:20:42 +0000 (03:20 +0000)]
Use make to create linker script command objects.
It simplifies variable types.
llvm-svn: 299505
Rui Ueyama [Wed, 5 Apr 2017 03:20:22 +0000 (03:20 +0000)]
Remove default arguments because they don't improve readability.
llvm-svn: 299504
Rui Ueyama [Wed, 5 Apr 2017 03:20:03 +0000 (03:20 +0000)]
Add parentheses around `&`.
llvm-svn: 299503
Rui Ueyama [Wed, 5 Apr 2017 03:19:43 +0000 (03:19 +0000)]
Update comment.
llvm-svn: 299502
Rui Ueyama [Wed, 5 Apr 2017 03:19:24 +0000 (03:19 +0000)]
Use empty() instead of size().
`!V.size()` where V is a vector is equivalent to `V.empty()`.
llvm-svn: 299501
Rui Ueyama [Wed, 5 Apr 2017 03:19:06 +0000 (03:19 +0000)]
Simplify. NFC.
llvm-svn: 299500
Rui Ueyama [Wed, 5 Apr 2017 03:18:46 +0000 (03:18 +0000)]
Make variable names consistent. NFC.
llvm-svn: 299499
Rui Ueyama [Wed, 5 Apr 2017 02:05:48 +0000 (02:05 +0000)]
Return a result from computeInputSections instead of mutating its argument.
This should improve readability.
llvm-svn: 299498
Lang Hames [Wed, 5 Apr 2017 01:43:59 +0000 (01:43 +0000)]
[RuntimeDyld] Remove an unused static member left over from r299449.
llvm-svn: 299497
Bob Haarman [Wed, 5 Apr 2017 00:43:54 +0000 (00:43 +0000)]
[COFF] support /ERRORLIMIT option
Summary:
This adds support for reporting multiple errors in a single invocation of lld-link. The limit defaults to 20 and can be changed with the /ERRORLIMIT command line parameter, or set to unlimited by passing a value of 0.
This is a new attempt after r295507, which was reverted because opening files raced with exiting early, causing the test to be flaky. This version avoids the race by exiting before calling enqueuePath.
Reviewers: pcc, ruiu
Reviewed By: ruiu
Subscribers: llvm-commits, dblaikie
Differential Revision: https://reviews.llvm.org/D31688
llvm-svn: 299496
Rui Ueyama [Wed, 5 Apr 2017 00:43:45 +0000 (00:43 +0000)]
Remove `=` from a lambda that doesn't capture any variable.
llvm-svn: 299495
Rui Ueyama [Wed, 5 Apr 2017 00:43:25 +0000 (00:43 +0000)]
Inline small functions that are used only once as lambdas.
llvm-svn: 299494
Rui Ueyama [Wed, 5 Apr 2017 00:43:05 +0000 (00:43 +0000)]
Add newlines.
llvm-svn: 299493
Rui Ueyama [Wed, 5 Apr 2017 00:42:45 +0000 (00:42 +0000)]
Make dummy variable's scope smaller.
llvm-svn: 299492
Bob Haarman [Wed, 5 Apr 2017 00:42:07 +0000 (00:42 +0000)]
ThinLTOBitcodeWriter: handle aliases first in filterModule
Summary: This change fixes a "local linkage requires default visibility" assert when attempting to build LLVM with ThinLTO on Windows.
Reviewers: pcc, tejohnson, mehdi_amini
Reviewed By: pcc
Subscribers: llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D31632
llvm-svn: 299491
Ahmed Bougacha [Wed, 5 Apr 2017 00:14:39 +0000 (00:14 +0000)]
[X86] Relax assert in broadcast-of-subvector lowering.
Before r294774, there was a problem when lowering broadcasts to use
128-bit subvectors.
When we looked through a bitcast to find the broadcast input, we'd keep
using the original type, so you'd end up with things like:
(v8f32 (broadcast
(v4f32 (extract_subvector
(v8i32 V),
...))
))
r294774 fixed it to always emit subvectors with the scalar type of the
original source.
It also introduced some asserts, to check that we use scalars with
the same size, and vectors with the same number of elements.
The scalar size equality is checked earlier when looking through bitcasts,
and is a useful assert.
However, the number of elements don't have to be identical: we're always
going to extract a 128-bit subvector, and we can have different size
inputs if we looked through a concat_vector to find a 256-bit source.
Relax the overzealous assert.
Replace it with a check of the original source vector being 256 or 512
bits. If it's 128 bits, we can't extract_subvector from it.
Fixes PR32371.
llvm-svn: 299490
Jim Ingham [Wed, 5 Apr 2017 00:08:21 +0000 (00:08 +0000)]
Reverting r299374 & r299402 due to testsuite failure.
This caused a failure in the test case:
functionalities/breakpoint/objc/TestObjCBreakpoints.py
When we are parsing up names we stick interesting parts of the names
in various buckets, one of which is the ObjC selector bucket. The new
C++ name parser must be interfering with this process somehow.
<rdar://problem/
31439305>
llvm-svn: 299489
Adam Nemet [Tue, 4 Apr 2017 23:46:34 +0000 (23:46 +0000)]
Another attempt to fix the sphinx warning from r299470
llvm-svn: 299488
Matt Arsenault [Tue, 4 Apr 2017 23:44:46 +0000 (23:44 +0000)]
Allow targets to opt-in to codegen in SCC order
Decouple this setting from EnableIRPA.
To support function calls on AMDGPU, it is necessary to
report the global register usage throughout the kernel's
call graph, so callees need to be handled first.
llvm-svn: 299487
Daniel Berlin [Tue, 4 Apr 2017 23:43:10 +0000 (23:43 +0000)]
Re-apply MemorySSA: Add support for caching clobbering access in
stores with some fixes.
Summary:
This enables us to cache the clobbering access for stores, despite the
fact that we can't rewrite the use-def chains themselves.
Early testing shows that, after this change, for larger testcases, it
will be a significant net positive (memory and time) to remove the
walker caching.
Reviewers: george.burgess.iv, davide
Subscribers: Prazek, llvm-commits
Differential Revision: https://reviews.llvm.org/D31567
llvm-svn: 299486
Daniel Berlin [Tue, 4 Apr 2017 23:43:04 +0000 (23:43 +0000)]
Revert "MemorySSA: Add support for caching clobbering access in stores"
This reverts revision r299322.
llvm-svn: 299485
Petr Hosek [Tue, 4 Apr 2017 23:32:45 +0000 (23:32 +0000)]
[MC] Set defaults based on section names and support name suffixes
Set correct default flags and section type based on its name for .text,
.data, .bss, .init_array, .fini_array, .preinit_array, .tdata, and .tbss
and support section name suffixes for .data.*, .rodata.*, .text.*,
.bss.*, .tdata.* and .tbss.* which matches the behavior of GAS.
Fixes PR31888.
Differential Revision: https://reviews.llvm.org/D30229
llvm-svn: 299484
Ahmed Bougacha [Tue, 4 Apr 2017 22:55:53 +0000 (22:55 +0000)]
[AArch64] Avoid partial register deps on insertelt of load into lane 0.
This improves upon r246462: that prevented FMOVs from being emitted
for the cross-class INSERT_SUBREGs by disabling the formation of
INSERT_SUBREGs of LOAD. But the ld1.s that we started selecting
caused us to introduce partial dependencies on the vector register.
Avoid that by using SCALAR_TO_VECTOR: it's a first-class citizen that
is folded away by many patterns, including the scalar LDRS that we
want in this case.
Credit goes to Adam for finding the issue!
llvm-svn: 299482
Adam Nemet [Tue, 4 Apr 2017 22:45:20 +0000 (22:45 +0000)]
Fix sphinx warning from r299470
llvm-svn: 299481
Evgeniy Stepanov [Tue, 4 Apr 2017 22:35:16 +0000 (22:35 +0000)]
Change section flag character for SHF_LINK_ORDER to "o".
See matching MC change in https://reviews.llvm.org/D31554.
llvm-svn: 299480
Evgeniy Stepanov [Tue, 4 Apr 2017 22:35:08 +0000 (22:35 +0000)]
Change section flag character for SHF_LINK_ORDER to "o".
GAS uses "m" as a compatibility alias for "M" (SHF_MERGE).
"o" is free, except on ia64, where it already means SHF_LINK_ORDER.
llvm-svn: 299479
Rafael Espindola [Tue, 4 Apr 2017 22:33:02 +0000 (22:33 +0000)]
Avoid calling basename to compute xdynamiclib_namespec.
This also exposes a xdynamiclib_filename that can be used to simplify
a few tests.
llvm-svn: 299478
Craig Topper [Tue, 4 Apr 2017 22:22:30 +0000 (22:22 +0000)]
[InstCombine] Add test cases for various add/subtracts of constants(scalar, splat, and vector) with phis and selects. Improvements coming in a future commit.
llvm-svn: 299476
Rafael Espindola [Tue, 4 Apr 2017 22:20:18 +0000 (22:20 +0000)]
[lit] Add a minimum export implementation.
llvm-svn: 299475
Sanjay Patel [Tue, 4 Apr 2017 22:06:03 +0000 (22:06 +0000)]
[InstCombine] rename variable for easier reading; NFC
We usually give constants a 'C' somewhere in the name...
llvm-svn: 299474
Meador Inge [Tue, 4 Apr 2017 21:46:50 +0000 (21:46 +0000)]
[Driver] Add option to print the resource directory
This patch adds the option -print-resource-dir. It simply
prints the resource directory. This information will eventually
be used in compiler-rt to setup COMPILER_RT_LIBRARY_INSTALL_DIR.
Patch by Catherine Moore!
Differential Revision: https://reviews.llvm.org/D31447
llvm-svn: 299473
Craig Topper [Tue, 4 Apr 2017 21:44:56 +0000 (21:44 +0000)]
[InstCombine] Turn subtract of vectors of i1 into xor like we do for scalar i1. Matches what we already do for add.
llvm-svn: 299472
Rafael Espindola [Tue, 4 Apr 2017 21:42:59 +0000 (21:42 +0000)]
Don't remove the cwd.
This works with a regular shell since the kernel can keep track of a
deleted cwd. Since we just keep a path string, the following
subprocess invocations fail.
I think this would also fail on windows.
llvm-svn: 299471
Adam Nemet [Tue, 4 Apr 2017 21:18:36 +0000 (21:18 +0000)]
Add #pragma clang fp
This adds the new pragma and the first variant, contract(on/off/fast).
The pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be
placed at the beginning of a compound statement or at file scope.
Similarly to STDC FP_CONTRACT there is no need to use attributes. First an
annotate token is inserted with the parsed details of the pragma. Then the
annotate token is parsed in the proper contexts and the Sema is updated with
the corresponding FPOptions using the shared ActOn function with STDC
FP_CONTRACT.
After this the FPOptions from the Sema is propagated into the AST expression
nodes. There is no change here.
I was going to add a 'default' option besides 'on/off/fast' similar to STDC
FP_CONTRACT but then decided against it. I think that we'd have to make option
uppercase then to avoid using 'default' the keyword. Also because of the
scoped activation of pragma I am not sure there is really a need a for this.
Differential Revision: https://reviews.llvm.org/D31276
llvm-svn: 299470
Adam Nemet [Tue, 4 Apr 2017 21:18:30 +0000 (21:18 +0000)]
Set FMF for -ffp-contract=fast
With this, FMF(contract) becomes an alternative way to express the request to
contract.
These are currently only propagated for FMul, FAdd and FSub. The rest will be
added as more FMFs are hooked up for this.
This is toward fixing PR25721.
Differential Revision: https://reviews.llvm.org/D31168
llvm-svn: 299469
Balaram Makam [Tue, 4 Apr 2017 21:15:53 +0000 (21:15 +0000)]
[AArch64] Add missing schedinfo, check completeness for Falkor.
llvm-svn: 299468
Keno Fischer [Tue, 4 Apr 2017 20:30:47 +0000 (20:30 +0000)]
[ExecutionDepsFix] Don't revisit true dependencies
If an instruction has a true dependency, it makes sense for to use that
register for any undef read operands in the same instruction (we'll have
to wait for that register to become available anyway). This logic
was already implemented. However, the code would then still try to
revisit that instruction and break the dependency (and always fail,
since by definition a true dependency has to be live before the
instruction). Avoid revisiting such instructions as a performance
optimization. No functional change.
Differential Revision: https://reviews.llvm.org/D30173
llvm-svn: 299467
Craig Topper [Tue, 4 Apr 2017 20:26:25 +0000 (20:26 +0000)]
[InstCombine] Support folding and/or/xor with a constant vector RHS into selects and phis
Currently we only fold with ConstantInt RHS. This generalizes to any Constant RHS.
Differential Revision: https://reviews.llvm.org/D31610
llvm-svn: 299466
Matthias Gehre [Tue, 4 Apr 2017 20:11:13 +0000 (20:11 +0000)]
[clang-format] fix crash in NamespaceEndCommentsFixer (PR32438)
Summary:
The new test case was crashing before. Now it passes
as expected.
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D31441
llvm-svn: 299465