Commit Graph

141497 Commits

Author SHA1 Message Date
Pavel Labath
731473a9e8 [Support] Use HAVE_DLOPEN to guard dlopen(3) usage
Summary:
The usage was previously guarded by HAVE_DLFCN. This breaks on Android with
LLVM_BUILD_STATIC as the platform does not provide a static version of libdl.
Using HAVE_DLOPEN fixes it as the code will only get used if we are actually able
to link an executable using dlopen.

Reviewers: rafael, beanz

Subscribers: tberghammer, danalbert, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 15:34:29 +00:00
Sanjay Patel
ec0235a568 [AArch64] use exact checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 15:00:43 +00:00
Krzysztof Parzyszek
398063c8f7 [PowerPC] Preserve machine dominator tree in PPCVSXFMAMutate
It is needed by LiveIntervalAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 13:31:09 +00:00
Simon Pilgrim
080d2a96df Updated test with -verify-machineinstrs to check for PR21931
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 13:21:12 +00:00
Simon Pilgrim
bdf16bd55d [X86][SSE] Add tests demonstrating missed opportunities to combine 64-bit element unpacks with horizontal pair ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 11:30:33 +00:00
Benjamin Kramer
bf60ce0ebd Apply clang-tidy's 'performance-faster-string-find' check to LLVM.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 10:01:11 +00:00
Jonas Devlieghere
fc89a6a1e9 Revert 'Test commit as per developer policy'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 08:24:43 +00:00
Jonas Devlieghere
bc02eec1d3 Test commit as per developer policy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 08:06:23 +00:00
Adam Nemet
d52ad61e79 Revert "[GVN] Basic optimization remark support"
This reverts commit r288210.

The failure on the stage2 LTO build is back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 01:14:35 +00:00
Lang Hames
db04d03093 [RuntimeDyld] Skip undefined symbols when building the symbol table.
Storing these in the symbol table (with zero values) is just wasted space.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 01:12:07 +00:00
Nemanja Ivanovic
502534bc2a [PowerPC] Improvements for BUILD_VECTOR Vol. 2
This patch corresponds to review:
https://reviews.llvm.org/D26023

This patch adds support for converting a vector of loads into a single load if
the loads are consecutive (in either direction).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:57:54 +00:00
Nemanja Ivanovic
17f24fa4e1 [PowerPC] Improvements for BUILD_VECTOR Vol. 2
This patch corresponds to review:
https://reviews.llvm.org/D25980

This is the 2nd patch in a series of 4 that improve the lowering and combining
for BUILD_VECTOR nodes on PowerPC. This particular patch combines a build vector
of fp-to-int conversions into an fp-to-int conversion of a build vector of fp
values. For example:
Converts (build_vector (fp_to_[su]i $A), (fp_to_[su]i $B), ...)
Into (fp_to_[su]i (build_vector $A, $B, ...))).
Which is a natural match for much cleaner code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:36:03 +00:00
Peter Collingbourne
e8971cbe03 Add another missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:22:55 +00:00
Paul Robinson
b31b2ecb10 Revert r288212 due to lldb failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:20:35 +00:00
Jacques Pienaar
65c488a748 [lanai] Manually match 0/-1 with R0/R1.
Summary: Previously 0 and -1 was matched via tablegen rules. But this could cause problems where a physical register was being used where a virtual register was expected (seen in optimizeSelect and TwoAddressInstructionPass). Instead follow AArch64 and match in DAGToDAGISel.

Reviewers: eliben, majnemer

Subscribers: llvm-commits, aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:01:09 +00:00
Nemanja Ivanovic
0b07a5ae00 Revert https://reviews.llvm.org/rL287679
This commit caused some miscompiles that did not show up on any of the bots.
Reverting until we can investigate the cause of those failures.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288214 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:00:33 +00:00
Paul Robinson
f1f1223546 Emit 'no line' information for interesting 'orphan' instructions.
DWARF specifies that "line 0" really means "no appropriate source
location" in the line table.  Use this for branch targets and some
other cases that have no specified source location, to prevent
inheriting unfortunate line numbers from physically preceding
instructions (which might be from completely unrelated source).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:41:16 +00:00
Simon Pilgrim
68d9b14b39 [X86][AVX512VL] Improved testing of vcvtpd2ps, vcvtpd2dq/vcvtpd2udq and vcvttpd2dq/vcvttpd2udq implicit zeroing of upper 64-bits of xmm result
Ensure that masked instruction doesn't assume implicit zeroing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:38:30 +00:00
Adam Nemet
ae45a93f50 [GVN] Basic optimization remark support
[recommiting patches one-by-one to see which breaks the stage2 LTO bot]

