Commit Graph

236039 Commits

Author SHA1 Message Date
Craig Topper 925ef0a135 [X86] Remove a couple calls to create V2F64 and V4F32 types for builtin handling. Just get the type from the operand of the builtin instead. NFC
llvm-svn: 274820
2016-07-08 01:48:44 +00:00
Mehdi Amini a5cbf4351e Add an assertion for the value enumerator (bitcode writer) NFC
I have an LTO snapshot (for which I don't have sources) that can't
be read back by LLVM. It seems the writer emitted broken bitcode
and this assertions aims at catching such cases.

llvm-svn: 274819
2016-07-08 01:13:41 +00:00
Matt Arsenault a74374a86b AMDGPU: Move si_mask_branch register operand to be a use
llvm-svn: 274818
2016-07-08 00:55:44 +00:00
Matt Arsenault d4a84b1ed2 AMDGPU: Cleanup. Use definesRegister instead of manual loop
Also this will be more precise since it will check
exec_lo/exec_hi writes.

llvm-svn: 274817
2016-07-08 00:55:39 +00:00
Devin Coughlin cad622742e [analyzer] Add rudimentary handling of AtomicExpr.
This proposed patch adds crude handling of atomics to the static analyzer.
Rather than ignore AtomicExprs, as we now do, this patch causes the analyzer
to escape the arguments. This is imprecise -- and we should model the
expressions fully in the future -- but it is less wrong than ignoring their
effects altogether.

This is rdar://problem/25353187

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

llvm-svn: 274816
2016-07-08 00:53:18 +00:00
Saleem Abdulrasool eb059b0e0a ARM: support high registers in __builtin_longjmp on WoA
Windows on ARM uses a pure thumb-2 environment.  This means that it can select a
high register when doing a __builtin_longjmp.  We would use a tLDRi which would
truncate the register to a low register.  Use a t2LDRi12 to get the full
register file access.  Tweak the code to just load into PC, as that is an
interworking branch on all supported cores anyways.

llvm-svn: 274815
2016-07-08 00:48:22 +00:00
Saleem Abdulrasool c61723f73e Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"
This reverts SVN r274797.  It broke the Green Dragon bot.  Revert it until the
failure can be addressed.

llvm-svn: 274814
2016-07-08 00:37:31 +00:00
Andrew Kaylor 3387074ae9 Temporarily remove a test case to unblock PPC bots.
llvm-svn: 274813
2016-07-08 00:35:39 +00:00
Andrew Kaylor 8b8805c94c Temporarily remove one test run line to unblock PPC bots.
llvm-svn: 274812
2016-07-08 00:32:58 +00:00
Piotr Padlewski 9a249cfe4c Fix LTO document
Summary: fixed very old document

Reviewers: tejohnson, pcc

Subscribers: mehdi_amini, eraman, llvm-commits

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

llvm-svn: 274811
2016-07-08 00:28:29 +00:00
Greg Clayton 87c550324c Fix it so that we only grab the typedef from the module DWARF file if the type that is typedef'ed is a declaration. This fixes the following bugs:
<rdar://problem/26870890> [PR28156] TestWithModuleDebugging.py: failing on macOS
https://llvm.org/bugs/show_bug.cgi?id=27412
https://llvm.org/bugs/show_bug.cgi?id=28156

llvm-svn: 274809
2016-07-07 23:57:39 +00:00
Rui Ueyama f731d0afed Test --demangle feature.
Previously, it was not tested because the test was written in
a way that it passed on a platform that does not support
abi::__cxa_demangle. Now we restrict this test to Unix (by adding
"REQUIRES: shell") and assume that it always demangle symbols.
Thanks to Davide to find out the issue.

llvm-svn: 274808
2016-07-07 23:43:09 +00:00
Jacques Pienaar 6d3eecc843 [lanai] Use peephole optimizer to generate more conditional ALU operations.
Summary:
* Similiar to the ARM backend yse the peephole optimizer to generate more conditional ALU operations;
* Add predicated type with default always true to RR instructions in LanaiInstrInfo.td;
* Move LanaiSetflagAluCombiner into optimizeCompare;
* The ASM parser can currently only handle explicitly specified CC, so specify ".t" (true) where needed in the ASM test;
* Remove unused MachineOperand flags;

Reviewers: eliben

Subscribers: aemerson

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

llvm-svn: 274807
2016-07-07 23:36:04 +00:00
Davide Italiano 3f36781dec [ELF] Ignore --demangle. We already demangle symbols by default.
llvm-svn: 274806
2016-07-07 23:32:36 +00:00
Michael Kuperstein 123ae0f26b [CUDA] Pass correct option in test.
llvm-svn: 274805
2016-07-07 23:22:39 +00:00
Rui Ueyama f4d9338dfb Move demangle() from Symbols.cpp to Strings.cpp.
Symbols.cpp contains functions to handle ELF symbols.
demangle() function is essentially a function to work on a
string rather than on an ELF symbol. So Strings.cpp is a
better place to put that function.

This change also make demangle to demangle symbols unconditionally.
Previously, it demangled symbols only when Config->Demangle is true.

llvm-svn: 274804
2016-07-07 23:04:15 +00:00
Rafael Espindola 580d7a1b1e -Bsymbolic should not make symbols more preemptable.
But it was doing that for protected undefined symbols.

llvm-svn: 274803
2016-07-07 22:50:54 +00:00
Michael Kuperstein 3e3652aef2 Recommit r274692 - [X86] Transform setcc + movzbl into xorl + setcc
xorl + setcc is generally the preferred sequence due to the partial register
stall setcc + movzbl suffers from. As a bonus, it also encodes one byte smaller.
This fixes PR28146.

The original commit tried inserting an 8bit-subreg into a GR32 (not GR32_ABCD)
which was not appreciated by fast regalloc on 32-bit.

llvm-svn: 274802
2016-07-07 22:50:23 +00:00
Vedant Kumar 0fdffd3709 [tsan] Try harder to not instrument gcov counters
GCOVProfiler::emitProfileArcs() can create many variables with names
starting with "__llvm_gcov_ctr", so llvm appends a numeric suffix to
most of them. Teach tsan about this.

llvm-svn: 274801
2016-07-07 22:45:28 +00:00
Vedant Kumar 3339c568c4 [Lex] Speed up updateConsecutiveMacroArgTokens (NFC)
SM.isWrittenInSameFile() calls getFileID(), which can be expensive.
Move this check behind some cheaper filters.

llvm-svn: 274800
2016-07-07 22:38:29 +00:00
Simon Pilgrim 13dff57849 Update switch statement to match coding standards.
llvm-svn: 274799
2016-07-07 22:32:26 +00:00
Kevin Enderby 1851a827a0 Add checks to the MachOObjectFile() constructor to make sure load commands sizes
are the correct multiple.

llvm-svn: 274798
2016-07-07 22:11:42 +00:00
Saleem Abdulrasool a1a36c85df Driver: Stop linking to C++ when using sanitizers on Darwin
Sanitizers on Darwin are built as dynamic libraries, not static libraries.
Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
linking against C++ when enabling a sanitizer becomes over linkage.

Patch by Dave Lee!

llvm-svn: 274797
2016-07-07 21:42:29 +00:00
Davide Italiano 16284df8ec [PM] Port InstSimplify to the new pass manager.
llvm-svn: 274796
2016-07-07 21:14:36 +00:00
Anna Thomas 6a78c78a03 [DSE] Remove dead stores in end blocks containing fence
We can remove dead stores in the presence of fence instructions. Fence
does not change an otherwise thread local store to visible.

reviewers: reames, dexonsmith, jfb
Differential Revision: http://reviews.llvm.org/D22001

llvm-svn: 274795
2016-07-07 20:51:42 +00:00
Rui Ueyama a7e11a5d34 Add a missing semicolon.
llvm-svn: 274794
2016-07-07 20:21:50 +00:00
Rui Ueyama 52a1dd76cb Add a reference for Elf_Chdr type.
llvm-svn: 274793
2016-07-07 20:19:19 +00:00
Alina Sbirlea 598f8aad98 Clang-format LoadStoreVectorizer
Reviewers: llvm-commits, jlebar, arsenm

Subscribers: mzolotukhin

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

llvm-svn: 274792
2016-07-07 20:10:35 +00:00
Chad Rosier 4c077aaabb [AArch64] Change the preferred alignment for char and short.
This reinstates commits r273280 and r273289.

Original Review: http://reviews.llvm.org/D21414.

llvm-svn: 274791
2016-07-07 20:02:25 +00:00
Chad Rosier 112d0e996b [AArch64] Change the preferred alignment for char and short to word alignment.
The commit reinstates r273279, which was informally approved.

Original Review: http://reviews.llvm.org/D21414

This reverts commit ca632c91aaa7cafc50942f890c49f727a046ace1.

llvm-svn: 274790
2016-07-07 20:02:18 +00:00
Tim Northover 917e744ea6 GlobalISel: remove redundant property setting. NFC.
AsmString is empty by default.

llvm-svn: 274789
2016-07-07 19:45:45 +00:00
Greg Clayton 19a21d62bf Fix DWARF 4 bitfield support in LLDB to support the DW_AT_data_bit_offset attribute.
<rdar://problem/26321896>

llvm-svn: 274788
2016-07-07 19:44:14 +00:00
Jim Ingham 3a45e03442 Check whether Sema::CreateBuiltinUnaryOp returns an empty result.
If it does, calling AddInitializerToDecl will crash, so we should
abort the result synthesis in this case.

<rdar://problem/27205383>

llvm-svn: 274787
2016-07-07 19:06:37 +00:00
Andrew Kaylor 65fa0704aa Include SelectionDAGISel in the opt-bisect process
Differential Revision: http://reviews.llvm.org/D21143

llvm-svn: 274786
2016-07-07 18:55:02 +00:00
Etienne Bergeron fb5a24b4f0 [compiler-rt] Fix minimal stack reserved for unittest on MSVC build
Summary:
Some unittest were not able to run in 64-bit because they need more than
2MB of stack and the default allocated stack with MSVC linker is 1MB.

Reviewers: rnk

Subscribers: wang0109, chrisha, llvm-commits, kubabrecka

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

llvm-svn: 274785
2016-07-07 18:41:08 +00:00
Peter Collingbourne 73589f321b ThinLTO: Do not take into account whether a definition has multiple copies when promoting.
We currently do not touch a symbol's linkage in the case where a definition
has a single copy. However, this code is effectively unnecessary: either
the definition is not exported, in which case the internalize phase sets
its linkage to internal, or it is exported, in which case we need to promote
linkage to weak. Those two cases are already handled by existing code.

I believe that the only real functional change here is in the case where we
have a single definition which does not prevail (e.g. because the definition
in a native object file prevails). In that case we now lower linkage to
available_externally following the existing code path for that case.

As a result we can remove the isExported function parameter from the
thinLTOResolveWeakForLinkerInIndex function.

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

llvm-svn: 274784
2016-07-07 18:31:51 +00:00
Jim Ingham bed6779c7a Add an "experimental" setting to disable injecting local variables into expressions.
This feature was added to solve a lookup problem in expressions when local variables
shadow ivars.  That solution requires fully realizing all local variables to evaluate
any expression, and can cause significant performance problems when evaluating 
expressions in frames that have many complex locals.

Until we get a better solution, this setting mitigates the problem when you don't
have local variables that shadow ivars.

<rdar://problem/27226122>

llvm-svn: 274783
2016-07-07 18:25:48 +00:00
Justin Lebar f39977112a [CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.
Fix build breakage.

llvm-svn: 274782
2016-07-07 18:24:28 +00:00
Justin Lebar c43ad9ee5a [CUDA] Check that our CUDA install supports the requested architectures.
Summary:
Raise an error if you're using a CUDA installation that's too old for
the requested architectures.  In practice, this means that you need a
CUDA 8 install to compile for sm_6*.

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 274781
2016-07-07 18:17:52 +00:00
Justin Lebar 495f1a22af [CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.
The builtin was renamed in r274770.  But __syncthreads is part of our
user-facing API, so we need to keep the name as-is.

Patch by Justin Bogner.

llvm-svn: 274780
2016-07-07 18:15:03 +00:00
Justin Lebar e5c910f8ae [NVVM] Rename __nvvm_bar0 builtin back to __syncthreads.
__syncthreads was renamed to __nvvm_bar0 in r274664.  But __syncthreads
is part of our user-facing API, so we need to keep the name.

This will momentarily break clang; we need a matching patch there.

Patch by Justin Bogner.

llvm-svn: 274779
2016-07-07 18:14:55 +00:00
Dan Liew 30ca81f1f7 [LibFuzzer] Unbreak the build on macOS which was broken by r272858.
``afl_driver.cpp`` currently relies on weak symbols which doesn't
work properly under macOS. For now fix the build by providing a
dummy implementation of ``LLVMFuzzerInitialize(...)``. This is just
a temporary measure until we fix ``afl_driver.cpp`` for macOS.

llvm-svn: 274778
2016-07-07 18:14:11 +00:00
Justin Bogner e2467baba8 Update for llvm r274769
llvm-svn: 274777
2016-07-07 18:03:30 +00:00
Luke Drummond 3db0491966 Respect ANDROID_SERIAL environment variable used by ADB
When multiple Android devices are attached, the default behaviour of ADB
is to resolve a device number based on the presence of ANDROID_SERIAL if
the serial number is not explicitly passed by the -s parameter. This patch
emulates that behaviour in lldb's ADB platform connector

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

llvm-svn: 274776
2016-07-07 18:02:44 +00:00
Etienne Bergeron 31f4672f93 [compiler-rt] Enhance unittest coverage for lib interception
Summary:
This patch is adding more unittests for testing the interception
of 32-bits code.

Reviewers: rnk

Subscribers: llvm-commits, wang0109, chrisha

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

llvm-svn: 274775
2016-07-07 17:51:50 +00:00
Tim Northover 1d106c5fc2 tests: accept different TargetOpcode values.
These tests don't actually care about the internal opcode number, but have to
be updated whenever we add a new one for GlobalISel. That's bad.

llvm-svn: 274774
2016-07-07 17:51:42 +00:00
Davide Italiano 709d41819b [LoopStrengthReduce] Fix -Wmisleading-indentation. Reported by GCC6.
llvm-svn: 274773
2016-07-07 17:44:38 +00:00
Etienne Bergeron 9654f2afe3 [compiler-rt] Fix sanitizer memory allocator on win64.
Summary:
This patch is fixing unittests for sanitizer memory allocator.

There was two issues:
  1) The VirtualAlloc can't reserve twice a memory range.
     The memory space used by the SizeClass allocator is reserved
     with NoAccess and pages are commited on demand (using MmapFixedOrDie).

  2) The address space is allocated using two VirtualAlloc calls. The first one
     for the memory space, the second one for the AdditionnalSpace (after).

     On windows, they need to be freed separately.

Reviewers: rnk

Subscribers: llvm-commits, wang0109, kubabrecka, chrisha

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

llvm-svn: 274772
2016-07-07 17:44:08 +00:00
Michael Kuperstein edb38a94f8 Revert r274692 to check whether this is what breaks windows selfhost.
llvm-svn: 274771
2016-07-07 16:55:35 +00:00
Justin Bogner 2d5de7e568 NVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx ones
The ptx spellings were removed from LLVM in r274769.

llvm-svn: 274770
2016-07-07 16:41:08 +00:00