Commit Graph

192940 Commits

Author SHA1 Message Date
Andrew Kaylor 78b53dbcc1 Adding support for llvm.eh.begincatch and llvm.eh.endcatch intrinsics and beginning the documentation of native Windows exception handling.
Differential Revision: http://reviews.llvm.org/D7398

llvm-svn: 228733
2015-02-10 19:52:43 +00:00
Alexey Samsonov 1923595b4f [UBSan] Reduce the number of getCallerLocation() calls.
getCallerLocation() is expensive as it issues a call to symbolizer.
(In fact, this function has a memory leak at the moment, but this
will be fixed in the nearest future). We should only call it if
we're actually going to print an error report, in particular,
once for every reported source location.

__ubsan_handle_type_mismatch: call getCallerLocation() only if
provided source location is invalid, and only if the report is not
deduplicated.

__ubsan_handle_float_cast_overflow: call getSourceLocation with
correct CallerPC (the one in user code, not in UBSan handler). Source
location for this check is not currently emitted by frontend.

llvm-svn: 228732
2015-02-10 19:50:20 +00:00
Tim Northover 43c0d2db50 DeadArgElim: arguments affect all returned sub-values by default.
Unless we meet an insertvalue on a path from some value to a return, that value
will be live if *any* of the return's components are live, so all of those
components must be added to the MaybeLiveUses.

Previously we were deleting arguments if sub-value 0 turned out to be dead.

llvm-svn: 228731
2015-02-10 19:49:18 +00:00
Andrey Churbanov 851563f9c3 OpenMP 4.0 standard function omp_is_initial_device() implemented.
llvm-svn: 228730
2015-02-10 19:47:09 +00:00
Greg Clayton a03b9389ca Don't crash when evaluating a DWARF expression has a DW_OP_bra with nothing on the value stack.
<rdar://problem/18919125>

llvm-svn: 228729
2015-02-10 19:43:15 +00:00
Bill Schmidt 67f36bd0d8 Fix up r228725, missed change in PPCSubtarget definition
llvm-svn: 228728
2015-02-10 19:31:55 +00:00
Andrey Churbanov c5bccf94eb Added comment on format of local labels in asm code
llvm-svn: 228727
2015-02-10 19:31:17 +00:00
Duncan P. N. Exon Smith 4ee4a98eaa IR: Add MDNode::replaceWithPermanent()
Add new API for converting temporaries that may self-reference.
Self-referencing nodes are not allowed to be uniqued, so sending them
into `replaceWithUniqued()` is dangerous (and this commit adds
assertions that prevent it).

`replaceWithPermanent()` has similar semantics to `get()` followed by
calls to `replaceOperandWith()`.  In particular, if there's a
self-reference, it returns a distinct node; otherwise, it returns a
uniqued one.  Like `replaceWithUniqued()` and `replaceWithDistinct()`
(well, it calls out to them) it mutates the temporary node in place if
possible, only calling `replaceAllUsesWith()` on a uniquing collision.

llvm-svn: 228726
2015-02-10 19:13:46 +00:00
Bill Schmidt 82f1c775a0 [PowerPC] Fix reverted patch r227976 to avoid register assignment issues
See full discussion in http://reviews.llvm.org/D7491.

We now hide the add-immediate and call instructions together in a
separate pseudo-op, which is tagged to define GPR3 and clobber the
call-killed registers.  The PPCTLSDynamicCall pass prior to RA now
expands this op into the two separate addi and call ops, with explicit
definitions of GPR3 on both instructions, and explicit clobbers on the
call instruction.  The pass is now marked as requiring and preserving
the LiveIntervals and SlotIndexes analyses, and fixes these up after
the replacement sequences are introduced.

Self-hosting has been verified on LE P8 and BE P7 with various
optimization levels, etc.  It has also been verified with the
--no-tls-optimize flag workaround removed.