Follow-on patches will add more interesting cases.

The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk.  This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:37:01 +00:00
Simon Pilgrim
f09dc03ed5 [X86][AVX512DQVL] Improved testing of vcvtqq2ps/vcvtuqq2ps implicit zeroing of upper 64-bits of xmm result
Ensure that masked instruction doesn't assume implicit zeroing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:36:28 +00:00
Sanjay Patel
f4d1201a27 [AArch64] allow and-not-compare transform to form 'bics'
This target hook was added with D19087:
https://reviews.llvm.org/D19087

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:28:58 +00:00
Zachary Turner
29916a15c8 Add documentation for the PDB Module Info stream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 22:14:56 +00:00
Peter Collingbourne
10e4110233 Bitcode: Add a more comprehensive multi-module test now that we have both llvm-cat and llvm-modextract.
Differential Revision: https://reviews.llvm.org/D27189

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:55:09 +00:00
Peter Collingbourne
c67ca17e5e Add llvm-modextract tool.
This program is for testing features that rely on multi-module bitcode files.
It takes a multi-module bitcode file, extracts one of the modules and writes
it to the output file.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:54:33 +00:00
Justin Lebar
649bcb99b4 [StructurizeCFG] Fix infinite loop in rebuildSSA.
Michel Dänzer reported that r288051, "[StructurizeCFG] Use range-based
for loops", introduced a bug into rebuildSSA, wherein we were iterating
over an instruction's use list while modifying it, without taking care
to do this correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:49:02 +00:00
Kevin Enderby
dc150d07a5 Add to llvm-objdump the -no-leading-headers option with the use of the -macho option.
In some cases the leading headers of the file name, archive member and
architecture slice name in the output of lvm-objdump is not wanted so the
tool’s output can be directly used by scripts.  This matches the -X option
of the Apple otool(1) program.

rdar://28491674


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:43:40 +00:00
Peter Collingbourne
2a4cea29fc Add missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:02:19 +00:00
Mehdi Amini
fa5f3d188d Change Error unittest to use the LLVM_ENABLE_ABI_BREAKING_CHECKS instead of NDEBUG
This is consistent with the header (after r288087) and fixes the
test for the configuration:
  -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288196 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 20:45:48 +00:00
Peter Collingbourne
e6480e2add Bitcode: Introduce BitcodeWriter interface.
This interface allows clients to write multiple modules to a single
bitcode file. Also introduce the llvm-cat utility which can be used
to create a bitcode file containing multiple modules.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 20:43:47 +00:00
Chad Rosier
c83371f0eb [AArch64] Add a basic SchedMachineModel for Falkor.
Differential Revision: https://reviews.llvm.org/D26972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 20:00:27 +00:00
David Blaikie
375d719e55 Use CallSite to simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:42:27 +00:00
Matt Arsenault
a55fccbc47 AMDGPU: Disallow exec as SMEM instruction operand
This is not in the list of valid inputs for the encoding.
When spilling, copies from exec can be folded directly
into the spill instruction which results in broken
stores.

This only fixes the operand constraints, more codegen
work is required to avoid emitting the invalid
spills.

This sort of breaks the dbg.value test. Because the
register class of the s_load_dwordx2 changes, there
is a copy to SReg_64, and the copy is the operand
of dbg_value. The copy is later dead, and removed
from the dbg_value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:39:53 +00:00
Matt Arsenault
c562d96ea6 AMDGPU: Use SGPR_64 for argument lowerings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:39:48 +00:00
Geoff Berry
81e1a9d383 [LiveRangeEdit] Handle instructions with no defs correctly.
Summary:
The code in LiveRangeEdit::eliminateDeadDef() that computes isOrigDef
doesn't handle instructions in which operand 0 is not a def (e.g. KILL)
correctly.  Add a check that operand 0 is a def before doing the rest of
the isOrigDef computation.

