Commit Graph

191123 Commits

Author SHA1 Message Date
NAKAMURA Takumi 2bbc90cca5 Reformat.
llvm-svn: 226888
2015-01-23 01:02:07 +00:00
NAKAMURA Takumi f6eee4ad67 MipsAsmParser.cpp: Suppress a warning introduced in r226657. [-Wunused-variable]
llvm-svn: 226887
2015-01-23 01:01:52 +00:00
Jim Ingham 0895e3406c Remove the "/" from the end of rpath paths. Having it there causes the
paths we get from dladdr to have "//" in it internally, and while that is
formally correct it is just asking for somebody to misparse it... 

llvm-svn: 226886
2015-01-23 00:39:13 +00:00
Richard Smith d2a7eda2b7 Fix reference to sysroot in this test (broken in r226875).
llvm-svn: 226885
2015-01-23 00:30:44 +00:00
Kuba Brecka 4edeced078 Fix the extra whitespace from r226878.
llvm-svn: 226884
2015-01-23 00:14:22 +00:00
Rui Ueyama 92fb392786 Make access to LinkingContext::getNode safe.
llvm-svn: 226883
2015-01-23 00:09:05 +00:00
Richard Smith ac425e9165 PR22299: Relocate code for handling -fmodule-map-file= so that we don't try to
produce diagnostics with source locations before the diagnostics system is
ready for them.

llvm-svn: 226882
2015-01-23 00:01:13 +00:00
Jan Vesely 5f715d36a7 R600: Try to use lower types for 64bit division if possible
v2: add and enable tests for SI

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 226881
2015-01-22 23:42:43 +00:00
Jan Vesely 6269e3ca2f SelectionDAG: Add KnownBits and SignBits computation for EXTRACT_ELEMENT
v2: use getZExtValue
    add missing break
    codestyle

v3: add few more comments

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 226880
2015-01-22 23:42:41 +00:00
Jan Vesely f7987ca5a7 R600: Simplify LowerUDIVREM
optimizations can handle removing the Hi part operations.
The generated code is identical for R600, ~10% icount reduction for SI

v2: rebase

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 226879
2015-01-22 23:42:39 +00:00
Kuba Brecka 405de4ae10 Fix/workaround for OS X truncated stacktraces taken by external tools
This patch is a proposed solution for https://code.google.com/p/address-sanitizer/issues/detail?id=375:

When the stacktraces are captured and printed by ASan itself, they are fine, but when the program has already printed the report (or is just printing it), capturing a stacktrace via other means is broken. "Other means" include OS X CrashReporter, debuggers or calling backtrace() within the program. For example calling backtrace() from a sanitizer_set_death_callback function prints a very truncated stacktrace.

Reviewed at http://reviews.llvm.org/D7103

llvm-svn: 226878
2015-01-22 23:36:47 +00:00
Simon Atanasyan 495523e4ea [Mips] Fix type of 64-bit integer in case of MIPS N64 ABI
Differential Revision: http://reviews.llvm.org/D7127

llvm-svn: 226877
2015-01-22 23:16:48 +00:00
Duncan P. N. Exon Smith 68ab023ef7 IR: Change GenericDwarfNode::getHeader() to StringRef
Simplify the API to use a `StringRef` directly rather than exposing the
`MDString` bits underneath.

llvm-svn: 226876
2015-01-22 23:10:55 +00:00
Richard Smith 999500a26d Reorganize test/Modules:
* Put all input files under Inputs/, move corresponding tests into test/Modules.
 * Rename a modulemap test file to [...].modulemap, and teach lit that such files are tests.

llvm-svn: 226875
2015-01-22 23:07:47 +00:00
Duncan P. N. Exon Smith e8b5e49ffd IR: DwarfNode => DebugNode, NFC
These things are potentially used for non-DWARF data (see the discussion
in PR22235), so take the `Dwarf` out of the name.  Since the new name
gives fewer clues, update the doxygen to properly describe what they
are.