llvm-svn: 228725
2015-02-10 19:09:05 +00:00
David Majnemer a7d908eb2b X86: Emit Win64 SaveXMM opcodes at the right offset in the right order
Walk the instructions marked FrameSetup and consider any stores of XMM
registers to the stack as needing a SaveXMM opcode.

This fixes PR22521.

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

llvm-svn: 228724
2015-02-10 19:01:47 +00:00
Rui Ueyama 4c30cb3d2f Use override rather than virtual.
llvm-svn: 228723
2015-02-10 18:59:37 +00:00
Rui Ueyama 375c5e2353 GNU: Use StringRef::empty instead of a boolean flag.
This local variable name did not follow the style guide,
and it is not actually needed.

llvm-svn: 228722
2015-02-10 18:55:39 +00:00
Andrey Churbanov 054c50bf4f Added CFI directives to asm code in order to have correct backtraces in gdb.
llvm-svn: 228721
2015-02-10 18:51:52 +00:00
Dan Albert 86cc60eeea Make ABI header not found a warning, not an error.
Since we've added a new header to libc++abi (__cxxabi_config.h), we
now have a case where we might not always find all the ABI headers:
building libc++ against the system's libc++abi on Darwin.

Since this isn't actually a fatal error, degrade it to a warning.

llvm-svn: 228720
2015-02-10 18:46:57 +00:00
Hal Finkel 57c6ac5e41 [PowerPC] Support the (old) cntlz instruction alias
Some old assembly code uses the cntlz alias for cntlzw, binutils supports this,
and we should too. Fixes PR22519.

llvm-svn: 228719
2015-02-10 18:45:02 +00:00
Andrey Churbanov 6d224dbda7 The usage of tt_state flag is replaced by an array of two task_team pointers.
llvm-svn: 228718
2015-02-10 18:37:43 +00:00
Rui Ueyama d003ab3207 Driver: use hasArg instead of getLastArg if return value is not used.
llvm-svn: 228717
2015-02-10 18:34:46 +00:00
Chaoren Lin c30c49c420 Failsafe directory for shared objects and support executables.
llvm-svn: 228716
2015-02-10 18:30:34 +00:00
Chaoren Lin 03d30fc7bc Adding x86 to supported architectures on x86_64.
llvm-svn: 228715
2015-02-10 18:30:31 +00:00
Hafiz Abid Qadeer df70d8460e Fix build on Windows which was broken by a recent commit.
This file MICmnStreamStdinLinux.cpp is wrongly added in the windows build.
It has no use there. CMakeList.txt for lldb-mi needs to be re-factored to
include the right file for each build. This is quick fix to un-break the build.

llvm-svn: 228714
2015-02-10 18:12:44 +00:00
Michael Zolotukhin 03e3518c91 Add a test case for new unrolling heuristics.
THe heuristics were added in r228265 and r228434.

llvm-svn: 228713
2015-02-10 17:54:54 +00:00
Eric Fiselier cc2e1ab69c Add pragma system header to some experimental headers and add newlines to files.
llvm-svn: 228712
2015-02-10 17:32:49 +00:00
Eric Fiselier 861d0ea2aa Fix more issues exposed by -pedantic-errors in c++03 mode
llvm-svn: 228711
2015-02-10 17:20:18 +00:00
Sylvestre Ledru 57958b5d35 Fix the LLDB build under Debian Kfreebsd
Summary:
I don't know if there is a better way for the change in source/Host/freebsd/ThisThread.cpp


Reviewers: emaste

Subscribers: hansw, emaste, lldb-commits

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

llvm-svn: 228710
2015-02-10 17:16:13 +00:00
Hafiz Abid Qadeer e73e82f2be Fix multiple problems of lldb-mi blocking on input monitoring and needing a return.
Summary:
One of the problem is reported here.
http://llvm.org/bugs/show_bug.cgi?id=22411

A fix was committed for this problem that works only for OSX. This revision
extends that fix to other system. The select system call has some limitation with
multi-threaded application which have been addresses here.

