Commit Graph

195081 Commits

Author SHA1 Message Date
Fariborz Jahanian 773fa2cb03 [SDK modernizer]. Patch fixes driver's lack of
recognition of mernizer's -objcmt-migrate-property-dot-syntax
option with a new test in test/Driver. rdar://19994452

llvm-svn: 231080
2015-03-03 17:15:38 +00:00
Duncan P. N. Exon Smith b353849c9e IR: Add missing API to specialized metadata nodes
Add the final bits of API that `DIBuilder` needs before the new nodes
can be moved into place.

  - Add `MDType::clone()` and `MDType::setFlags()` to support
    `DIBuilder::createTypeWithFlags()`.
  - Add `MDBasicType::get()` overload that just requires a tag and a
    name, as a convenience for `DIBuilder::createUnspecifiedType()`.
  - Add `MDLocalVariable::withInline()` and
    `MDLocalVariable::withoutInline()` to support
    `llvm::createInlinedVariable()` and
    `llvm::cleanseInlinedVariable()`.

(Somehow these got lost inside the "move into place" patch I'm about to
commit -- better to commit separately!)

llvm-svn: 231079
2015-03-03 16:45:34 +00:00
Andrey Churbanov bebb54050b Cleanup provided by Carlo Bertolli
llvm-svn: 231078
2015-03-03 16:19:57 +00:00
Marshall Clow af670e4b37 Add better tests for ctype<char>::classic_table
llvm-svn: 231077
2015-03-03 16:15:26 +00:00
Eric Fiselier 0357171f1c [libcxx] Add support for linking libc++ against a static ABI library.
Summary:
This patch add the CMake option `LIBCXX_ENABLE_STATIC_ABI_LIBRARY` which, when enabled, will link libc++ against the static version of the ABI library.


Reviewers: mclow.lists, jroelofs, danalbert

Reviewed By: danalbert

Subscribers: compnerd, cfe-commits

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

llvm-svn: 231076
2015-03-03 15:59:51 +00:00
Eric Fiselier 14dbeaadc1 [libcxxabi] Build both static and shared versions of libc++abi by default.
Summary:
This patch builds both static and shared versions of libc++abi by default. It adds/repurposes the following cmake options:
* `LIBCXXABI_ENABLE_SHARED`: Enable/disable building the shared library. (Previously using `OFF` would build the static library instead)
* `LIBCXXABI_ENABLE_STATIC`: Enable/disable building the static library.

This patch also re-purposes the CMake target `cxxabi` to be a meta-target for `cxxabi_shared` and `cxxabi_static`. This could potentially break other builds that depend on `cxxabi` being a library target. We will need to apply a patch to libc++'s CMake before committing this change. 

Running the tests is still only supported when the shared version is built. Support for running the tests against the static library will come in another patch.


Reviewers: jroelofs, mclow.lists, danalbert, compnerd

Reviewed By: danalbert, compnerd

Subscribers: cfe-commits

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

