Commit Graph

211262 Commits

Author SHA1 Message Date
Tobias Grosser 8016f3a4f5 Add missing PHI to test case
llvm-svn: 248563
2015-09-25 05:41:30 +00:00
Saleem Abdulrasool 8e99f50768 ARM: make -Asserts,-Werror=unused-variable build happy
The value was only used in an assertion.  Sink the variable usage into the
assertion.

llvm-svn: 248562
2015-09-25 05:41:02 +00:00
Saleem Abdulrasool fe83b50289 ARM: address WoA division limitation
We now emit the compiler generated divide by zero check that was needed for the
MSVC routines.  We construct a psuedo-instruction for the DBZ check as the
operation requires splitting up the BB.  For the 64-bit operations, we need to
custom expand the node as we need to insert the DBZ check and then emit the
libcall to the appropriate name.  Because this is target specific, it seemed
better to reproduce the expansion operation from the target-agnostic type
legalization rather than sink this there to avoid the duplication.  The division
library calls now match MSVC semantically.

llvm-svn: 248561
2015-09-25 05:15:46 +00:00
Davide Italiano b558b79c88 [ELF2] Make buildbot happy again.
llvm-svn: 248560
2015-09-25 04:22:13 +00:00
Davide Italiano 85121bbf24 [ELF2] Use static non-member function when it suffices.
Pointed out by Rui Ueyama.

llvm-svn: 248559
2015-09-25 03:56:11 +00:00
Rui Ueyama 3f4ec66624 ELF2: Use lambdas instead of named functions.
They are short and used only once, so writing them where they are used
is better.

llvm-svn: 248558
2015-09-25 03:48:25 +00:00
Rui Ueyama 4c4993bba6 Remove dead code.
llvm-svn: 248557
2015-09-25 03:38:56 +00:00
Dawn Perchik 045c829223 Fix evaluation of unicode character arrays (char16_t[] and char32_t[])
Suppose we have the UTF-16 string:
    char16_t[] s = u"hello";
Before this patch, evaluating the string in lldb would get:
    (char16_t [6]) $0 = ([0] = U+0068 u'h', [1] = U+0065 u'e', [2] = U+006c u'l', [3] = U+006c u'l', [4] = U+006f u'o', [5] = U+0000 u'\0')
After applying the patch, we now get:
    (char16_t [6]) $0 = u"hello"

Patch from evgeny.leviant@gmail.com
Reviewed by: granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13053

llvm-svn: 248555
2015-09-25 02:16:52 +00:00
Davide Italiano aa7c533ec3 [ELF2] Fix binaries so they actually run on FreeBSD.
Since FreeBSD 4.1, the kernel expects binaries to be marked with
ELFOSABI_FREEBSD in the ELF header to exec() them. LLD unconditionally 
sets OSABI to ELF_OSABINONE, and everything linked with it won't run 
on FreeBSD (unless explicitly rebranded).

Example:
% ./aarch64-hello
ELF binary type "0" not known.
zsh: exec format error: ./aarch64-hello

FreeBSD could be modified to accept ELF_OSABINONE, but that would break all
existing binaries, so the kernel needs to support both ABINONE and ABIFREEBSD.
I plan to push this change in FreeBSD one day, which, unfortunately, is 
not today. This code patches lld so it sets the header field correctly.

For completeness, the rationale of this change is explained in the FreeBSD 
commit message, and it's apparently to pleasee binutils maintainers at the time.
https://svnweb.freebsd.org/base?view=revision&revision=59342

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

llvm-svn: 248554
2015-09-25 01:59:13 +00:00
Matt Arsenault 8aa9973696 AMDGPU: Remove unused includes
llvm-svn: 248553
2015-09-25 00:28:43 +00:00
Sanjoy Das b0e9d4a5d1 [LangRef] Unbreak the docs Sphinx build.
r248551 introduced some breakage due to incorrectly terminated
``literals`` s.

