platform/upstream/llvm.git
7 years agoFix -Winconsistent-missing-override in CodeGenAction.cpp
Reid Kleckner [Wed, 30 Nov 2016 01:32:53 +0000 (01:32 +0000)]
Fix -Winconsistent-missing-override in CodeGenAction.cpp

llvm-svn: 288227

7 years agoRevert "[GVN] Basic optimization remark support"
Adam Nemet [Wed, 30 Nov 2016 01:14:35 +0000 (01:14 +0000)]
Revert "[GVN] Basic optimization remark support"

This reverts commit r288210.

The failure on the stage2 LTO build is back.

llvm-svn: 288226

7 years ago[RuntimeDyld] Skip undefined symbols when building the symbol table.
Lang Hames [Wed, 30 Nov 2016 01:12:07 +0000 (01:12 +0000)]
[RuntimeDyld] Skip undefined symbols when building the symbol table.

Storing these in the symbol table (with zero values) is just wasted space.

llvm-svn: 288225

7 years ago[asan] Allow re-exec in instrumented unit tests on Darwin (fix unit tests on macOS...
Kuba Mracek [Wed, 30 Nov 2016 00:46:04 +0000 (00:46 +0000)]
[asan] Allow re-exec in instrumented unit tests on Darwin (fix unit tests on macOS <=10.10)

This fixes https://llvm.org/bugs/show_bug.cgi?id=30285. On macOS 10.10 and lower, instrumented unit tests still need to be able to re-exec to make interceptors work.

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

llvm-svn: 288224

7 years agoFix formatting issue from r288207
Hans Wennborg [Wed, 30 Nov 2016 00:31:39 +0000 (00:31 +0000)]
Fix formatting issue from r288207

llvm-svn: 288223

7 years agoGive this test that uses Itanium mangling a triple
Reid Kleckner [Wed, 30 Nov 2016 00:31:16 +0000 (00:31 +0000)]
Give this test that uses Itanium mangling a triple

llvm-svn: 288222

7 years agoStop handling interesting deserialized decls after HandleTranslationUnit
Reid Kleckner [Wed, 30 Nov 2016 00:25:36 +0000 (00:25 +0000)]
Stop handling interesting deserialized decls after HandleTranslationUnit

Other AST consumers can deserialize interesting decls that we might
codegen, but they won't make it to the final object file and can trigger
assertions in debug information generation after finalization.

llvm-svn: 288221

7 years ago[c++1z] Improve support for -fno-exceptions: we can't just ignore exception
Richard Smith [Wed, 30 Nov 2016 00:13:55 +0000 (00:13 +0000)]
[c++1z] Improve support for -fno-exceptions: we can't just ignore exception
specifications in this mode in C++17, since they're part of the function type,
so check and diagnose them like we would if exceptions were enabled.

Better ideas welcome.

llvm-svn: 288220

7 years ago[PowerPC] Improvements for BUILD_VECTOR Vol. 2
Nemanja Ivanovic [Tue, 29 Nov 2016 23:57:54 +0000 (23:57 +0000)]
[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).

llvm-svn: 288219

7 years ago[PowerPC] Improvements for BUILD_VECTOR Vol. 2
Nemanja Ivanovic [Tue, 29 Nov 2016 23:36:03 +0000 (23:36 +0000)]
[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.

llvm-svn: 288218

7 years agoAdd another missing dependency.
Peter Collingbourne [Tue, 29 Nov 2016 23:22:55 +0000 (23:22 +0000)]
Add another missing dependency.

llvm-svn: 288217

7 years agoRevert r288212 due to lldb failure.
Paul Robinson [Tue, 29 Nov 2016 23:20:35 +0000 (23:20 +0000)]
Revert r288212 due to lldb failure.

llvm-svn: 288216

7 years ago[lanai] Manually match 0/-1 with R0/R1.
Jacques Pienaar [Tue, 29 Nov 2016 23:01:09 +0000 (23:01 +0000)]
[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

llvm-svn: 288215

7 years agoRevert https://reviews.llvm.org/rL287679
Nemanja Ivanovic [Tue, 29 Nov 2016 23:00:33 +0000 (23:00 +0000)]
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.

llvm-svn: 288214

7 years agoFix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).
Eugene Zelenko [Tue, 29 Nov 2016 22:44:24 +0000 (22:44 +0000)]
Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).

This preparation to remove SetVector.h dependency on SmallSet.h.

llvm-svn: 288213

7 years agoEmit 'no line' information for interesting 'orphan' instructions.
Paul Robinson [Tue, 29 Nov 2016 22:41:16 +0000 (22:41 +0000)]
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

llvm-svn: 288212

7 years ago[X86][AVX512VL] Improved testing of vcvtpd2ps, vcvtpd2dq/vcvtpd2udq and vcvttpd2dq...
Simon Pilgrim [Tue, 29 Nov 2016 22:38:30 +0000 (22:38 +0000)]
[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.

llvm-svn: 288211

7 years ago[GVN] Basic optimization remark support
Adam Nemet [Tue, 29 Nov 2016 22:37:01 +0000 (22:37 +0000)]
[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

llvm-svn: 288210

7 years ago[X86][AVX512DQVL] Improved testing of vcvtqq2ps/vcvtuqq2ps implicit zeroing of upper...
Simon Pilgrim [Tue, 29 Nov 2016 22:36:28 +0000 (22:36 +0000)]
[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.

llvm-svn: 288209

7 years ago[c++1z] PR31210: ignore exception specification when matching the type of a
Richard Smith [Tue, 29 Nov 2016 22:32:05 +0000 (22:32 +0000)]
[c++1z] PR31210: ignore exception specification when matching the type of a
builtin with the type of an explicit declaration of the same function.

llvm-svn: 288208

7 years agoDon't try to merge DLL attributes on redeclaration of invalid decl (PR31069)
Hans Wennborg [Tue, 29 Nov 2016 22:31:00 +0000 (22:31 +0000)]
Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

llvm-svn: 288207

7 years ago[AArch64] allow and-not-compare transform to form 'bics'
Sanjay Patel [Tue, 29 Nov 2016 22:28:58 +0000 (22:28 +0000)]
[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

llvm-svn: 288206

7 years agoAdd documentation for the PDB Module Info stream.
Zachary Turner [Tue, 29 Nov 2016 22:14:56 +0000 (22:14 +0000)]
Add documentation for the PDB Module Info stream.

llvm-svn: 288205

7 years ago[Profile] Fix value profiler eviction bug
Xinliang David Li [Tue, 29 Nov 2016 22:00:54 +0000 (22:00 +0000)]
[Profile] Fix value profiler eviction bug

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

llvm-svn: 288204

7 years agogetObjCEncodingForMethodDecl cannot fail. Simplify. NFC.
John McCall [Tue, 29 Nov 2016 21:57:00 +0000 (21:57 +0000)]
getObjCEncodingForMethodDecl cannot fail.  Simplify.  NFC.

llvm-svn: 288203

7 years agoBitcode: Add a more comprehensive multi-module test now that we have both llvm-cat...
Peter Collingbourne [Tue, 29 Nov 2016 21:55:09 +0000 (21:55 +0000)]
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

llvm-svn: 288202

7 years agoAdd llvm-modextract tool.
Peter Collingbourne [Tue, 29 Nov 2016 21:54:33 +0000 (21:54 +0000)]
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

llvm-svn: 288201

7 years ago[StructurizeCFG] Fix infinite loop in rebuildSSA.
Justin Lebar [Tue, 29 Nov 2016 21:49:02 +0000 (21:49 +0000)]
[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.

llvm-svn: 288200

7 years agoAdd to llvm-objdump the -no-leading-headers option with the use of the -macho option.
Kevin Enderby [Tue, 29 Nov 2016 21:43:40 +0000 (21:43 +0000)]
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

llvm-svn: 288199

7 years agoAdd missing dependency.
Peter Collingbourne [Tue, 29 Nov 2016 21:02:19 +0000 (21:02 +0000)]
Add missing dependency.

llvm-svn: 288198

7 years agoDon't declare IsEnumDeclComplete as extern
Reid Kleckner [Tue, 29 Nov 2016 20:46:24 +0000 (20:46 +0000)]
Don't declare IsEnumDeclComplete as extern

Otherwise MSVC and clang-cl will see "extern inline" after merging
redeclarations and emit it in all TUs that include Type.h and Decl.h.

Noticed by inspection, since it's always the first thing to get emitted.

llvm-svn: 288197

7 years agoChange Error unittest to use the LLVM_ENABLE_ABI_BREAKING_CHECKS instead of NDEBUG
Mehdi Amini [Tue, 29 Nov 2016 20:45:48 +0000 (20:45 +0000)]
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

llvm-svn: 288196

7 years agoBitcode: Introduce BitcodeWriter interface.
Peter Collingbourne [Tue, 29 Nov 2016 20:43:47 +0000 (20:43 +0000)]
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

llvm-svn: 288195

7 years ago[AArch64] Add a basic SchedMachineModel for Falkor.
Chad Rosier [Tue, 29 Nov 2016 20:00:27 +0000 (20:00 +0000)]
[AArch64] Add a basic SchedMachineModel for Falkor.

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

llvm-svn: 288194

7 years agoSupport constant expression evaluation for wchar_t versions of simple string
Richard Smith [Tue, 29 Nov 2016 19:45:17 +0000 (19:45 +0000)]
Support constant expression evaluation for wchar_t versions of simple string
functions, in order to support constexpr std::char_traits<wchar_t>.

llvm-svn: 288193

7 years agoUse CallSite to simplify code
David Blaikie [Tue, 29 Nov 2016 19:42:27 +0000 (19:42 +0000)]
Use CallSite to simplify code

llvm-svn: 288192

7 years agoAMDGPU: Disallow exec as SMEM instruction operand
Matt Arsenault [Tue, 29 Nov 2016 19:39:53 +0000 (19:39 +0000)]
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.

llvm-svn: 288191

7 years agoAMDGPU: Use SGPR_64 for argument lowerings
Matt Arsenault [Tue, 29 Nov 2016 19:39:48 +0000 (19:39 +0000)]
AMDGPU: Use SGPR_64 for argument lowerings

llvm-svn: 288190

7 years ago[LiveRangeEdit] Handle instructions with no defs correctly.
Geoff Berry [Tue, 29 Nov 2016 19:31:35 +0000 (19:31 +0000)]
[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

llvm-svn: 288189

7 years agoAMDGPU: Rename flat operands to match mubuf
Matt Arsenault [Tue, 29 Nov 2016 19:30:44 +0000 (19:30 +0000)]
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.

llvm-svn: 288188

7 years agoAMDGPU: Use else if
Matt Arsenault [Tue, 29 Nov 2016 19:30:41 +0000 (19:30 +0000)]
AMDGPU: Use else if

llvm-svn: 288187

7 years ago[sanitizer] Add macOS minimum deployment target to all compiler invocations in lit...
Kuba Mracek [Tue, 29 Nov 2016 19:25:53 +0000 (19:25 +0000)]
[sanitizer] Add macOS minimum deployment target to all compiler invocations in lit tests

The Clang driver on macOS decides the deployment target based on various things, like your host OS version, the SDK version and some environment variables, which makes lit tests pass or fail based on your environment. Let's make sure we run all lit tests with `-mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}` (10.9 unless overriden).

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

llvm-svn: 288186

7 years agoAMDGPU: Materialize frame index before add
Matt Arsenault [Tue, 29 Nov 2016 19:20:48 +0000 (19:20 +0000)]
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.

llvm-svn: 288185

7 years agoAMDGPU: Refactor immediate folding logic
Matt Arsenault [Tue, 29 Nov 2016 19:20:42 +0000 (19:20 +0000)]
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.

llvm-svn: 288184

7 years ago[AArch64] add tests for bics; NFC
Sanjay Patel [Tue, 29 Nov 2016 19:15:27 +0000 (19:15 +0000)]
[AArch64] add tests for bics; NFC

llvm-svn: 288183

7 years agoUse StringRefZ explicitly instead of const char *.
Rui Ueyama [Tue, 29 Nov 2016 19:11:39 +0000 (19:11 +0000)]
Use StringRefZ explicitly instead of const char *.

This patch is to avoid an implicit conversion from const char * to
StringRefZ, to make it apparent where we are using StringRefZ.

llvm-svn: 288182

7 years agoAdd back some of the previous lldb-server dependencies
Pavel Labath [Tue, 29 Nov 2016 18:38:09 +0000 (18:38 +0000)]
Add back some of the previous lldb-server dependencies

It seems a debug build of lldb-server will not complete without these, as the
linker is not able to strip out code that aggressively. Add those back until I
can figure out how to break the dependency chains.

llvm-svn: 288181

7 years ago[AArch64] add tests to show select transforms; NFC
Sanjay Patel [Tue, 29 Nov 2016 18:35:04 +0000 (18:35 +0000)]
[AArch64] add tests to show select transforms; NFC

llvm-svn: 288180

7 years agoRevert "[GVN] Basic optimization remark support"
Adam Nemet [Tue, 29 Nov 2016 18:32:04 +0000 (18:32 +0000)]
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.

llvm-svn: 288179

7 years agoRevert "[GVN, OptDiag] Include the value that is forwarded in load elimination"
Adam Nemet [Tue, 29 Nov 2016 18:32:00 +0000 (18:32 +0000)]
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.

llvm-svn: 288178

7 years agoRevert "[GVN, OptDiag] Print the interesting instructions involved in missed load...
Adam Nemet [Tue, 29 Nov 2016 18:31:53 +0000 (18:31 +0000)]
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.

llvm-svn: 288177

7 years ago[AArch64] Fold spills of COPY of WZR/XZR
Geoff Berry [Tue, 29 Nov 2016 18:28:32 +0000 (18:28 +0000)]
[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

llvm-svn: 288176

7 years agoFix some Clang-tidy modernize-use-default and Include What You Use warnings; other...
Eugene Zelenko [Tue, 29 Nov 2016 18:24:01 +0000 (18:24 +0000)]
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).

This preparation to remove SetVector.h dependency on SmallSet.h.

llvm-svn: 288175

7 years agoFix some Clang-tidy modernize-use-default and Include What You Use warnings; other...
Eugene Zelenko [Tue, 29 Nov 2016 18:14:12 +0000 (18:14 +0000)]
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).

This preparation to remove SetVector.h dependency on SmallSet.h.

llvm-svn: 288174

7 years agoRevert "Compiler-rt part of D26230: Add (constant) masked load/store support"
Filipe Cabecinhas [Tue, 29 Nov 2016 18:08:24 +0000 (18:08 +0000)]
Revert "Compiler-rt part of D26230: Add (constant) masked load/store support"

This reverts commit r288162. Buildbot clang-bpf-build fails running tests.

llvm-svn: 288173

7 years agoIntroduce StringRefZ class to represent null-terminated strings.
Rui Ueyama [Tue, 29 Nov 2016 18:05:04 +0000 (18:05 +0000)]
Introduce StringRefZ class to represent null-terminated strings.

StringRefZ is a class to represent a null-terminated string. String
length is computed lazily, so it's more efficient than StringRef to
represent strings in string table.

The motivation of defining this new class is to merge functions
that only differ in string types; we have many constructors that takes
`const char *` or `StringRef`. With StringRefZ, we can merge them.

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

llvm-svn: 288172

7 years ago[docs] Typos and whitespace fixed in LTO docs.
Mehdi Amini [Tue, 29 Nov 2016 18:00:31 +0000 (18:00 +0000)]
[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

llvm-svn: 288171

7 years agoAvoid repeated calls to MVT getSizeInBits and getScalarSizeInBits(). NFCI.
Simon Pilgrim [Tue, 29 Nov 2016 17:57:48 +0000 (17:57 +0000)]
Avoid repeated calls to MVT getSizeInBits and getScalarSizeInBits(). NFCI.

llvm-svn: 288170

7 years agoRemove some OS-specific plugins from lldb-server dependencies
Pavel Labath [Tue, 29 Nov 2016 17:45:25 +0000 (17:45 +0000)]
Remove some OS-specific plugins from lldb-server dependencies

I don't believe the code in those plugins could be in any way useful for
lldb-server, but I can't be sure if this will break some transitive dependencies.
Builtbots should be able to tell us that.

llvm-svn: 288169

7 years agoSuppress abi-breaking.h on cygming, for now.
NAKAMURA Takumi [Tue, 29 Nov 2016 17:32:58 +0000 (17:32 +0000)]
Suppress abi-breaking.h on cygming, for now.

FIXME: Implement checks without weak for them.
llvm-svn: 288168

7 years agoFix a linefeed at eof.
NAKAMURA Takumi [Tue, 29 Nov 2016 17:32:43 +0000 (17:32 +0000)]
Fix a linefeed at eof.

llvm-svn: 288167

7 years agoRemove assorted other plugins which are not needed by lldb-server
Pavel Labath [Tue, 29 Nov 2016 17:21:18 +0000 (17:21 +0000)]
Remove assorted other plugins which are not needed by lldb-server

language runtime, structured data, sanitizers, process plugins.

llvm-svn: 288166

7 years agoProtect std::array tests under noexceptions
Roger Ferrer Ibanez [Tue, 29 Nov 2016 17:10:29 +0000 (17:10 +0000)]
Protect std::array tests under noexceptions

Skip tests that expect exceptions be thrown. Also add missing asserts.

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

llvm-svn: 288165

7 years agoRemove dynamic loader, platform and ABI plugins from lldb-server dependencies
Pavel Labath [Tue, 29 Nov 2016 17:06:26 +0000 (17:06 +0000)]
Remove dynamic loader, platform and ABI plugins from lldb-server dependencies

These packages are not used on the server.

llvm-svn: 288164

7 years ago[OpenCL] Prevent generation of globals in non-constant AS for OpenCL.
Anastasia Stulova [Tue, 29 Nov 2016 17:01:19 +0000 (17:01 +0000)]
[OpenCL] Prevent generation of globals in non-constant AS for OpenCL.

Avoid using shortcut for const qualified non-constant address space
aggregate variables while generating them on the stack such that
the alloca object is used instead of a global variable containing
initializer.

Review: https://reviews.llvm.org/D27109
llvm-svn: 288163

7 years agoCompiler-rt part of D26230: Add (constant) masked load/store support
Filipe Cabecinhas [Tue, 29 Nov 2016 16:56:59 +0000 (16:56 +0000)]
Compiler-rt part of D26230: Add (constant) masked load/store support

Summary:
Unfortunately, there is no way to emit an llvm masked load/store in
clang without optimizations, and AVX enabled. Unsure how we should go
about making sure this test only runs if it's possible to execute AVX
code.

Reviewers: kcc, RKSimon, pgousseau

Subscribers: kubabrecka, dberris, llvm-commits

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

llvm-svn: 288162

7 years ago[CVP] Remove use of removed flag (-cvp-dont-process-adds) from the test
Artur Pilipenko [Tue, 29 Nov 2016 16:43:30 +0000 (16:43 +0000)]
[CVP] Remove use of removed flag (-cvp-dont-process-adds) from the test

The flag was removed by 288154

llvm-svn: 288161

7 years ago[DeLICM] Add pass boilerplate code.
Michael Kruse [Tue, 29 Nov 2016 16:41:21 +0000 (16:41 +0000)]
[DeLICM] Add pass boilerplate code.

Add an empty DeLICM pass, without any functional parts.

Extracting the boilerplate from the the functional part reduces the size of the
code to review (https://reviews.llvm.org/D24716)

Suggested-by: Tobias Grosser <tobias@grosser.es>
llvm-svn: 288160

7 years agoSpecify the dependencies of lldb-server manually
Pavel Labath [Tue, 29 Nov 2016 16:40:57 +0000 (16:40 +0000)]
Specify the dependencies of lldb-server manually

Summary:
This basically just inlines the LLDBDependencies.cmake file into lldb-server
CMakeLists.txt. The reason is that most of these dependencies are not actually
necessary for lldb-server (some of them can't be removed because of
cross-dependencies, but most of the plugins can). I intend to start cleaning
these up in follow-up commits, but I want to do this first, so the subsequent
ones can be easily reverted if they don't build in some configurations.

When I cleaned these up locally, I was able to get a 30%--50% improvement in
lldb-server size.

Reviewers: zturner, beanz, tfiala

Subscribers: danalbert, srhines, lldb-commits, mgorny

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

llvm-svn: 288159

7 years agoProtect std::string tests under libcpp-no-exceptions
Roger Ferrer Ibanez [Tue, 29 Nov 2016 16:40:19 +0000 (16:40 +0000)]
Protect std::string tests under libcpp-no-exceptions

Skip tests that expect an exception be thrown and/or disable
unreachable catch handlers.

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

llvm-svn: 288158

7 years agoProtect std::{,unordered_}map tests under noexceptions
Roger Ferrer Ibanez [Tue, 29 Nov 2016 16:37:48 +0000 (16:37 +0000)]
Protect std::{,unordered_}map tests under noexceptions

Skip tests that use exceptions

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

llvm-svn: 288157

7 years agoProtect locale tests under noexceptions
Roger Ferrer Ibanez [Tue, 29 Nov 2016 16:31:40 +0000 (16:31 +0000)]
Protect locale tests under noexceptions

Skip tests that expect exceptions be thrown.

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

llvm-svn: 288156

7 years agoProtect test for dynarray under libcpp-no-exceptions
Roger Ferrer Ibanez [Tue, 29 Nov 2016 16:27:45 +0000 (16:27 +0000)]
Protect test for dynarray under libcpp-no-exceptions

This test expects an exception be thrown.

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

llvm-svn: 288155

7 years ago[CVP] Remove cvp-dont-process-adds flag
Artur Pilipenko [Tue, 29 Nov 2016 16:24:57 +0000 (16:24 +0000)]
[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.

llvm-svn: 288154

7 years ago[ELF] Add support for static TLS to ARM
Peter Smith [Tue, 29 Nov 2016 16:23:50 +0000 (16:23 +0000)]
[ELF] Add support for static TLS to ARM

The module index dynamic relocation R_ARM_DTPMOD32 is always 1 for an
executable. When static linking and when we know that we are not a shared
object we can resolve the module index relocation statically.

The logic in handleNoRelaxTlsRelocation remains the same for Mips as it
has its own custom GOT writing code. For ARM we add the module index
relocation to the GOT when it can be resolved statically.

In addition the type of the RelExpr for the static resolution of TlsGotRel
should be R_TLS and not R_ABS as we need to include the size of
the thread control block in the calculation.

Addresses the TLS part of PR30218.

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

llvm-svn: 288153

7 years ago[PowerPC] Improvements for BUILD_VECTOR Vol. 1
Nemanja Ivanovic [Tue, 29 Nov 2016 16:11:34 +0000 (16:11 +0000)]
[PowerPC] Improvements for BUILD_VECTOR Vol. 1

This patch corresponds to review:
https://reviews.llvm.org/D25912

This is the first patch in a series of 4 that improve the lowering and combining
for BUILD_VECTOR nodes on PowerPC.

llvm-svn: 288152

7 years ago[ELF] - Disable emiting multiple output sections when merging is disabled.
George Rimar [Tue, 29 Nov 2016 16:11:09 +0000 (16:11 +0000)]
[ELF] - Disable emiting multiple output sections when merging is disabled.

When -O0 is specified, we do not do section merging.
Though before this patch several sections were generated instead
of single, what is useless.

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

llvm-svn: 288151

7 years ago[ELF] - Add support of proccessing of the rest allocatable synthetic sections from...
George Rimar [Tue, 29 Nov 2016 16:05:27 +0000 (16:05 +0000)]
[ELF] - Add support of proccessing of the rest allocatable synthetic sections from linkerscript.

This change continues what was started by D27040
Now all allocatable synthetics should be available from script side.

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

llvm-svn: 288150

7 years ago[SLP] Add a new test for tree vectorization starting from insertelement
Alexey Bataev [Tue, 29 Nov 2016 15:37:52 +0000 (15:37 +0000)]
[SLP] Add a new test for tree vectorization starting from insertelement
instruction.

llvm-svn: 288148

7 years ago[X86] Moved getTargetConstantFromNode function so a future patch is more understandab...
Simon Pilgrim [Tue, 29 Nov 2016 15:32:58 +0000 (15:32 +0000)]
[X86] Moved getTargetConstantFromNode function so a future patch is more understandable. NFCI.

llvm-svn: 288147

7 years ago[profile] use GetComputerNameExW instead of gethostname on Windows
Bob Haarman [Tue, 29 Nov 2016 15:24:00 +0000 (15:24 +0000)]
[profile] use GetComputerNameExW instead of gethostname on Windows

Summary: In profile data paths, we replace "%h" with the hostname of the machine the program is running on. On Windows, we used gethostname() to obtain the hostname. This requires linking with ws2_32. With this change, we instead get the hostname from GetComputerNameExW(), which does not require ws2_32.

Reviewers: rnk, vsk, amccarth

Subscribers: zturner, ruiu, hans

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

llvm-svn: 288146

7 years ago[include-fixer] Don't eat one token too many when replacing a block of includes.
Benjamin Kramer [Tue, 29 Nov 2016 15:15:26 +0000 (15:15 +0000)]
[include-fixer] Don't eat one token too many when replacing a block of includes.

SourceRanges are inclusive token ranges, this was trying to form an
exclusive char range.

llvm-svn: 288145

7 years agocanSynthesize: Remove unused argument LI. NFC.
Michael Kruse [Tue, 29 Nov 2016 15:11:04 +0000 (15:11 +0000)]
canSynthesize: Remove unused argument LI. NFC.

The helper function polly::canSynthesize() does not directly use the LoopInfo
analysis, hence remove it from its argument list.

llvm-svn: 288144

7 years ago[libcxx] remove unused code
Aditya Kumar [Tue, 29 Nov 2016 14:43:42 +0000 (14:43 +0000)]
[libcxx] remove unused code

The macro _LIBCPP_UNROLL_LOOPS isn't used anywhere
so the code was dead.

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

llvm-svn: 288143

7 years ago[GVNHoist] Rename variables.
Aditya Kumar [Tue, 29 Nov 2016 14:36:27 +0000 (14:36 +0000)]
[GVNHoist] Rename variables.

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

llvm-svn: 288142

7 years ago[GVNHoist] Enable aggressive hoisting when optimizing for code-size
Aditya Kumar [Tue, 29 Nov 2016 14:34:01 +0000 (14:34 +0000)]
[GVNHoist] Enable aggressive hoisting when optimizing for code-size

Enable scalar hoisting at -Oz as it is safe to hoist scalars to a place
where they are partially needed.

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

llvm-svn: 288141

7 years ago[X86][SSE] Add initial support for combining target shuffles to (V)PMOVZX.
Simon Pilgrim [Tue, 29 Nov 2016 14:18:51 +0000 (14:18 +0000)]
[X86][SSE] Add initial support for combining target shuffles to (V)PMOVZX.

We can only handle 128-bit vectors until we support target shuffle inputs of different size to the output.

llvm-svn: 288140

7 years ago[change-namespace] fix non-calling function references.
Eric Liu [Tue, 29 Nov 2016 14:15:14 +0000 (14:15 +0000)]
[change-namespace] fix non-calling function references.

Reviewers: hokein

Subscribers: cfe-commits

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

llvm-svn: 288139

7 years agoAvoid repeated calls to MVT::getScalarSizeInBits(). NFCI.
Simon Pilgrim [Tue, 29 Nov 2016 13:43:08 +0000 (13:43 +0000)]
Avoid repeated calls to MVT::getScalarSizeInBits(). NFCI.

llvm-svn: 288138

7 years ago[ELF][MIPS] Make stable an order of GOT page address entries
Simon Atanasyan [Tue, 29 Nov 2016 13:26:04 +0000 (13:26 +0000)]
[ELF][MIPS] Make stable an order of GOT page address entries

llvm-svn: 288137

7 years ago[X86][SSE] Added tests showing missed combines to (V)PMOVZX
Simon Pilgrim [Tue, 29 Nov 2016 13:16:11 +0000 (13:16 +0000)]
[X86][SSE] Added tests showing missed combines to (V)PMOVZX

llvm-svn: 288136

7 years ago[PM] Fix a bad invalid densemap iterator bug in the new invalidation
Chandler Carruth [Tue, 29 Nov 2016 12:54:34 +0000 (12:54 +0000)]
[PM] Fix a bad invalid densemap iterator bug in the new invalidation
logic.

Yup, the invalidation logic has an invalid iterator bug. Can't make this
stuff up.

We can recursively insert things into the map so we can't cache the
iterator into that map across those recursive calls. We did this
differently in two places. I have an end-to-end test that triggers at
least one of them. I'm going to work on a nice minimal test case that
triggers these, but I didn't want to leave the bug in the tree while
I tried to trigger it.

Also, the dense map iterator checking stuff we have now is awesome. =D

llvm-svn: 288135

7 years agoUpdate for clang-format change in r288119
Tobias Grosser [Tue, 29 Nov 2016 12:52:08 +0000 (12:52 +0000)]
Update for clang-format change in r288119

llvm-svn: 288134

7 years ago[AST] Use static_assert to verify types instead of undefined classes.
Benjamin Kramer [Tue, 29 Nov 2016 12:41:21 +0000 (12:41 +0000)]
[AST] Use static_assert to verify types instead of undefined classes.

No functionliaty change intended.

llvm-svn: 288133

7 years ago[ELF][MIPS] Add new check to the test case in attempt to investigate Windows build...
Simon Atanasyan [Tue, 29 Nov 2016 11:19:47 +0000 (11:19 +0000)]
[ELF][MIPS] Add new check to the test case in attempt to investigate Windows build-bot failure

llvm-svn: 288132

7 years ago[StringRef] Use default member initializers and = default.
Malcolm Parsons [Tue, 29 Nov 2016 10:53:18 +0000 (10:53 +0000)]
[StringRef] Use default member initializers and = default.

Summary: This makes the default constructor implicitly constexpr and noexcept.

Reviewers: zturner, beanz

Subscribers: llvm-commits

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

llvm-svn: 288131

7 years ago[ELF][MIPS] Restore Config->Threads for MIPS targets
Simon Atanasyan [Tue, 29 Nov 2016 10:24:00 +0000 (10:24 +0000)]
[ELF][MIPS] Restore Config->Threads for MIPS targets

llvm-svn: 288130

7 years ago[ELF][MIPS] Do not change MipsGotSection state in the getPageEntryOffset method
Simon Atanasyan [Tue, 29 Nov 2016 10:23:56 +0000 (10:23 +0000)]
[ELF][MIPS] Do not change MipsGotSection state in the getPageEntryOffset method

The MipsGotSection::getPageEntryOffset calculates index of GOT entry
with a "page" address. Previously this method changes the state
of MipsGotSection because it modifies PageIndexMap field. That leads
to the unpredictable results if getPageEntryOffset called from multiple threads.

The patch makes getPageEntryOffset constant. To do so it calculates GOT
entry index but does not update PageIndexMap field. Later in the
MipsGotSection::writeTo method linker calculates "page" addresses and
writes them to the output.

llvm-svn: 288129

7 years ago[ELF][MIPS] Replace the magic number of GOT header entries by constant. NFC
Simon Atanasyan [Tue, 29 Nov 2016 10:23:50 +0000 (10:23 +0000)]
[ELF][MIPS] Replace the magic number of GOT header entries by constant. NFC

llvm-svn: 288128

7 years ago[ELF][MIPS] Fix calculation of GOT "page address" entries number
Simon Atanasyan [Tue, 29 Nov 2016 10:23:46 +0000 (10:23 +0000)]
[ELF][MIPS] Fix calculation of GOT "page address" entries number

If output section which referenced by R_MIPS_GOT_PAGE or R_MIPS_GOT16
relocations is small (less that 0x10000 bytes) and occupies two adjacent
0xffff-bytes pages, current formula gives incorrect number of required "page"
GOT entries. The problem is that in time of calculation we do not know
the section address and so we cannot calculate number of 0xffff-bytes
pages exactly.

This patch fix the formula. Now it gives a correct number of pages in
the worst case when "small" section intersects 0xffff-bytes page
boundary. From the other side, sometimes it adds one more redundant GOT
entry for each output section. But usually number of output sections
referenced by GOT relocations is small.

llvm-svn: 288127