LLDB-mi exits if quit command is given but needs an extra retur if -gdb-exit is
given. That issue has also been addressed.

Reviewers: ki.stfu, emaste

Reviewed By: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 228709
2015-02-10 17:10:39 +00:00
Colin LeMahieu 404d5b242d [Hexagon] Adding vector load with post-increment instructions. Adding decoder function for 64bit control register class.
llvm-svn: 228708
2015-02-10 16:59:36 +00:00
Greg Clayton cc8913cc6b Fixed a problem where we might omit some breakpoints when using DWARF in .o files.
The problem occurred when we had incorrect address ranges in the debug map that included the padding between functions causing the end address of a line table entry to fall into an inlinked (next function) address range.

<rdar://problem/19721144>

llvm-svn: 228707
2015-02-10 16:53:40 +00:00
Eric Fiselier 8f55e62990 Remove use of zero length arrays in tests. Get tests passing with -pedantic-errors
llvm-svn: 228706
2015-02-10 16:51:29 +00:00
Eric Fiselier 54519a6be9 [libcxx] Fix PR 22468 - std::function<void()> does not accept non-void-returning functions
Summary:
The bug can be found here: http://llvm.org/bugs/show_bug.cgi?id=22468

`__invoke_void_return_wrapper` is needed to properly handle calling a function that returns a value but where the std::function return type is void. Without this '-Wsystem-headers' will cause `function::operator()(...)` to not compile. 

Reviewers: eugenis, K-ballo, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 228705
2015-02-10 16:48:45 +00:00
Eric Fiselier 51544023a9 [libcxx] Properly convert the count arguments to the *_n algorithms before use.
Summary:
The requirement on the `Size` type passed to *_n algorithms is that it is convertible to an integral type. This means we can't use a variable of type `Size` directly. Instead we need to convert it to an integral type first.  The problem is finding out what integral type to convert it to.  `__convert_to_integral` figures out what integral type to convert it to and performs the conversion, It also promotes the resulting integral type so that it is at least as big as an integer. `__convert_to_integral` also has a special case for converting enums. This should only work on non-scoped enumerations because it does not apply an explicit conversion from the enum to its underlying type.



Reviewers: chandlerc, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 228704
2015-02-10 16:46:42 +00:00
Zoran Jovanovic 416886793f [mips][microMIPS] Implement movep instruction
Differential Revision: http://reviews.llvm.org/D7465

llvm-svn: 228703
2015-02-10 16:36:20 +00:00
Timur Iskhodzhanov 8ce4a069e4 [ASan/Win] NFC, just minor simplification of the code
llvm-svn: 228702
2015-02-10 16:29:05 +00:00
Timur Iskhodzhanov 54cc5b6fc8 [ASan/Win] Add the executable's directory to the symbol search path
This should fix symbolization in those cases when the .exe file is moved together with the .pdb

llvm-svn: 228701
2015-02-10 16:17:01 +00:00
Jonas Paulsson a25a3f4fea Two comment typo fixes in lib/CodeGen/SelectionDAG/DAGCombiner.cpp.
llvm-svn: 228700
2015-02-10 15:34:29 +00:00
Paul Robinson 848cf6aa3a Explicitly initialize a flag in a default constructor.
Works around a Visual C++ issue.

Patch by Douglas Yung!