llvm-svn: 248552
2015-09-25 00:05:40 +00:00
Sanjoy Das b513a9fa4f [Bitcode][Asm] Teach LLVM to read and write operand bundles.
Summary:
This also adds the first set of tests for operand bundles.

The optimizer has not been audited to ensure that it does the right
thing with operand bundles.

Depends on D12456.

Reviewers: reames, chandlerc, majnemer, dexonsmith, kmod, JosephTremoulet, rnk, bogner

Subscribers: maksfb, llvm-commits

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

llvm-svn: 248551
2015-09-24 23:34:52 +00:00
Ed Maste f021808d60 Restore test coverage for other than ELFOSABI_NONE
Add a FreeBSD test to restore testing of ELF OSABI other than
ELFOSABI_NONE after r248534.

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

llvm-svn: 248550
2015-09-24 23:01:16 +00:00
Matt Arsenault 50f0a42b66 Fix typo
llvm-svn: 248549
2015-09-24 22:36:49 +00:00
Chris Bieneman 7146f7bcf9 [CMake] [darwin] [cc_kext] In addition to builtin sources the cc_kext builtins include some functions from clang_rt.profile.
llvm-svn: 248548
2015-09-24 22:29:58 +00:00
Siva Chandra 13a62c6595 [TestCppIncompleteTypes] Handle different archs when building a.o.
Reviewers: chying

Subscribers: lldb-commits

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

llvm-svn: 248547
2015-09-24 22:13:36 +00:00
Ekaterina Romanova c52c30a78e This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

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

llvm-svn: 248546
2015-09-24 22:06:52 +00:00
Todd Fiala 5e365481be Fix tests on cmake-based OS X after rL248338
See:
https://llvm.org/bugs/show_bug.cgi?id=24926

for details.  On OS X, when LLDB.framework is
not part of the lldb.dylib path, the supporting
executable path is resolved to be the bin directory
sitting next to the lib directory with the dylib
lives.  Not a perfect solution, but we also can't
base it on the executable path since both Python
and the lldb driver can be the executable.

llvm-svn: 248545
2015-09-24 21:59:48 +00:00
Chris Bieneman 77456efcb1 [CMake] Move LLD to the new style for symlink generation, and make the links list overridable.
Reviewers: lhames, rafael

Subscribers: llvm-commits

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

llvm-svn: 248544
2015-09-24 21:53:18 +00:00
Chris Bieneman 590a48d4de [CMake] [darwin] [builtins] Refactoring darwin_find_excluded_builtins_list to parse arguments instead of only handling positional arguments.
OS and ARCH must be specified, but minimum version may not. Excluding the minimum version will only apply the filters for builtins not supported by the OS and OS-Arch pair.

llvm-svn: 248543
2015-09-24 21:51:09 +00:00
Chris Bieneman 5fbaeb9e5c [CMake] [darwin] [builtins] Refactoring code to filter builtin lists out into a function. NFC.
llvm-svn: 248542
2015-09-24 21:40:06 +00:00
Siva Chandra bd7f0dfaa2 [TestCppIncompleteTypes] Remove the dependence on std::string.
Reviewers: dblaikie, clayborg

Subscribers: lldb-commits

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

llvm-svn: 248541
2015-09-24 21:29:54 +00:00
Chad Rosier b02f5a5a1f [AArch64] Improve the readability of the ld/st optimization pass. NFC.
In this context, MI is an add/sub instruction not a loads/store.

llvm-svn: 248540
2015-09-24 21:27:49 +00:00
Eric Christopher 7d0c7255c5 Move the darwin define static function to be close to the OS define.
llvm-svn: 248539
2015-09-24 21:17:04 +00:00
Eric Christopher d8eb961b0f Use just one larger anonymous namespace instead of a lot of smaller ones.
llvm-svn: 248538
2015-09-24 21:17:02 +00:00
Sanjay Patel b9d88ffd6d fix typos; NFC
llvm-svn: 248537
2015-09-24 21:11:52 +00:00
Simon Pilgrim 68d0050c6a [X86][SSE2] Fix zero/any extension shuffles that don't start from the first element
Fix for D12561 - we weren't correctly ensuring that the base element for extension was moved to start on a boundary suitable for UNPCKL/H

