144639 Commits

Author SHA1 Message Date
Kostya Serebryany
522017cf0d [libFuzzer] make code less clever to avoid fallthrough in switch (and in turn avoid compiler warnings). NFC. Suggested by Christian Holler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294239 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 21:21:37 +00:00
Kevin Enderby
94dcd1b639 Fix a bug in llvm-obdump(1) with the -macho and -info-plist options
which caused it to print more than the (__TEXT,__info_plist) if that
section did not end with a null.

rdar://27378808


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294236 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 21:01:08 +00:00
Chandler Carruth
5681e380e0 [PM/LCG] Fix the no-asserts build after r294227. Sorry for the noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 20:59:07 +00:00
David Blaikie
4ee57e2bef Get function start line number from DWARF info
DWARF info contains info about the line number at which a function starts (DW_AT_decl_line).

This patch creates a function to look up the start line number for a function, and returns it in
DILineInfo when looking up debug info for a particular address.

Patch by Simon Que!

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D27962

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294231 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 20:19:02 +00:00
Jon Chesterfield
919fdbb92a [TableGen] Use less stack in DAGISelMatcherOpt
Refactor a helper function, FactorNodes, to search for a push node in constant space. This resolves a problem in a not-yet-upstreamed backend where a recursive pattern blew the call stack (at a depth of 255) under a debug build of tablegen. No functional change so no new test coverage. The change is minimal to avoid disturbing existing behaviour.

Differential Revision: https://reviews.llvm.org/D29080


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294230 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 19:41:44 +00:00
Jon Chesterfield
8ebf30a645 Revert r294228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294229 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 19:40:56 +00:00
Jon Chesterfield
13a5249316 Test commit access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294228 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 19:39:47 +00:00
Chandler Carruth
3a190c34ce [PM/LCG] Remove the lazy RefSCC formation from the LazyCallGraph during
iteration.

The lazy formation of RefSCCs isn't really the most important part of
the laziness here -- that has to do with walking the functions
themselves -- and isn't essential to maintain. Originally, there were
incremental update algorithms that relied on updates happening
predominantly near the most recent RefSCC formed, but those have been
replaced with ones that have much tighter general case bounds at this
point. We do still perform asserts that only scale well due to this
incrementality, but those are easy to place behind EXPENSIVE_CHECKS.

Removing this simplifies the entire analysis by having a single up-front
step that builds all of the RefSCCs in a direct Tarjan walk. We can even
easily replace this with other or better algorithms at will and with
much less confusion now that there is no iterator-based incremental
logic involved. This removes a lot of complexity from LCG.

Another advantage of moving in this direction is that it simplifies
testing the system substantially as we no longer have to worry about
observing and mutating the graph half-way through the RefSCC formation.

We still need a somewhat special iterator for RefSCCs because we want
the iterator to remain stable in the face of graph updates. However,
this now merely involves relative indexing to the current RefSCC's
position in the sequence which isn't too hard.

Differential Revision: https://reviews.llvm.org/D29381

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 19:38:06 +00:00
Krzysztof Parzyszek
f0711c5712 [Hexagon] Update MCTargetDesc
Changes include:
- Updates to the instruction descriptor flags.
- Improvements to the packet shuffler and checker.
- Updates to the handling of certain relocations.
- Better handling of duplex instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 19:35:46 +00:00
Simon Pilgrim
bc8099138a [X86][SSE] Add tests showing missed opportunities to simplify integer absolute instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294216 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:57:51 +00:00
Kevin Enderby
91a32fe4a4 Fix a bug in llvm-obdump(1) with the -macho and -disassemble options
which caused it to not disassemble the bytes a the start of the section if
the section had symbols and the first symbol was not at the start of the
section.

rdar://30143243


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294212 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:43:18 +00:00
Zachary Turner
058101e7dc [Support] Add support for runtime endian values.
Endian functions only support reading and writing when the
endianness is known at compile time.  This patch adds overloads
where the endianness is a runtime value, and then delegates the
compile-time versions to the runtime versions.

