Commit Graph

191307 Commits

Author SHA1 Message Date
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
Evgeniy Stepanov 0729053dac [sanitizer] Move sched_getparam test under Linux/.
llvm-svn: 226832
2015-01-22 15:34:50 +00:00
Timur Iskhodzhanov 23cfd6ecff [ASan/Win] Fix PR20944 -- run ASan gtests as part of check-asan on Windows
llvm-svn: 226831
2015-01-22 14:54:22 +00:00
Rafael Espindola 5a67ed1038 [pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.
The ELF format is used on Windows by the MCJIT engine. Thus, on Windows, the
ELFObjectWriter can encounter symbols mangled using the MS Visual Studio C++
name mangling. Symbols mangled using the MSVC C++ name mangling can legally
have "@@@" as a substring. The EFLObjectWriter should not interpret the "@@@"
substring as specifying GNU-style symbol versioning. The ELFObjectWriter
therefore check for the MSVC C++ name mangling prefix which is either "?", "@?",
"imp_?" or "imp_?@".

llvm-svn: 226830
2015-01-22 14:20:45 +00:00
Dmitry Vyukov 48846ba570 tsan: use hacky call only on x86_64
required for mips64 and aarch64 ports

llvm-svn: 226829
2015-01-22 14:13:56 +00:00
Rafael Espindola bb5d09f0e3 Pass -Wl,-z,defs when building shared libraries, but not with the sanitizers.
llvm-svn: 226828
2015-01-22 14:06:51 +00:00
Evgeniy Stepanov 229984947b [sanitizer] Intercept sched_getparam.
llvm-svn: 226827
2015-01-22 14:03:07 +00:00
Aaron Ballman 9ada6cd0f6 Silencing a -Wsign-compare warning (all uses of this constant are within unsigned expressions anyway); NFC.
llvm-svn: 226826
2015-01-22 13:57:41 +00:00
Evgeniy Stepanov 8eb8204e3f [sanitizer] Fix windows build.
llvm-svn: 226825
2015-01-22 13:47:12 +00:00
Logan Chien 957fd4d1d3 Enable backtrace_test for ARM.
llvm-svn: 226824
2015-01-22 13:40:16 +00:00
Logan Chien dbcd7a35f8 Add -funwind-tables to CMAKE_C_FLAGS.
Without -funwind-tables, the compiler won't generate the unwinding
table for these C functions.  However, the functions in libunwind,
such as `_Unwind_Backtrace()`, WILL unwind stack to get the backtrace.

llvm-svn: 226823
2015-01-22 13:39:08 +00:00
Logan Chien 6b2c971524 Force unwind frame with user-defined personality.
If libcxxabi is compiled as a shared library, and the
executable references the user-defined personality routines
(e.g.  __gxx_personality_v0), then the pointer comparison in
Unwind-EHABI.cpp won't work.  This is due to the fact that
the PREL31 will point to the PLT stubs for the personality
routines (in the executable), while the __gxx_personality_v0
symbol reference is yet another (different) PLT stub (in the
libunwind.)

This will cause _Unwind_Backtrace() stops to unwind the frame
whenever it reaches __gxx_personality_v0().  This CL fix the
problem by calling the user-defined personality routines
with an undocumented API for force unwinding.

llvm-svn: 226822
2015-01-22 13:38:11 +00:00
Evgeniy Stepanov d38af30b74 [msan] Better use-after-free reports.
By attaching an extra integer tag to heap origins, we are able
to distinguish between uninits
 - created by heap allocation,
 - created by heap deallocation (i.e. use-after-free),
 - created by __msan_allocated_memory call,
 - etc.

See https://code.google.com/p/memory-sanitizer/issues/detail?id=35.

llvm-svn: 226821
2015-01-22 13:33:16 +00:00
Logan Chien a713fce539 Fix _Unwind_Backtrace for libc++abi built with libgcc.
Implement an undocumented _US_FORCE_UNWIND flag for force
unwinding.

llvm-svn: 226820
2015-01-22 13:28:39 +00:00
Logan Chien 4947eb6e56 Allow libc++abi to be built without unwinder.
This CL adds a new compilation flags LIBCXXABI_USE_LLVM_UNWINDER
to specify whether the LLVM unwinder is enabled.  Besides, all
unwinder-specific code are guarded with this definition.

Now, libc++abi will be able to use the unwinding routine from libgcc
when LIBCXXABI_USE_LLVM_UNWINDER is disabled.

llvm-svn: 226819
2015-01-22 13:27:36 +00:00
Logan Chien e8a0761737 Remove _Unwind_{Get,Set}{GR,IP} from ARM EHABI build.
This commit partially reverts r219629.

This functions are not a part of ARM EHABI specification, and AFAIK,
the de facto implementation does not export these functions.

Without this change, any programs compiled with this unwind.h
will be incompatible with other implementations due to linkage
error.

llvm-svn: 226818
2015-01-22 13:25:55 +00:00
Alexander Kornienko bf87a8b714 Replace size call with empty call where appripriate in clang/tools/extra
This patch is the result of applying fixes of the ContainerSizeEmpty Clang-Tidy
checker which was committed recently.

http://reviews.llvm.org/D7085

Patch by Gábor Horváth!

llvm-svn: 226817
2015-01-22 13:14:29 +00:00