llvm-svn: 248536
2015-09-24 21:02:17 +00:00
Tobias Grosser da95a4a7c7 Handle read-only scalars used in PHI-nodes correctly
This change addresses three issues:

  - Read only scalars that enter a PHI node through an edge that comes from
    outside the scop are not modeled any more, as such PHI nodes will always
    be initialized to this initial value right before the SCoP is entered.
  - For PHI nodes that depend on a scalar value that is defined outside the
    scop, but where the scalar values is passed through an edge that itself
    comes from a BB that is part of the region, we introduce in this basic
    block a read of the out-of-scop value to ensure it's value is available
    to write it into the PHI alloc location.
  - Read only uses of scalars by PHI nodes are ignored in the general read only
    handling code, as they are taken care of by the general PHI node modeling
    code.

llvm-svn: 248535
2015-09-24 20:59:59 +00:00
Rafael Espindola 4405d5d889 Use ELFOSABI_NONE instead of ELFOSABI_LINUX.
The doesn't seem to be a difference and ELFOSABI_NONE seems to be far more
common:

* Linux doesn't care when loading and puts ELFOSABI_NONE on core dumps.
* Gold and bfd ld produce files with ELFOSABI_NONE.
* Gold and bfd ld seems to ignore EI_OSABI other than for freebsd.
* Gas puts ELFOSABI_NONE in most .o files.

llvm-svn: 248534
2015-09-24 20:57:24 +00:00
Matt Arsenault e66621b306 AMDGPU: Add s_dcache_* instructions
llvm-svn: 248533
2015-09-24 19:52:27 +00:00
Matt Arsenault d6adfb401c AMDGPU: Add cache invalidation instructions.
These are necessary for implementing mem_fence for
OpenCL 2.0.

The VI assembler tests are disabled since it seems to be
using the wrong encoding or opcode.

llvm-svn: 248532
2015-09-24 19:52:21 +00:00
Matt Arsenault c116767fec AMDGPU: Run mubuf assembler test for CI
llvm-svn: 248531
2015-09-24 19:52:15 +00:00
Chris Bieneman 4acaa8fd9d [autoconf] Fixing a bug I introduced r248441
llvm-svn: 248529
2015-09-24 19:35:36 +00:00
Chad Rosier 7cd472b719 [AArch64] The paired post-increment store instruction has an output register.
The pre- and post-increment version update the base register, but the post-
version was defined incorrectly.  There is no test case as we don't currently
generate these instructions, but I plan on changing that in the near future.

llvm-svn: 248528
2015-09-24 19:21:42 +00:00
Sanjoy Das 9303c24650 [IR] Add operand bundles to CallInst and InvokeInst.
Summary:
This change teaches `CallInst`s and `InvokeInst`s to maintain a set of
operand bundles as part of its operands.  `CallInst`s and `InvokeInst`s
with operand bundles co-allocate some space before their `Use` array to
hold meta information about which of its operands are part of an operand
bundle.

The strings corresponding to the bundle tags are interned into
`LLVMContextImpl::BundleTagCache`

This change does not include any parsing / bitcode support.  That's the
next change.

Depends on D12455.

Reviewers: reames, chandlerc, majnemer, dexonsmith, kmod, JosephTremoulet, rnk, bogner

Subscribers: MatzeB, sanjoy, llvm-commits

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

llvm-svn: 248527
2015-09-24 19:14:18 +00:00
Rui Ueyama c28a08b8d2 COFF: Remove duplicate parameter from hash value calculation.
llvm-svn: 248526
2015-09-24 19:00:42 +00:00
Rui Ueyama 1392d8b5fe Fix memory leak in FileArchive::find().
Patch from George Rimar!