Differential Revision: https://reviews.llvm.org/D29467

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294209 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:31:21 +00:00
Sanjay Patel
f6e615cc84 [ValueTracking] emit a remark when we detect a conflicting assumption (PR31809)
This is a follow-up to D29395 where we try to be good citizens and let the user know that
we've probably gone off the rails.

This should allow us to resolve:
https://llvm.org/bugs/show_bug.cgi?id=31809

Differential Revision: https://reviews.llvm.org/D29404


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294208 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:26:06 +00:00
Dehao Chen
d2d041f452 Fix the bug of samplepgo indirect call promption when type casting of the return value is needed.
Summary: When type casting of the return value is needed, promoteIndirectCall will return the type casting instruction instead of the direct call. This patch changed to return the direct call instruction instead.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29569

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294205 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:10:36 +00:00
Reid Kleckner
2a4edb648f [LangRef] Document some LLVM inline asm special escapes
As discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2017-February/109862.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294204 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:08:45 +00:00
John Brawn
5694331625 [AArch64] Fix incorrect MachinePointerInfo in splitStoreSplat
When splitting up one store into several in splitStoreSplat we have to
make sure we get the MachinePointerInfo right, otherwise alias
analysis thinks they all store to the same location. This can then
cause invalid scheduling later on.

Differential Revision: https://reviews.llvm.org/D29446


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294203 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 18:07:20 +00:00
Artur Pilipenko
e7cc4f3c59 [DAGCombiner] Support bswap as a part of load combine patterns
Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D29397


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294201 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 17:48:08 +00:00
Sanjay Patel
d9394e7ae7 [InstCombine] simplify dyn_cast + isa; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294198 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 17:16:16 +00:00
Amaury Sechet
86052d8356 Commit full codegen for mul-i256.ll . NFC
The full codegen is committed for larger multiply, so that won't make the test suite more fragile. However, it'll allow to expose the effects fo various DAG combine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294196 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 16:21:41 +00:00
Eugene Leviant
3523e86a0b RuntimeDyldELF/AArch64: Implement basic GOT support
This patch implements two GOT relocations:
R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC

Differential revision: https://reviews.llvm.org/D28571


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 15:31:28 +00:00
Amaury Sechet
6f12c47b49 Add ADDC to SelectionDAG::computeKnownBits and ComputeNumSignBits.
Summary: As per title.

Reviewers: bkramer, sunfish, lattner, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29521

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 14:59:06 +00:00
Amaury Sechet
ffd1e5a54c [DAGCombiner] Make DAGCombiner smarter about overflow
Summary: Leverage it to transform addc into add.

Reviewers: mkuper, spatel, RKSimon, zvi

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29524

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294187 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 14:54:49 +00:00
Amaury Sechet
5649db8ef2 [DAGCombiner] (add X, (adde Y, 0, Carry)) -> (adde X, Y, Carry)
Summary: This is extracted from D29443 .

Reviewers: mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29564

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294186 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 14:28:39 +00:00
Artur Pilipenko
cf5b8bc093 Add DAGCombiner load combine tests with non-zero offset
This is separated from https://reviews.llvm.org/D29394 review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294185 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 14:15:31 +00:00
Simon Pilgrim
b0a111f81a [X86] Add add/addc known-bits tests (D29521)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294184 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 14:06:57 +00:00
Simon Pilgrim
0aca40051b [X86][SSE] Combine shuffle nodes with multiple uses if all the users are being combined.
Currently we only combine shuffle nodes if they have a single user to prevent us from causing code bloat by splitting the shuffles into several different combines.

We don't take into account that in some cases we will already have combined all the users during recursively calling up the shuffle tree.

This patch keeps a list of all the shuffle nodes that have been combined so far and permits combining of further shuffle nodes if all its users are in that list.