llvm-svn: 231075
2015-03-03 15:59:09 +00:00
NAKAMURA Takumi 10d576d8dc Make llvm/test/Object/archive-format.test CRLF-tolerant.
llvm-svn: 231074
2015-03-03 15:54:48 +00:00
Michael Kuperstein 84dff4c94c [X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.
llvm-svn: 231073
2015-03-03 15:47:02 +00:00
Ilia K 9f11852b2d Fix and enable some tests on Linux (MI)
Summary:
Fix and enable some lldb-mi tests on Linux:

Fixed:
# MiExecInterpreterTestCase.test_lldbmi_thread_step_in
# MiExecTestCase.test_lldbmi_exec_step
# MiStackTestCase.test_lldbmi_stack_info_frame tests.

Also I enabled the following tests on Linux:
# MiExecTestCase.test_lldbmi_exec_step_instruction
# MiSignalTestCase.test_lldbmi_stopped_when_interrupted

All test pass on OS X and Linux.

Reviewers: abidh, vharron, clayborg

Reviewed By: clayborg

Subscribers: vharron, lldb-commits, clayborg, abidh

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

llvm-svn: 231072
2015-03-03 15:32:39 +00:00
Ilia K 3dadd9db90 Improve MiStackTestCase tests
Summary:
Improve MiStackTestCase tests.

All tests pass on OS X.

Reviewers: clayborg, abidh

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, abidh

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

llvm-svn: 231071
2015-03-03 15:17:44 +00:00
Ilia K c6c716ac9d Allow to pass an executable file via lldb-mi arguments (MI)
Summary:
# Allow to pass an executable file via lldb-mi arguments
# Add tests
# Fix (gdb) prompt in CMIDriver::LocalDebugSessionStartupExecuteCommands
# Fix prompt in CMIDriver::InterpretCommandThisDriver: use the lldb-mi prompt instead of a hard-coded value.

All tests pass on OS X.

Reviewers: abidh, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, abidh

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

llvm-svn: 231070
2015-03-03 15:14:32 +00:00
Elena Demikhovsky d207f17fa1 AVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.
No functional changes.

llvm-svn: 231069
2015-03-03 15:03:35 +00:00
Manuel Klimek 27ee25f738 Make -Wuninitialized warn on pointer-to-member and comma operators.
`isTrackedVar` has been updated to also track records.
`DeclRefExpr`s appearing on the left side of a comma operator are
ignored, while those appearing on the right side are classified as
`Use`.

Patch by Enrico Pertoso.

llvm-svn: 231068
2015-03-03 14:54:25 +00:00
Manuel Klimek 2d29340095 Make sure we initialize all values in WhitespaceManager::Change.
llvm-svn: 231067
2015-03-03 14:21:48 +00:00
Daniel Jasper 0391e55650 clang-format: Fix access to uninitialized memory.
With incomplete code, we aren't guaranteed to generated changes for
every token. In that case, we need to assume that even the very first
change can continue a preprocessor directive and initialize values
accordingly.

llvm-svn: 231066
2015-03-03 13:59:49 +00:00
Tamas Berghammer bd05108e53 Fix execution of platform shell commands on android
* Add missing functionality to the process launcher
* Fixup PATH environment variable to workaround an OS bug
* Add default shell path to the host info structure

Differential revision: http://reviews.llvm.org/D8009

llvm-svn: 231065
2015-03-03 12:14:45 +00:00
Daniel Jasper 8f239f83b0 During PHI elimination, split critical edges that move copies out of loops.
This prevents the behavior observed in llvm.org/PR22369. I am not sure
whether I am reading the code correctly, but the early exit based on
isLiveOutPastPHIs() seems to make the wrong assumption that
RegisterCoalescer won't be able to coalesce those copies later.

This change hides the new behavior behind -no-phi-elim-live-out-early-exit
as it currently breaks four tests:
 * Assertion in:
     CodeGen/Hexagon/hwloop-cleanup.ll
 * Worse code in:
     CodeGen/X86/coalescer-commute4.ll
     CodeGen/X86/phys_subreg_coalesce-2.ll
     CodeGen/X86/zlib-longest-match.ll
   The root cause here seems to be that the heuristic that determines
   the visitation order in RegisterCoalescer gets less lucky.

llvm-svn: 231064
2015-03-03 10:23:11 +00:00
Daniel Jasper 34d761d893 Revert r231008 (and dependent r231019).
As Chandler responded on the initial commit, just directly setting the
triple through -Xclang option to the driver creates havoc on other
platforms. The driver test should specifically go into test/Driver and
test the cc1 commandline itself.

llvm-svn: 231063
2015-03-03 10:02:53 +00:00
Daniel Berlin cf0805b872 Add range iterators to Extract/InsertValueInst indices
llvm-svn: 231062
2015-03-03 09:31:01 +00:00
Kuba Brecka e87a26c0ed Symbolizer refactoring: Turn FillAddressAndModuleInfo into FillModuleInfo
Reviewed at http://reviews.llvm.org/D8020

llvm-svn: 231061
2015-03-03 09:18:44 +00:00
Argyrios Kyrtzidis f0b4cd1ed3 [ASTUnit] Fix crash when trying to load a module file via ASTUnit::LoadFromASTFile.
rdar://19997358

llvm-svn: 231060
2015-03-03 08:04:19 +00:00
Nick Lewycky b1de8c2b73 Switch up whitespace with better whitespace.
llvm-svn: 231059
2015-03-03 07:59:45 +00:00
Nick Lewycky fe9cee7b0a Revert the non-cleanup part of r230769 because it introduced a non-determinism found only in the names of symbols.
llvm-svn: 231058
2015-03-03 07:57:45 +00:00
Davide Italiano 7a89462158 [ELF] Implement R_X86_64_PC16 relocation.
Yet another chapter in the story. We're getting there, finally.
Note for the future: the tests for relocation have a lot of duplication
and probably can be unified in a single file. Let's reevaluate this once
the support will be complete (hopefully, soon).

llvm-svn: 231057
2015-03-03 07:38:20 +00:00
Owen Anderson 7325b91783 Cleanup after r230934 per Dave's suggestions.
llvm-svn: 231056
2015-03-03 05:39:27 +00:00
Craig Topper ef04b2b505 [X86] Remove some unused code from disassembler.
llvm-svn: 231055
2015-03-03 05:24:03 +00:00
David Majnemer fba75df599 Sema: Caught exception objects should be unqualified
The exception object should be unqualified.  Using a qualified exception
object results in the wrong copy constructor getting called when the
catch handler executes.

llvm-svn: 231054
2015-03-03 04:38:34 +00:00
Nico Weber a3ef8cad11 Remove obsolete FIXME. override on definitions is fine.
llvm-svn: 231053
2015-03-03 03:31:15 +00:00
Kostya Serebryany 3e7825efb5 [asan] Since x32 has 32-bit pointers, it should use the same code sequence as ia32 for AddressSanitizer asm_flags test. Patch by H.J. Lu
llvm-svn: 231052
2015-03-03 02:45:21 +00:00
Sanjoy Das 9ff4921d25 Revert "[ADT] fail-fast iterators for DenseMap"
This reverts commit r231035.  It breaks clang.

llvm-svn: 231050
2015-03-03 01:59:38 +00:00
David Majnemer d09a51c299 Sema: Properly initialize the thrown exception object
We would create the exception object with the wrong qualifiers, ensuring
that the wrong copy constructor would get called.

llvm-svn: 231049
2015-03-03 01:50:05 +00:00
Greg Clayton 786ad18049 Fix a crasher where we might have a N_UNDF symbol with no name and this could cause ObjectFileMachO::ParseSymtab() to crash.
<rdar://problem/19989491>

llvm-svn: 231048
2015-03-03 01:40:46 +00:00
Peter Collingbourne d34ce74c55 Add explicit type to empty std::set initializer to fix the libc++ build.
llvm-svn: 231047
2015-03-03 01:39:13 +00:00
Ahmed Bougacha afbd6887c4 [X86] Special-case 2x CMOV when custom-inserting.
This lets us avoid a few copies that are otherwise hard to get rid of.
The way this is done is, the custom-inserter looks at the following
instruction for another CMOV, and replaces both at the same time.
A previous version used a new CMOV2 opcode, but the custom inserter
is expected to be able to return a different basic block anyway, which
means it's OK - though far from ideal - to alter that block's contents.
Explicitly document that, in case it ever makes a difference.
Alternatives welcome!

Follow-up to r231045.

rdar://19767934
Closes http://reviews.llvm.org/D8019

llvm-svn: 231046
2015-03-03 01:21:16 +00:00
Ahmed Bougacha 066d0b8e64 [X86] Combine (cmov (and/or (setcc) (setcc))) into (cmov (cmov)).
Fold and/or of setcc's to double CMOV:

(CMOV F, T, ((cc1 | cc2) != 0)) -> (CMOV (CMOV F, T, cc1), T, cc2)
(CMOV F, T, ((cc1 & cc2) != 0)) -> (CMOV (CMOV T, F, !cc1), F, !cc2)

When we can't use the CMOV instruction, it might increase branch
mispredicts.  When we can, or when there is no mispredict, this
improves throughput and reduces register pressure.

These can't be catched by generic combines, because the pattern can
appear when legalizing some instructions (such as fcmp une).

rdar://19767934
http://reviews.llvm.org/D7634

llvm-svn: 231045
2015-03-03 01:09:14 +00:00
Reid Kleckner 1d2c3f91cd Fix cppeh breakage due to racing commits
llvm-svn: 231044
2015-03-03 01:04:39 +00:00
Peter Collingbourne da2dbf21a9 LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.
By loading from indexed offsets into a byte array and applying a mask, a
program can test bits from the bit set with a relatively short instruction
sequence. For example, suppose we have 15 bit sets to lay out:

A (16 bits), B (15 bits), C (14 bits), D (13 bits), E (12 bits),
F (11 bits), G (10 bits), H (9 bits), I (7 bits), J (6 bits), K (5 bits),
L (4 bits), M (3 bits), N (2 bits), O (1 bit)

These bits can be laid out in a 16-byte array like this:

      Byte Offset
    0123456789ABCDEF
Bit
  7 HHHHHHHHHIIIIIII
  6 GGGGGGGGGGJJJJJJ
  5 FFFFFFFFFFFKKKKK
  4 EEEEEEEEEEEELLLL
  3 DDDDDDDDDDDDDMMM
  2 CCCCCCCCCCCCCCNN
  1 BBBBBBBBBBBBBBBO
  0 AAAAAAAAAAAAAAAA

For example, to test bit X of A, we evaluate ((bits[X] & 1) != 0), or to
test bit X of I, we evaluate ((bits[9 + X] & 0x80) != 0). This can be done
in 1-2 machine instructions on x86, or 4-6 instructions on ARM.

This uses the LPT multiprocessor scheduling algorithm to lay out the bits
efficiently.

Saves ~450KB of instructions in a recent build of Chromium.

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

llvm-svn: 231043
2015-03-03 00:49:28 +00:00
Andrew Kaylor 72029c6f2f Remap arguments and non-alloca values used by outlined C++ exception handlers.
Differential Revision: http://reviews.llvm.org/D7844

llvm-svn: 231042
2015-03-03 00:41:03 +00:00
Benjamin Kramer 838752d3f6 LoopIdiom: Give globals for memset_pattern16 private linkage.
There's really no reason to have them have entries in the symbol table
anymore. Old versions of ld64 had some bugs in this area but those have
been fixed long ago.

llvm-svn: 231041
2015-03-03 00:17:09 +00:00
Alexey Samsonov 042e51823b [Sanitizers] Remove duplication in sanitizer group definition. NFC.
There is no need to list sanitizers in both "UndefinedTrap" and
"Undefined" groups - it turns out using one group in a defintion
of another group "just works".

llvm-svn: 231040
2015-03-03 00:14:32 +00:00
Matthias Braun dae4bac847 Fix typo in my last commit.
llvm-svn: 231039
2015-03-03 00:12:08 +00:00
Reid Kleckner 6f0e4b897e WinEH: Run opt -instnamer over some cppeh tests and update CHECKs
In the future, we should run the output of clang through instnamer to
make it easier to manually edit test cases.

No functionality change.

llvm-svn: 231037
2015-03-03 00:05:35 +00:00
Fariborz Jahanian 7b012d3728 [SDK modernizer] Patch to fix type of the typed enums when
migrating to NS_ENUM typedef. rdar://19994496

llvm-svn: 231036
2015-03-02 23:58:02 +00:00
Sanjoy Das 30d65c18dc [ADT] fail-fast iterators for DenseMap
Summary:
This patch is an attempt at making `DenseMapIterator`s "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host `DenseMap` deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.

Reviewers: dexonsmith, dberlin, ruiu, chandlerc

Reviewed By: chandlerc

Subscribers: yaron.keren, chandlerc, llvm-commits

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

llvm-svn: 231035
2015-03-02 23:29:37 +00:00
Michael Zolotukhin 21abdf983a TLI: Factor out sanitizeFunctionName. NFC.
llvm-svn: 231034
2015-03-02 23:24:40 +00:00
Rui Ueyama dbd7f2740c Make ArchiveLibraryFile::~ArchiveLibraryFile virtual.
"virtual" was present at a wrong place. FileArchive is a subclass of
ArchiveLibraryFile, and a FileArchive can be deleted through a
pointer of ArchiveLibraryFile. We want to make the destructor of the
base class virtual.

llvm-svn: 231033
2015-03-02 23:03:33 +00:00
Kuba Brecka 249a9e3a7f Symbolizer refactoring: Make LibbacktraceSymbolizer adopt the SymbolizerTool interface
Reviewed at http://reviews.llvm.org/D7971

llvm-svn: 231032
2015-03-02 22:56:25 +00:00
Reid Kleckner 1bc469f0fc Remove shell requirement from test/Modules/explicit-build-relpath.cpp
It only relies on 'cd', which the internal shell has now.

llvm-svn: 231031
2015-03-02 22:55:01 +00:00
Reid Kleckner 83fb85c8f0 Revert bad change from r231029
llvm-svn: 231030
2015-03-02 22:50:09 +00:00
Reid Kleckner acbd23adf1 Remove shell requirements from tests that use 'cd'
Modules and Tooling tests in particular tend to want to change the cwd,
so we were missing test coverage in this area on Windows. It should now
be easier to write such portable tests.

llvm-svn: 231029
2015-03-02 22:42:58 +00:00