llvm-svn: 228699
2015-02-10 15:30:02 +00:00
Eric Fiselier 85b788c9c2 Fix use of C++11 extensions in C++03 code.
llvm-svn: 228698
2015-02-10 15:17:46 +00:00
Bradley Smith 1a178c5663 [ARM] Add tests for armv6s[-]m being an alias to armv6[-]m
llvm-svn: 228697
2015-02-10 15:16:49 +00:00
Bradley Smith e997b45076 [ARM] Add armv6s[-]m as an alias to armv6[-]m
llvm-svn: 228696
2015-02-10 15:15:08 +00:00
John Thompson 655387887d Fixed module-map-checker to recurse umbrella dirs when collecting headers.
llvm-svn: 228695
2015-02-10 14:58:07 +00:00
Samuel Benzaquen ef621f43ff Add translationUnitDecl matcher.
Summary: Add translationUnitDecl matcher.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 228694
2015-02-10 14:46:45 +00:00
John Thompson 5d9862f071 Renamed module.map to module.modulemap (modularize).
llvm-svn: 228693
2015-02-10 14:45:30 +00:00
John Thompson e0aa5fea15 Renamed module.map to module.modulemap.
llvm-svn: 228692
2015-02-10 14:29:16 +00:00
Aaron Ballman 45ef715768 Re-committing r228628 with a fix for 64-bit builds.
On Windows, we now use RaiseException to generate the kind of trap we require (one which calls our vectored exception handler), and fall back to using a volatile write to simulate a trap elsewhere.

llvm-svn: 228691
2015-02-10 14:28:11 +00:00
Renato Golin 1703a68283 Fix typo in cmake example docs
Patch by Vinicius Tinti.

llvm-svn: 228690
2015-02-10 14:15:58 +00:00
John Thompson ae7f5518c3 The -I option needs a space, apparently, from the actual implementation.
llvm-svn: 228689
2015-02-10 13:51:17 +00:00
Simon Pilgrim d142ab7d08 [X86][AVX2] Missing AVX2 memory folding instructions
Added most of the missing vector folding patterns for AVX2 (as well as fixing the vpermpd and verpmq patterns)

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

llvm-svn: 228688
2015-02-10 13:22:57 +00:00
Jozef Kolek e76eb41c21 [mips][microMIPS] Add disassembler tests for 16-bit instructions BREAK16 and SDBBP16
Differential Revision: http://reviews.llvm.org/D7443

llvm-svn: 228687
2015-02-10 13:20:51 +00:00
Jonas Paulsson afa6813816 Bugfix for missed dependency from store to load in buildSchedGraph().
Background: When handling underlying objects for a store, the vector
of previous mem uses, mapped to the same Value, is afterwards cleared
(regardless of ThisMayAlias). This means that during handling of the
next store using the same Value, adjustChainDeps() must be called,
otherwise a dependency might be missed.

For example, three spill/reload (NonAliasing) memory accesses using
the same Value 'a', with different offsets:

    SU(2): store  @a
    SU(1): store  @a, Offset:1
    SU(0): load   @a

In this case we have:

* SU(1) does not need a dep against SU(0). Therefore,SU(0) ends up in
  RejectMemNodes and is removed from the mem-uses list (AliasMemUses
  or NonAliasMemUses), as this list is cleared.

* SU(2) needs a dep against SU(0). Therefore, SU(2) must check
  RejectMemNodes by calling adjustChainDeps().

Previously, for store SUs, adjustChainDeps() was only called if
MayAlias was true, missing the S(2) to S(0) dependency in the case
above. The fix is to always call adjustChainDeps(), regardless of
MayAlias, since this applies both for AliasMemUses and
NonAliasMemUses.

No testcase found for any in-tree target.

llvm-svn: 228686
2015-02-10 13:03:32 +00:00
Simon Pilgrim cd32254a35 [X86][XOP] Added XOP memory folding patterns + tests
This patch adds the complete AMD Bulldozer XOP instruction set to the memory folding pattern tables for stack folding, etc.

Note: Many of the XOP instructions have multiple table entries as it can fold loads from different sources.

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

llvm-svn: 228685
2015-02-10 12:57:17 +00:00
Jozef Kolek d68d424abf [mips][microMIPS] Fix disassembling of 16-bit microMIPS instructions LWM16 and SWM16
Differential Revision: http://reviews.llvm.org/D7436

llvm-svn: 228683
2015-02-10 12:41:13 +00:00