Reviewers: qcolombet, MatzeB, wmi

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:31:35 +00:00
Matt Arsenault
a89dd1d1c4 AMDGPU: Rename flat operands to match mubuf
Use vaddr/vdst for the same purposes.

This also fixes a beg in SIInsertWaits for the
operand check. The stored value operand is currently called
data0 in the single offset case, not data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:30:44 +00:00
Matt Arsenault
3f3671600c AMDGPU: Use else if
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:30:41 +00:00
Matt Arsenault
8d2aadbfac AMDGPU: Materialize frame index before add
It isn't generally safe to fold the frame index
directly into the operand since it will possibly
not be an inline immediate after it is expanded.

This surprisingly seems to produce better code, since
the FI doesn't prevent folding other immediate operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:20:48 +00:00
Matt Arsenault
a333ef5119 AMDGPU: Refactor immediate folding logic
Change the logic for when to fold immediates to
consider the destination operand rather than the
source of the materializing mov instruction.

No change yet, but this will allow for correctly handling
i16/f16 operands. Since 32-bit moves are used to materialize
constants for these, the same bitvalue will not be in the
register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:20:42 +00:00
Sanjay Patel
57d4f76dcd [AArch64] add tests for bics; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 19:15:27 +00:00
Sanjay Patel
9ade85fb43 [AArch64] add tests to show select transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288180 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:35:04 +00:00
Adam Nemet
f618d6ef67 Revert "[GVN] Basic optimization remark support"
This reverts commit r288046.

Trying to see if the revert fixes a compiler crash during a stage2 LTO
build with a GVN backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:32:04 +00:00
Adam Nemet
5d693faf41 Revert "[GVN, OptDiag] Include the value that is forwarded in load elimination"
This reverts commit r288047.

Trying to see if the revert fixes a compiler crash during a stage2 LTO
build with a GVN backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:32:00 +00:00
Adam Nemet
996fdfddd0 Revert "[GVN, OptDiag] Print the interesting instructions involved in missed load-elimination"
This reverts commit r288090.

Trying to see if the revert fixes a compiler crash during a stage2 LTO
build with a GVN backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:31:53 +00:00
Geoff Berry
ba3cf58b60 [AArch64] Fold spills of COPY of WZR/XZR
Summary:
In AArch64InstrInfo::foldMemoryOperandImpl, catch more cases where the
COPY being spilled is copying from WZR/XZR, but the source register is
not in the COPY destination register's regclass.

For example, when spilling:

  %vreg0 = COPY %XZR ; %vreg0:GPR64common

without this change, the code in TargetInstrInfo::foldMemoryOperand()
and canFoldCopy() that normally handles cases like this would fail to
optimize since %XZR is not in GPR64common.  So the spill code generated
would be:

  %vreg0 = COPY %XZR
  STR %vreg

instead of the new code generated:

  STR %XZR

Reviewers: qcolombet, MatzeB

Subscribers: mcrosier, aemerson, t.p.northover, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:28:32 +00:00
Mehdi Amini
c72d18a2cb [docs] Typos and whitespace fixed in LTO docs.
While reading the LTO docs I fixed few small typos and whitespace issues.

Patch by: Jonas Devlieghere <jonas@devlieghere.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288171 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 18:00:31 +00:00
Simon Pilgrim
e148f0a7b8 Avoid repeated calls to MVT getSizeInBits and getScalarSizeInBits(). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288170 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 17:57:48 +00:00
NAKAMURA Takumi
e6dbf90240 Suppress abi-breaking.h on cygming, for now.
FIXME: Implement checks without weak for them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 17:32:58 +00:00
NAKAMURA Takumi
f33188e05e Fix a linefeed at eof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 17:32:43 +00:00
Artur Pilipenko
9d387d6693 [CVP] Remove use of removed flag (-cvp-dont-process-adds) from the test
The flag was removed by 288154

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 16:43:30 +00:00
Artur Pilipenko
a310ebcb97 [CVP] Remove cvp-dont-process-adds flag
The flag was introduced because the optimization controlled by the flag initially caused regressions. All the regressions were fixed some time ago and the flag has been false for quite a while. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288154 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 16:24:57 +00:00