llvm-svn: 226874
2015-01-22 22:47:44 +00:00
Simon Pilgrim 7e6d573e87 [X86][AVX] Added (V)MOVDDUP / (V)MOVSLDUP / (V)MOVSHDUP memory folding + tests.
Minor tweak now that D7042 is complete, we can enable stack folding for (V)MOVDDUP and do proper testing.

Added missing AVX ymm folding patterns and fixed alignment for AVX VMOVSLDUP / VMOVSHDUP.

llvm-svn: 226873
2015-01-22 22:39:59 +00:00
Simon Pilgrim c976e8eef4 Line endings fixes. NFC.
llvm-svn: 226872
2015-01-22 22:27:37 +00:00
Simon Pilgrim 507b37fcbb [X86][SSE] Simplified PSUBUS tests
Removed loops from PSUBUS tests - ensures folding is tested. Also renamed SSE2 tests SSSE3 to match cpu.

This is a follow up commit agreed in http://reviews.llvm.org/D7094

llvm-svn: 226871
2015-01-22 22:19:58 +00:00
Hans Wennborg b60dfbea0e Make the ?: precedence warning handle pointers to the left of ?
Previously, Clang would fail to warn on:

  int n = x + foo ? 1 : 2;

when foo is a pointer.

llvm-svn: 226870
2015-01-22 22:11:56 +00:00
Lang Hames bd4ccc89e6 [Object] Fix a bug in a condition introduced in r226217 - visibility can't be
both hidden and default.

Bug found by inspection by Rafael Espindola. No test: As discussed in the commit
message for r226217 we don't have a good way to test this yet.

llvm-svn: 226869
2015-01-22 22:04:47 +00:00
Chandler Carruth df8b223dea [PM] Actually add the new pass manager support for the assumption cache.
I had already factored this analysis specifically to enable doing this,
but hadn't actually committed the necessary wiring to get at this from
the new pass manager. This also nicely shows how the separate cache
object can be directly managed by the new pass manager.

This analysis didn't have any direct tests and so I've added a printer
pass and a boring test case. I chose to print the i1 value which is
being assumed rather than the call to llvm.assume as that seems much
more useful for testing... but suggestions on an even better printing
strategy welcome. My main goal was to make sure things actually work. =]

llvm-svn: 226868
2015-01-22 21:53:09 +00:00
Benjamin Kramer cb36becbeb Remove dead leak detector parts that fell out of use in r224703.
llvm-svn: 226867
2015-01-22 21:43:01 +00:00
Duncan P. N. Exon Smith 8d536973a2 IR: Update references to temporaries before deleting
During `MDNode::deleteTemporary()`, call `replaceAllUsesWith(nullptr)`
to update all tracking references to `nullptr`.

This fixes PR22280, where inverted destruction order between tracking
references and the temporaries themselves caused a use-after-free in
`LLParser`.

An alternative fix would be to add an assertion that there are no users,
and continue to fix inverted destruction order in clients (like
`LLParser`), but instead I decided to make getting-teardown-right easy.
(If someone disagrees let me know.)

llvm-svn: 226866
2015-01-22 21:36:45 +00:00
Francisco Lopes da Silva c6ccc4fe91 Sema: code completion for pointer and reference to functions.
llvm-svn: 226865
2015-01-22 21:14:08 +00:00
Chris Bieneman 799ef37d02 Refactoring cl::parser construction and initialization.
Summary:
Some parsers need references back to the option they are members of. This is used for handling the argument string as well as by the various pass name parsers for making pass names into flags.

Making parsers that need to refer back to the option have a reference to the option eliminates some of the members of various parsers, and enables further code cleanup.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

llvm-svn: 226864
2015-01-22 21:01:12 +00:00
Joerg Sonnenberger a43872ccdd When reporting constraints that should be constant, the type doesn't
really help. Improve diagnostics.

llvm-svn: 226863
2015-01-22 21:01:00 +00:00
Rafael Espindola 19b538450c Don't use -z,defs on FreeBSD.
Looks like environ is defined only in the main binary.

