OSDN Git Service
Craig Topper [Sat, 4 Feb 2017 23:26:37 +0000 (23:26 +0000)]
[DAGCombiner] Use DAG.getAnyExtOrTrunc to simplify some code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294109
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Feb 2017 23:26:34 +0000 (23:26 +0000)]
[DAGCombiner] In visitINSERT_VECTOR_ELT, move check for BUILD_VECTOR being legal below code that just canonicalizes INSERT_VECTOR_ELT without creating BUILD_VECTORS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294108
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sat, 4 Feb 2017 22:53:07 +0000 (22:53 +0000)]
Add test cases for (trunc adde) DAGCombiner patterns. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294105
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Denisov [Sat, 4 Feb 2017 22:49:22 +0000 (22:49 +0000)]
TripleTest.FileFormat: check non-default value
Triple::objectFormat defaults to an Elf format.
Changing objectFormat to Elf doesn't make any difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294104
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Sat, 4 Feb 2017 22:24:55 +0000 (22:24 +0000)]
Add lld to the test-release.sh script
Building lld is enabled by default, but it can be disabled using the
-no-lld option.
Reviewers: tstellarAMD, rengolin, hans
Reviewed By: hans
Subscribers: grosser, wdng, emaste, llvm-commits
Differential Revision: https://reviews.llvm.org/D29539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294102
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 4 Feb 2017 22:17:22 +0000 (22:17 +0000)]
[X86][SSE] Add target shuffle combine buildvec style tests
Extra tests for D29399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294101
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 4 Feb 2017 19:44:14 +0000 (19:44 +0000)]
[IPCP] Don't propagate return value for naked functions.
This is pretty much the same change made in SCCP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294098
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Denisov [Sat, 4 Feb 2017 18:20:20 +0000 (18:20 +0000)]
TripleTest.BitWidthArchVariants: add missing arch types (thumb, arm, le, ...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294096
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Denisov [Sat, 4 Feb 2017 17:04:50 +0000 (17:04 +0000)]
TripleTest.EndianArchVariants: add missing arch types (tce, le)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294095
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sat, 4 Feb 2017 13:01:53 +0000 (13:01 +0000)]
Formatting in DAGCombiner. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294091
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sat, 4 Feb 2017 07:40:43 +0000 (07:40 +0000)]
Fix variable name /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294090
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Feb 2017 03:09:42 +0000 (03:09 +0000)]
[CodeGen] Add v32i1 to is32BitVector and v64i1 to is64BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294089
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 4 Feb 2017 02:27:20 +0000 (02:27 +0000)]
MachineCopyPropagation: Respect implicit operands of COPY
The code missed to check implicit operands of COPY instructions for
defs/uses.
Differential Revision: https://reviews.llvm.org/D29522
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294088
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 4 Feb 2017 02:27:13 +0000 (02:27 +0000)]
MachineCopyPropagation: Do not consider undef operands as clobbers
This was originally introduced in r278321 to work around correctness
problems in the ExecutionDepsFix pass; Probably also to keep the
performance benefits of breaking the false dependencies which of course
also affect undef operands.
ExecutionDepsFix has been improved here recently (see for example
r278321) so we should not need this exception any longer.
Differential Revision: https://reviews.llvm.org/D29525
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294087
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Sat, 4 Feb 2017 02:26:34 +0000 (02:26 +0000)]
[CodeGen]: BlockPlacement: Skip extraneous logging.
Move a check for blocks that are not candidates for tail duplication up before
the logging. Reduces logging noise. No non-logging changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294086
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Sat, 4 Feb 2017 02:26:32 +0000 (02:26 +0000)]
[CodeGen]: BlockPlacement: Apply const liberally. NFC
Anything that needs to be passed to AnalyzeBranch unfortunately can't be const,
or more would be const. Added const_iterator to BlockChain to allow
BlockChain to be const when we don't expect to change it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294085
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Sat, 4 Feb 2017 02:00:53 +0000 (02:00 +0000)]
[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce TargetInstrInfo.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294084
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Feb 2017 01:58:10 +0000 (01:58 +0000)]
[TwoAddressInstruction] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294083
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 4 Feb 2017 01:54:56 +0000 (01:54 +0000)]
[NVPTX] Add tests that invariant vector loads get lowered to ld.global.nc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294082
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 4 Feb 2017 01:52:17 +0000 (01:52 +0000)]
Remove a bunch of unnecessary casts to a target specific version of TII and TRI as we're working from a target specific STI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294081
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sat, 4 Feb 2017 01:48:30 +0000 (01:48 +0000)]
Add test cases for bug 31719. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294080
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Sat, 4 Feb 2017 01:28:44 +0000 (01:28 +0000)]
fix nullptr Mangler in LTOModule
Reviewers: kcc, pcc
Subscribers: mehdi_amini
Differential Revision: https://reviews.llvm.org/D29523
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294079
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sat, 4 Feb 2017 00:47:10 +0000 (00:47 +0000)]
[GlobalISel] Add a few comments to the tablegen backend. NFC.
Based on a review of D29478 by Kristof Beyls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294077
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sat, 4 Feb 2017 00:47:08 +0000 (00:47 +0000)]
[GlobalISel] Print the matched patterns using an action.
This lets us split out PatternToMatch from the top-level RuleMatcher,
where it doesn't really belong. That, in turn, lets us eventually
generate RuleMatchers from non-SelectionDAG sources.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294076
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sat, 4 Feb 2017 00:47:05 +0000 (00:47 +0000)]
[GlobalISel] Add a test for the tablegen selector emitter backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294075
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sat, 4 Feb 2017 00:47:02 +0000 (00:47 +0000)]
[GlobalISel] Separate matchers with newlines in emitted selector. NFC.
We don't try very hard to format the emitted code, but newlines
are an easy way to make it more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294074
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Sat, 4 Feb 2017 00:46:59 +0000 (00:46 +0000)]
[Support] Simplify triple check in Host CPU test. NFC.
Cleanup the check added in r293990 using the Triple helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294073
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Sat, 4 Feb 2017 00:36:49 +0000 (00:36 +0000)]
[Sparc] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294072
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Sat, 4 Feb 2017 00:10:22 +0000 (00:10 +0000)]
[RegisterCoalescer] Do not call getInstructionIndex with DBG_VALUE
An assert occurs when calling SlotIndexes::getInstructionIndex with
a DBG_VALUE instruction because the function expects an instruction
with a slot index. However, there is no slot index for a DBG_VALUE
instruction.
Differential Revision: https://reviews.llvm.org/D29048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294070
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 3 Feb 2017 23:39:33 +0000 (23:39 +0000)]
[Mips] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294069
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 3 Feb 2017 23:39:06 +0000 (23:39 +0000)]
[SystemZ] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294068
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 3 Feb 2017 23:38:40 +0000 (23:38 +0000)]
[AMDGPU] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294067
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 3 Feb 2017 23:13:11 +0000 (23:13 +0000)]
[InstCombine] treat i1 as a special type in shouldChangeType()
This patch is based on the llvm-dev discussion here:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109631.html
Folding to i1 should always be desirable because that's better for value tracking
and we have special folds for i1 types.
I checked for other users of shouldChangeType() where this might have an effect,
but we already handle the i1 case differently than other types in all of those cases.
Side note: the default datalayout includes i1, so it seems we only find this gap in
shouldChangeType + phi folding for the case when there is (1) an explicit datalayout
without i1, (2) casting to i1 from a legal type, and (3) a phi with exactly 2 incoming
casted operands (as Björn mentioned).
Differential Revision: https://reviews.llvm.org/D29336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294066
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Fri, 3 Feb 2017 22:54:41 +0000 (22:54 +0000)]
[APInt] Add integer API bor bitwise operations.
Summary: As per title. I ran into that limitation of the API doing some other work, so I though that'd be a nice addition.
Reviewers: jroelofs, compnerd, majnemer
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29503
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294063
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 3 Feb 2017 22:51:38 +0000 (22:51 +0000)]
[libFuzzer] properly hide the memcmp interceptor from msan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294061
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 3 Feb 2017 21:57:51 +0000 (21:57 +0000)]
[PGO] Add select instr profile in graph dump
Differential Revision: http://reviews.llvm.org/D29474
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294055
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 3 Feb 2017 21:49:13 +0000 (21:49 +0000)]
[AArch64] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294053
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 3 Feb 2017 21:48:12 +0000 (21:48 +0000)]
[ARM] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294052
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 3 Feb 2017 21:46:55 +0000 (21:46 +0000)]
[XCore] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294051
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 3 Feb 2017 21:43:34 +0000 (21:43 +0000)]
[InstCombine] fix operand-complexity-based canonicalization (PR28296)
The code comments didn't match the code logic, and we didn't actually distinguish the fake unary (not/neg/fneg)
operators from arguments. Adding another level to the weighting scheme provides more structure and can help
simplify the pattern matching in InstCombine and other places.
I fixed regressions that would have shown up from this change in:
rL290067
rL290127
But that doesn't mean there are no pattern-matching logic holes left; some combines may just be missing regression tests.
Should fix:
https://llvm.org/bugs/show_bug.cgi?id=28296
Differential Revision: https://reviews.llvm.org/D27933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294049
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Fri, 3 Feb 2017 21:28:16 +0000 (21:28 +0000)]
[AMDGPU][mc][tests][NFC] Add coverage/smoke Gfx7 asm test (3rd attempt)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294047
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 3 Feb 2017 21:22:27 +0000 (21:22 +0000)]
Properly parse the TypeServer2 record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294046
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 3 Feb 2017 20:56:38 +0000 (20:56 +0000)]
[InstCombine] auto-generate better test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294040
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 3 Feb 2017 20:49:51 +0000 (20:49 +0000)]
AMDGPU: AsmParser cleanups
Use typedef, remove unnecessary enum, line wraps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294039
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 3 Feb 2017 20:49:48 +0000 (20:49 +0000)]
AMDGPU: Cleanup scalar_to_vector test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294038
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 3 Feb 2017 20:26:44 +0000 (20:26 +0000)]
[libfuzzer] chromium-related compilation fixes
Reviewers: kcc
Differential Revision: https://reviews.llvm.org/D29502
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294035
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 3 Feb 2017 20:19:33 +0000 (20:19 +0000)]
[InstCombine] auto-generate better test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294034
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Fri, 3 Feb 2017 20:08:29 +0000 (20:08 +0000)]
[AMDGPU] Bump -amdgpu-unroll-threshold-private to 2000
This has quite positive performance impact according to measurements.
Before previous fixes to limit the optimization that was too high
and blowed compile time and scratch usage, but now this is gone and
we can bump the threshold.
Differential Revision: https://reviews.llvm.org/D29505
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294032
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 3 Feb 2017 20:02:23 +0000 (20:02 +0000)]
AMDGPU: Set MCAsmInfo::PointerSize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294031
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 3 Feb 2017 19:36:00 +0000 (19:36 +0000)]
AMDGPU: Don't unroll for private with dynamic allocas
This won't be elimnated, so this will just bloat code
if/when these are ever used/supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294030
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Fri, 3 Feb 2017 19:32:50 +0000 (19:32 +0000)]
[SLP] Make sortMemAccesses explicitly return an error. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294029
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 3 Feb 2017 19:11:19 +0000 (19:11 +0000)]
[TLI] Robustize SDAG LibFunc proto checking by merging it into TLI.
This re-applies commit r292189, reverted in r292191.
SelectionDAGBuilder recognizes libfuncs using some homegrown
parameter type-checking.
Use TLI instead, removing another heap of redundant code.
This isn't strictly NFC, as the SDAG code was too lax.
Concretely, this means changes are required to a few tests:
- calling a non-variadic function via a variadic prototype isn't OK;
it just happens to work on x86_64 (but not on, e.g., aarch64).
- mempcpy has a size_t parameter; the SDAG code accepts any integer
type, which meant using i32 on x86_64 worked.
- a handful of SystemZ tests check the SDAG support for lax prototype
checking: Ulrich agrees on removing them.
I don't think it's worth supporting any of these (IMO) invalid
testcases. Instead, fix them to be more meaningful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294028
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Fri, 3 Feb 2017 19:09:45 +0000 (19:09 +0000)]
[SLP] Use SCEV to sort memory accesses.
This generalizes memory access sorting to use differences between SCEVs,
instead of relying on constant offsets. That allows us to properly do
SLP vectorization of non-sequentially ordered loads within loops bodies.
Differential Revision: https://reviews.llvm.org/D29425
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294027
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 3 Feb 2017 18:22:45 +0000 (18:22 +0000)]
GlobalISel: translate dynamic alloca instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294022
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 3 Feb 2017 18:22:04 +0000 (18:22 +0000)]
Fix a bug in llvm-obdump(1) with the -objc-meta-data flag with -macho
which caused a hang on a malformed binary with bad bind info.
rdar://
29672108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294021
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 3 Feb 2017 17:59:58 +0000 (17:59 +0000)]
[X86][SSE] Add support for combining scalar_to_vector(extract_vector_elt) into a target shuffle.
Correctly flagging upper elements as undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294020
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 3 Feb 2017 17:31:01 +0000 (17:31 +0000)]
[X86][SSE] Renamed all_of/any_of reduction patterns tests
Make it clear these tests sign-extend the comparison result. Some patterns zero-extend to a bool result that we still need to handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294018
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Fri, 3 Feb 2017 17:12:43 +0000 (17:12 +0000)]
NFC: [LoopUnroll] More meaningful message in tracing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294017
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 3 Feb 2017 17:01:14 +0000 (17:01 +0000)]
IRMover: Merge flags LinkModuleInlineAsm and IsPerformingImport.
Currently these flags are always the inverse of each other, so there is
no need to keep them separate.
Differential Revision: https://reviews.llvm.org/D29471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294016
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 3 Feb 2017 16:58:19 +0000 (16:58 +0000)]
ModuleLinker: Remove importing support. NFCI.
Differential Revision: https://reviews.llvm.org/D29470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294015
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 3 Feb 2017 16:56:27 +0000 (16:56 +0000)]
FunctionImport: Use IRMover directly.
The importer was previously using ModuleLinker in a sort of "IRMover mode". Use
IRMover directly instead in order to remove a level of indirection.
I will remove all importing support from ModuleLinker in a separate
change.
Differential Revision: https://reviews.llvm.org/D29468
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294014
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 3 Feb 2017 16:53:55 +0000 (16:53 +0000)]
Object: Handle files without a dynamic symbol table.
Differential Revision: https://reviews.llvm.org/D29482
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294013
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Fri, 3 Feb 2017 15:48:53 +0000 (15:48 +0000)]
[mips] Remove absolute size assertion for end directive
The .end <symbol> directive for MIPS marks the end of a symbol and sets the
symbol's size. Previously, the corresponding emitDirective handler asserted
that a function's size could be evaluated to an absolute value at that point
in time.
This cannot be done with when directives like .align have been encountered,
instead set the function's size to the corresponding symbolic expression and
let ELFObjectWriter resolve the expression to an absolute value. This avoids
a redundant call to evaluateAsAbsolute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294012
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 3 Feb 2017 15:13:50 +0000 (15:13 +0000)]
[NVPTX] Enable combineRepeatedFPDivisors for NVPTX.
Reviewers: tra
Subscribers: jholewinski, llvm-commits
Differential Revision: https://reviews.llvm.org/D29477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294011
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 3 Feb 2017 15:13:34 +0000 (15:13 +0000)]
[ADT] Fix comment on StringRef::take_back. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294010
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 3 Feb 2017 14:18:35 +0000 (14:18 +0000)]
[globalisel] Fix missing break.
The instruction selector has been emitting the register bank information too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294007
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Fri, 3 Feb 2017 12:47:30 +0000 (12:47 +0000)]
[AMDGPU][mc] Fix AddressSanitizer leftover issue in gfx7_asm_all test
Issue occurs when assembling "ds_ordered_count v0, v0 gds".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294004
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Fri, 3 Feb 2017 12:28:40 +0000 (12:28 +0000)]
[SelectionDAG] Fix for PR30775: Assertion `NodeToMatch->getOpcode() !=
ISD::DELETED_NODE && "NodeToMatch was removed partway through
selection"' failed.
NodeToMatch can be modified during matching, but code does not handle
this situation.
Differential Revision: https://reviews.llvm.org/D29292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294003
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanne Wouda [Fri, 3 Feb 2017 11:15:53 +0000 (11:15 +0000)]
[ARM] Change TCReturn to tBL if tailcall optimization fails.
Summary:
The tail call optimisation is performed before register allocation, so
at that point we don't know if LR is being spilt or not. If LR was spilt
to the stack, then we cannot do a tail call optimisation. That would
involve popping back into LR which is not possible in Thumb1 code.
Reviewers: rengolin, jmolloy, rovka, olista01
Reviewed By: olista01
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D29020
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294000
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanne Wouda [Fri, 3 Feb 2017 11:14:39 +0000 (11:14 +0000)]
[LLC] Add an inline assembly diagnostics handler.
Summary:
llc would hit a fatal error for errors in inline assembly. The
diagnostics message is now printed.
Reviewers: rengolin, MatzeB, javed.absar, anemet
Reviewed By: anemet
Subscribers: jyknight, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D29408
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293999
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanne Wouda [Fri, 3 Feb 2017 10:56:57 +0000 (10:56 +0000)]
Test commit: remove a blank line.
Testing commit access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293998
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Fri, 3 Feb 2017 08:08:50 +0000 (08:08 +0000)]
[SLP] Fix for PR31690: Allow using of extra values in horizontal reductions.
Currently LLVM supports vectorization of horizontal reduction
instructions with initial value set to 0. Patch supports vectorization
of reduction with non-zero initial values. Also it supports a
vectorization of instructions with some extra arguments, like:
float f(float x[], int a, int b) {
float p = a % b;
p += x[0] + 3;
for (int i = 1; i < 32; i++)
p += x[i];
return p;
}
Patch allows vectorization of this kind of horizontal reductions.
Differential Revision: https://reviews.llvm.org/D28961
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293994
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 3 Feb 2017 07:41:43 +0000 (07:41 +0000)]
Revert "[ThinLTO] Add an auto-hide feature"
This reverts commit r293970.
After more discussion, this belongs to the linker side and
there is no added value to do it at this level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293993
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Fri, 3 Feb 2017 02:20:05 +0000 (02:20 +0000)]
[AMDGPU] Unroll preferences improvements
Exit loop analysis early if suitable private access found.
Do not account for GEPs which are invariant to loop induction variable.
Do not account for Allocas which are too big to fit into register file anyway.
Add option for tuning: -amdgpu-unroll-threshold-private.
Differential Revision: https://reviews.llvm.org/D29473
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293991
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 3 Feb 2017 01:32:39 +0000 (01:32 +0000)]
[Support] Accept macosx triple as 'darwin' in Host unittest. NFC.
If LLVM was configured with an x86_64-apple-macosx host triple, this
test would fail, as the API works but the triple isn't in the whitelist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293990
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Fri, 3 Feb 2017 01:08:06 +0000 (01:08 +0000)]
[sanitizer coverage] Fix Instrumentation to work on Windows.
On Windows, the symbols "___stop___sancov_guards" and "___start___sancov_guards"
are not defined automatically. So, we need to take a different approach.
We define 3 sections:
Section ".SCOV$A" will only hold a variable ___start___sancov_guard.
Section ".SCOV$M" will hold the main data.
Section ".SCOV$Z" will only hold a variable ___stop___sancov_guards.
When linking, they will be merged sorted by the characters after the $, so we
can use the pointers of the variables ___[start|stop]___sancov_guard to know the
actual range of addresses of that section.
In this diff, I updated instrumentation to include all the guard arrays in
section ".SCOV$M".
Differential Revision: https://reviews.llvm.org/D28434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293987
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 3 Feb 2017 00:51:50 +0000 (00:51 +0000)]
AMDGPU: Fold fneg into fmin/fmax_legacy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293972
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 3 Feb 2017 00:44:18 +0000 (00:44 +0000)]
DebugInfo: ensure type and namespace names are included in pubnames/pubtypes even when they are only present in type units
While looking to add support for placing singular types (types that will
only be emitted in one place (such as attached to a strong vtable or
explicit template instantiation definition)) not in type units (since
type units have overhead) I stumbled across that change causing an
increase in pubtypes.
Turns out we were missing some types from type units if they were only
referenced from other type units and not from the debug_info section.
This fixes that, following GCC's line of describing the offset of such
entities as the CU die (since there's no compile unit-relative offset
that would describe such an entity - they aren't in the CU). Also like
GCC, this change prefers to describe the type stub within the CU rather
than the "just use the CU offset" fallback where possible. This may give
the DWARF consumer some opportunity to find the extra info in the type
stub - though I'm not sure GDB does anything with this currently.
The size of the pubnames/pubtypes sections now match exactly with or
without type units enabled.
This nearly triples (+189%) the pubtypes section for a clang self-host
and grows pubnames by 0.07% (without compression). For a total of 8%
increase in debug info sections of the objects of a Split DWARF build
when using type units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293971
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 3 Feb 2017 00:32:38 +0000 (00:32 +0000)]
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the
DSO, it is can be hidden. Usually we try to internalize
as much as possible, but it is not always possible, for
instance a symbol can be referenced outside of the LTO
unit, or there can be cross-module reference in ThinLTO.
This is a recommit of r293912 after fixing build failures,
and a recommit of r293918 after fixing LLD tests.
Differential Revision: https://reviews.llvm.org/D28978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293970
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Feb 2017 00:24:49 +0000 (00:24 +0000)]
[X86] Mark 256-bit and 512-bit INSERT_SUBVECTOR operations as legal and remove the custom lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293969
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 3 Feb 2017 00:23:15 +0000 (00:23 +0000)]
AMDGPU: Fold fneg into fminnum/fmaxnum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293968
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Thu, 2 Feb 2017 23:44:49 +0000 (23:44 +0000)]
llvm-readobj: fix next note entry calculation and print unknown note types
Differential Revision: https://reviews.llvm.org/D29131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293964
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 2 Feb 2017 23:21:23 +0000 (23:21 +0000)]
AMDGPU: Check if users of fneg can fold mods
In multi-use cases this can save a few instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293962
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 2 Feb 2017 23:20:36 +0000 (23:20 +0000)]
Revert "[ThinLTO] Add an auto-hide feature"
This reverts commit r293918, one lld test does not pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293961
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Thu, 2 Feb 2017 23:10:22 +0000 (23:10 +0000)]
[lto] added getCOFFWeakExternalFallback
Summary: This allows clients of the LTO API to determine the name of the fallback symbol for COFF weak externals.
Reviewers: pcc
Reviewed By: pcc
Subscribers: mehdi_amini
Differential Revision: https://reviews.llvm.org/D29365
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293960
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Thu, 2 Feb 2017 23:00:49 +0000 (23:00 +0000)]
[lto] add getLinkerOpts()
Summary: Some compilers, including MSVC and Clang, allow linker options to be specified in source files. In the legacy LTO API, there is a getLinkerOpts() method that returns linker options for the bitcode module being processed. This change adds that method to the new API, so that the COFF linker can get the right linker options when using the new LTO API.
Reviewers: pcc, ruiu, mehdi_amini, tejohnson
Reviewed By: pcc
Differential Revision: https://reviews.llvm.org/D29207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293950
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Thu, 2 Feb 2017 22:55:55 +0000 (22:55 +0000)]
[X86] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293949
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 2 Feb 2017 22:08:25 +0000 (22:08 +0000)]
Relax test so that it passes on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293946
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 2 Feb 2017 22:06:30 +0000 (22:06 +0000)]
[X86] Avoid sorted order check in release builds
Effectively reverts r290248 and fixes the unused function warning with
ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293945
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 2 Feb 2017 22:02:57 +0000 (22:02 +0000)]
[X86] Move turning 256-bit INSERT_SUBVECTORS into BLENDI from legalize to DAG combine.
On one test this seems to have given more chance for DAG combine to do other INSERT_SUBVECTOR/EXTRACT_SUBVECTOR combines before the BLENDI was created. Looks like we can still improve more by teaching DAG combine to optimize INSERT_SUBVECTOR/EXTRACT_SUBVECTOR with BLENDI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293944
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 2 Feb 2017 21:58:22 +0000 (21:58 +0000)]
[CodeGen] Remove dead call-or-prologue enum from CCState
This enum has been dead since Olivier Stannard re-implemented ARM byval
handling in r202985 (2014).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293943
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 2 Feb 2017 21:29:17 +0000 (21:29 +0000)]
[PGO] internal option cleanups
1. Added comments for options
2. Added missing option cl::desc field
3. Uniified function filter option for graph viewing.
Now PGO count/raw-counts share the same
filter option: -view-bfi-func-name=.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293938
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 2 Feb 2017 21:26:06 +0000 (21:26 +0000)]
Change how we handle section symbols on ELF.
On ELF every section can have a corresponding section symbol. When in
an assembly file we have
.quad .text
the '.text' refers to that symbol.
The way we used to handle them is to leave .text an undefined symbol
until the very end when the object writer would map them to the
actual section symbol.
The problem with that is that anything before the end would see an
undefined symbol. This could result in bad diagnostics
(test/MC/AArch64/label-arithmetic-diags-elf.s), or incorrect results
when using the asm streamer (est/MC/Mips/expansion-jal-sym-pic.s).
Fixing this will also allow using the section symbol earlier for
setting sh_link of SHF_METADATA sections.
This patch includes a few hacks to avoid changing our behaviour when
handling conflicts between section symbols and other symbols. I
reported pr31850 to track that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293936
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Thu, 2 Feb 2017 21:08:12 +0000 (21:08 +0000)]
[ARM] Classification Improvements to ARM Sched-Model. NFCI.
This is the second in the series of patches to enable adding
of machine sched-models for ARM processors easier and compact.
This patch focuses on integer instructions and adds missing
sched definitions.
Reviewers: rovka, rengolin
Differential Revision: https://reviews.llvm.org/D29127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293935
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 2 Feb 2017 20:44:36 +0000 (20:44 +0000)]
[LiveRangeEdit] Don't mess up with LiveInterval when a new vreg is created.
In r283838, we added the capability of splitting unspillable register.
When doing so we had to make sure the split live-ranges were also
unspillable and we did that by marking the related live-ranges in the
delegate method that is called when a new vreg is created.
However, by accessing the live-range there, we also triggered their lazy
computation (LiveIntervalAnalysis::getInterval) which is not what we
want in general. Indeed, later code in LiveRangeEdit is going to build
the live-ranges this lazy computation may mess up that computation
resulting in assertion failures. Namely, the createEmptyIntervalFrom
method expect that the live-range is going to be empty, not computed.
Thanks to Mikael Holmén <mikael.holmen@ericsson.com> for noticing and
reporting the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293934
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Feb 2017 20:35:12 +0000 (20:35 +0000)]
[Hexagon] Adding opExtentBits and opExtentAlign to GPrel instructions
Patch by Colin LeMahieu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293933
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 2 Feb 2017 20:27:13 +0000 (20:27 +0000)]
[X86] Add costs for non-AVX512 single-source permutation integer shuffles
Differential Revision: https://reviews.llvm.org/D29416
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293932
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Feb 2017 20:21:56 +0000 (20:21 +0000)]
[Hexagon] Fix relocation kind for extended predicated calls
Patch by Sid Manning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293931
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Feb 2017 19:58:22 +0000 (19:58 +0000)]
[Hexagon] Remove A4_ext_* pseudo instructions
Patch by Colin LeMahieu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293929
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 2 Feb 2017 19:56:01 +0000 (19:56 +0000)]
[libFuzzer] reorganize the tracing code to make it easier to experiment with inlined coverage instrumentation. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293928
91177308-0d34-0410-b5e6-
96231b3b80d8