Differential Revision: https://reviews.llvm.org/D29399

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294183 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 13:44:45 +00:00
Simon Dardis
16291a2e6d [mips] dla expansion without the at register
Previously only the superscalar scheduled expansion of the dla macro for
MIPS64 was implemented. If assembler temporary register is not available
and the optional source register is not the destination register, synthesize
the address using the naive solution of adds and shifts.

This partially resolves PR/30383.

Thanks to Sean Bruno for reporting the issue!

Reviewers: slthakur, seanbruno

Differential Revision: https://reviews.llvm.org/D29328



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294182 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 12:43:46 +00:00
Daniil Fukalov
65469277ca [SCEV] limit recursion depth and operands number in getAddExpr
for a quite big function with source like

%add = add nsw i32 %mul, %conv
%mul1 = mul nsw i32 %add, %conv
%add2 = add nsw i32 %mul1, %add
%mul3 = mul nsw i32 %add2, %add
; repeat couple of thousands times
that can be produced by loop unroll, getAddExpr() tries to recursively construct SCEV and runs almost infinite time.

Added recursion depth restriction (with new parameter to set it)

Reviewers: sanjoy

Subscribers: hfinkel, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D28158

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294181 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 12:38:06 +00:00
Dylan McKay
a6a852fb0e [AVR] Use 'print' instead of 'dump'
This should fix an undefined reference on the AVR buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 08:43:30 +00:00
Chandler Carruth
f71e0b1e0f [ArgPromote] Replace all the grep-based testing with precise FileCheck
tests.

This also removes the use of instcombine as we can max the patterns
produced by argument promotion directly with the more powerful tools in
FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294174 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 08:43:11 +00:00
Igor Breger
13904b0878 [X86][GlobalISel] Add limited ret lowering support to the IRTranslator.
Summary:
Support return lowering for i8/i16/i32/i64/float/double, vector type supported for 64bit platform only.
Support argument lowering for float/double types.

Reviewers: t.p.northover, zvi, ab, rovka

Reviewed By: zvi

Subscribers: dberris, kristof.beyls, delena, llvm-commits

Differential Revision: https://reviews.llvm.org/D29261

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294173 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 08:37:41 +00:00
Craig Topper
e7499853bf [AVX-512] Add VPSLLDQ/VPSRLDQ to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294170 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 05:12:14 +00:00
Craig Topper
a455c94818 [AVX-512] Add VPABSB/D/Q/W to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294169 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 03:18:01 +00:00
Craig Topper
1464e37f6d [AVX-512] Add VSHUFPS/PD to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294168 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 03:17:58 +00:00
Craig Topper
6ab67411fe [AVX-512] Add VPMULLD/Q/W instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 01:19:26 +00:00
Craig Topper
cb98b65ac4 [AVX-512] Add all masked and unmasked versions of VPMULDQ and VPMULUDQ to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294163 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 23:31:48 +00:00
Simon Pilgrim
0f1d173892 [X86][SSE] Replace insert_vector_elt(vec, -1, idx) with shuffle
Similar to what we already do for zero elt insertion, we can quickly rematerialize 'allbits' vectors so to avoid a unnecessary gpr value and insertion into a vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294162 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:50:29 +00:00
Craig Topper
053d7dd312 [AVX-512] Add scalar masked max/min intrinsic instructions to the load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294153 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:46 +00:00
Craig Topper
371f918f70 [AVX-512] Add scalar masked add/sub/mul/div intrinsic instructions to the load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294152 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:42 +00:00
Craig Topper
e91c6128e6 [AVX-512] Add masked scalar FMA intrinsics to isNonFoldablePartialRegisterLoad to improve load folding of scalar loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294151 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:40 +00:00
Craig Topper
dcc9f92981 [AVX-512] Add test cases that show failure to fold scalar loads into masked scalar FMA intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294150 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:37 +00:00
Craig Topper
9820885936 [AVX-512] Move 128/256-bit intrinsic tests from avx512bwvl test file to avx512vl test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294149 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:35 +00:00
Simon Pilgrim
5996d6f385 [X86][AVX] Add 8i32 -> 8f32 sitofp tests with constant insertion
Some elements are constant inserted into the source integer vector before conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294147 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:40:25 +00:00
Dylan McKay
92f59a0260 [AVR] Implement stacksave/stackrestore by expanding (PR31342)
Summary:
Authored by Florian Zeitz.