llvm-svn: 226862
2015-01-22 20:57:30 +00:00
Ramkumar Ramachandra 312beb174f [emacs] Use c-mode-common-hook, derive from "gnu"
Make it clear that the "llvm.org" style is deriving from "gnu" style,
and use the c-mode-common-hook instead of c-mode-hook and c++-mode-hook.

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

llvm-svn: 226861
2015-01-22 20:56:25 +00:00
Enrico Granata 953a3df779 Replace more runCmd('continue') with process control API.
llvm-svn: 226860
2015-01-22 20:53:04 +00:00
Zachary Turner 3597097671 Change wildcard . to literal . in regex for copying python.
On Windows we copy python27(_d).dll to the bin directory.  We do
this by looking at the PYTHON_LIBRARY specified by the user, which
is something like C:\foo\python27_d.lib, and replacing ".lib" with
".dll".  But ".lib" as a regex will also match "flib", etc.  So
make this a literal . instead of a wildcard .

llvm-svn: 226858
2015-01-22 20:30:29 +00:00
Ramkumar Ramachandra 75a4f35b26 Intrinsics: introduce llvm_any_ty aka ValueType Any
Specifically, gc.result benefits from this greatly. Instead of:

gc.result.int.*
gc.result.float.*
gc.result.ptr.*
...

We now have a gc.result.* that can specialize to literally any type.

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

llvm-svn: 226857
2015-01-22 20:14:38 +00:00
Oleksiy Vyalov 49b71c609c Make OSX test run firewall friendly.
http://reviews.llvm.org/D7115

llvm-svn: 226856
2015-01-22 20:03:21 +00:00
Eric Fiselier 753f7c306b [libcxxabi] Teach CMake better ways to find the libc++ source directory (and misc cleanup).
Summary:
The main section of this patch teaches CMake  a new option `LIBCXXABI_LIBCXX_PATH` that specifies the path to the libcxx source root. This information is passed to lit so that it can better find libc++'s python module. `LIBCXXABI_LIBCXX_PATH` is also used to help find the libc++ headers.

The rest of this patch is misc cleanup, mostly to make pep8 and pylint happy.
I've also copied libc++'s .gitignore into libc++abi.



Reviewers: jroelofs, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 226855
2015-01-22 20:00:06 +00:00
Enrico Granata 7a2421095c Add a benchmark test case that shows how much slower repeat 'continue' commands are than going through the SB API directly
llvm-svn: 226852
2015-01-22 19:33:53 +00:00
Zachary Turner ef489e9751 Error::Clear() should reset the type to invalid instead of generic.
This matches the behavior of the default constructor, so is
technically more correct.

Patch by Chaoren Lin
Differential Revision: http://reviews.llvm.org/D7113

llvm-svn: 226851
2015-01-22 19:30:05 +00:00
Reid Kleckner f12b33454f Revert "Don't remove a landing pad if the invoke requires a table entry."
This reverts commit r176827.

Björn Steinbrink pointed out that this didn't actually fix the bug
(PR15555) it was attempting to fix.

With this reverted, we can now remove landingpad cleanups that
immediately resume unwinding, converting the invoke to a call.

llvm-svn: 226850
2015-01-22 19:29:46 +00:00
Zachary Turner 5e6f45201f Don't stomp the triple when loading a PECOFF target.
When you create a target, it tries to look for the platform's list
of supported architectures for a match.  The match it finds can
contain specific triples, like i386-pc-windows-msvc.  Later, we
overwrite this value with the most generic triple that can apply
to any platform with COFF support, causing some of the fields of
the triple to get overwritten.

This patch changes the behavior to only merge in values from the COFF
triple if the fields of the matching triple were unknown/unspecified
to begin with.

This fixes load address resolution on Windows, since it enables the
DynamicLoaderWindows to be used instead of DynamicLoaderStatic.

Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D7120