llvm-svn: 248525
2015-09-24 18:59:26 +00:00
Rui Ueyama d5b5ab7638 [ELF2] Output of all unknown arguments instead of only one.
Patch from George Rimar!

llvm-svn: 248524
2015-09-24 18:55:33 +00:00
Chris Bieneman 9b788a452b [CMake] [darwin] [builtins] Match clang_darwin.mk's compiler flags when building builtin libraries
On Darwin we have a very restrictive set of flags used when building the builtins. This change makes CMake match autoconf.

llvm-svn: 248523
2015-09-24 18:26:34 +00:00
Dmitry Vyukov 2fe0efcc69 tsan: add test for issue #602
llvm-svn: 248522
2015-09-24 17:38:56 +00:00
Artyom Skrobov d3ae09bcc8 Recommit r248154: [ARM] Handle DSP feature as an ArchExtKind
Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in
a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME:
attached.

http://reviews.llvm.org/D12937 moved the handling of the DSP feature over to
ARMTargetParser.def in LLVM, to be in line with other architecture extensions.

This is the corresponding patch to clang, to clear the FIXME: and update
the tests.

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

llvm-svn: 248521
2015-09-24 17:34:05 +00:00
Michael Kruse 26ed65e00d Fix comparison signed/unsigned mismatch warning; NFC
llvm-svn: 248520
2015-09-24 17:32:49 +00:00
Artyom Skrobov cf296444ab [ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def
Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a
hand-rolled tricky condition block in tools/clang/lib/Basic/Targets.cpp, with
a FIXME: attached.

This patch changes the handling of +t2dsp to be in line with other
architecture extensions.

Following a revert of r248152 and new review comments, this patch also includes
renaming FeatureDSPThumb2 -> FeatureDSP, hasThumb2DSP() -> hasDSP(), etc.
The spelling of "t2dsp" is preserved, pending a further investigation of its
possible external usage.

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

llvm-svn: 248519
2015-09-24 17:31:16 +00:00
Evgeniy Stepanov 299238a67b Enable SafeStack on all Linux platforms.
llvm-svn: 248518
2015-09-24 17:22:46 +00:00
Angel Garcia Gomez 8535c6c278 Add NamingStyle option to modernize-loop-convert.
Summary: Add an option to specify wich style must be followed when choosing the new index name.

Reviewers: alexfh

Subscribers: cfe-commits, klimek

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

llvm-svn: 248517
2015-09-24 17:02:19 +00:00
Devin Coughlin 0da2e93345 [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region.
Change the analyzer's modeling of memcpy to be more precise when copying into fixed-size
array fields. With this change, instead of invalidating the entire containing region the
analyzer now invalidates only offsets for the array itself when it can show that the
memcpy stays within the bounds of the array.

This addresses false positive memory leak warnings of the kind reported by
krzysztof in https://llvm.org/bugs/show_bug.cgi?id=22954

(This is the second attempt, now with assertion failures resolved.)

A patch by Pierre Gousseau!

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

llvm-svn: 248516
2015-09-24 16:52:56 +00:00
Chris Bieneman d983ae0a0e [CMake] pass -Wno-pedantic to cc_kext builtins build
We don't pass -pedantic to the builtin builds in the makefiles, so we shouldn't do it here. This is a temporary fix for the broken bot:

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_build/7526/warnings8Result/new/

A more correct solution is in the works.

llvm-svn: 248515
2015-09-24 16:47:26 +00:00
Vasileios Kalintiris 22db068008 Be consistent in the way we define 32/64-bit arches in ALL_*_SUPPORTED_ARCH variables. NFC.
Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 248514
2015-09-24 16:45:58 +00:00
Greg Clayton b877a20211 Don't enter interactive loop when finished running the test suite.
llvm-svn: 248513
2015-09-24 16:37:41 +00:00
Adrian Prantl f3e634b8fb dsymutil: Fix the condition to distinguish module imports form definitions.
llvm-svn: 248512
2015-09-24 16:10:14 +00:00