This implements the missing stacksave/stackrestore intrinsics via expansion.

Output of `llc -O0 -march=avr ~/devel/llvm/test/CodeGen/Generic/stacksave-restore.ll` for sanity checking (comments mine):

```
	.text
	.file	".../llvm/test/CodeGen/Generic/stacksave-restore.ll"
	.globl	test
	.p2align	1
	.type	test,@function
test:                                   ; @test
; BB#0:
	push	r28
	push	r29

	in	r28, 61
	in	r29, 62
	sbiw	r28, 4
	in	r0, 63
	cli
	out	62, r29
	out	63, r0
	out	61, r28

	in	r18, 61
	in	r19, 62

	mov	r20, r22
	mov	r21, r23

	in	r30, 61
	in	r31, 62

	lsl	r22
	rol	r23
	lsl	r22
	rol	r23
	in	r26, 61
	in	r27, 62
	sub	r26, r22
	sbc	r27, r23
	andi	r26, 252
	in	r0, 63
	cli
	out	62, r27
	out	63, r0
	out	61, r26

	in	r0, 63
	cli
	out	62, r31
	out	63, r0
	out	61, r30

	in	r30, 61
	in	r31, 62
	sub	r30, r22
	sbc	r31, r23
	andi	r30, 252
	in	r0, 63
	cli
	out	62, r31
	out	63, r0
	out	61, r30

	std	Y+3, r24                ; 2-byte Folded Spill
	std	Y+4, r25                ; 2-byte Folded Spill

	mov	r24, r26
	mov	r25, r27

	in	r0, 63
	cli
	out	62, r19
	out	63, r0
	out	61, r18

	std	Y+1, r20                ; 2-byte Folded Spill
	std	Y+2, r21                ; 2-byte Folded Spill

	adiw	r28, 4
	in	r0, 63
	cli
	out	62, r29
	out	63, r0
	out	61, r28

	pop	r29
	pop	r28
	ret
.Lfunc_end0:
	.size	test, .Lfunc_end0-test
```

Reviewers: dylanmckay

Reviewed By: dylanmckay

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29553

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294146 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:35:45 +00:00
Dylan McKay
c24ff540a8 [docs] Document the staging buildbot
Summary:
This also adds docs to suggest that maintainers of buildbots for
experimental backends should use this buildmaster.

Reviewers: dsanders, grosser, asb, mehdi_amini

Reviewed By: grosser

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29560

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294144 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:21:23 +00:00
Kamil Rytarowski
a629f93c3e Revamp llvm::once_flag to be closer to std::once_flag
Summary:
Make this interface reusable similarly to std::call_once and std::once_flag interface.

This makes porting LLDB to NetBSD easier as there was in the original approach a portable way to specify a non-static once_flag. With this change translating std::once_flag to llvm::once_flag is mechanical.

Sponsored by <The NetBSD Foundation>

Reviewers: mehdi_amini, labath, joerg

Reviewed By: mehdi_amini

Subscribers: emaste, clayborg

Differential Revision: https://reviews.llvm.org/D29566

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294143 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:13:06 +00:00
Dylan McKay
cf8a46b934 [AVR] Marm MIR test functions as tracking liveness information
This fixes an assertion error that broke three tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294140 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:25:34 +00:00
Vedant Kumar
2006b414f1 [llvm-cov] Don't show function summaries when filtering by filename (fixes PR31395)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294137 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:11:08 +00:00
Vedant Kumar
b766e93f51 [llvm-cov] Demangle symbols in function summaries (fixes PR31394)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294136 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:11:03 +00:00
Vedant Kumar
4858447bc5 [llvm-cov] Refactor logic for storing demangled symbols, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294135 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:10:58 +00:00