llvm-svn: 226849
2015-01-22 18:59:05 +00:00
Kevin Enderby a7bdc7e671 Add the option, -indirect-symbols, used with -macho to print the Mach-O indirect symbol table to llvm-objdump.
llvm-svn: 226848
2015-01-22 18:55:27 +00:00
Marshall Clow f15d7a5882 Fix PR#22284. Add a new overload to deque::insert to handle forward iterators. Update tests to exercise this case.
llvm-svn: 226847
2015-01-22 18:33:29 +00:00
Greg Clayton cd6bbba186 Fix the -*-version-min option to not try and use the current OS version for iOS and the simulator since llvm/clang will assert and kill LLDB.
llvm-svn: 226846
2015-01-22 18:25:49 +00:00
Sanjay Patel 37c41c1d2c merge consecutive stores of extracted vector elements (PR21711)
This is a 2nd try at the same optimization as http://reviews.llvm.org/D6698. 
That patch was checked in at r224611, but reverted at r225031 because it
caused a failure outside of the regression tests.

The cause of the crash was not recognizing consecutive stores that have mixed
source values (loads and vector element extracts), so this patch adds a check
to bail out if any store value is not coming from a vector element extract.

This patch also refactors the shared logic of the constant source and vector
extracted elements source cases into a helper function.

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

llvm-svn: 226845
2015-01-22 18:21:26 +00:00
Eric Fiselier 74e82fa4f3 [libcxx] Allow use of ShTest in libc++ tests along with other changes.
Summary:
This patch allows the use of LIT's ShTest format in the libc++ test suite. ShTests have the suffix '.sh.cpp'. It also introduces a series of other changes. These changes are:

- More functionality including parsing test metadata has been moved into LIT.
- LibcxxTestFormat now supports multi-part suffixes.
- the `CXXCompiler` functionality has been used to shrink the size of LibcxxTestFormat. 
- The recursive loading of the site config has been turned into `libcxx.test.config.loadSiteConfig` so it can be used with libc++abi.
- Temporary files are now created in the build directory of libc++. This follows how it is down in ShTest.
- `not.py` was added as a utility executable that mirrors the functionality of LLVM's `not` executable. 
- The first ShTest test was added under test/libcxx/double_include.sh.cpp


Reviewers: jroelofs, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 226844
2015-01-22 18:05:58 +00:00
Adrian Prantl d4255baede Fix the condition in this assertion, and also make it into an unreachable.
llvm-svn: 226843
2015-01-22 17:52:08 +00:00
David Blaikie e7d473461e Revert "PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site."
The underlying bug has been fixed in r226736 so there's no need to
workaround this anymore.

This reverts commit r220923.

llvm-svn: 226842
2015-01-22 17:49:59 +00:00
Tim Northover 7cd58934a8 AArch64: decode all MRS/MSR forms early to avoid saving FeatureBits.
Currently, we're adding a uint64_t describing the current subtarget so
that matching can check whether the specified register is valid.
However, we want to move to a bitset for those bits (x86 has more than
64 of them).

This can't live in a union so it's probably better to do the checks
early (especially as there are only 3 of them).

llvm-svn: 226841
2015-01-22 17:23:04 +00:00
Adrian Prantl 97bdc75461 Run clang-format on parts of DebugInfo.h
llvm-svn: 226838
2015-01-22 16:55:27 +00:00
Adrian Prantl 054449538b Document DIExpression.
llvm-svn: 226837
2015-01-22 16:55:24 +00:00
Adrian Prantl 0d7d8e4512 Rewrite DIExpression::printInternal() to use the iterator interface.
NFC.

llvm-svn: 226836
2015-01-22 16:55:22 +00:00
Adrian Prantl 2585a98d38 Rename DIExpressionIterator to DIExpression::iterator.
Addresses review feedback from Duncan.

llvm-svn: 226835
2015-01-22 16:55:20 +00:00
Adrian Prantl 438b250d8a Fix a comment.
llvm-svn: 226834
2015-01-22 16:55:16 +00:00