Commit Graph

192876 Commits

Author SHA1 Message Date
Reid Kleckner e7b3f7c70d Emit landing pads for SEH even if nounwind is present
Disabling exceptions applies nounwind to lots of functions. SEH catches
asynch exceptions, so emit the landing pad anyway.

llvm-svn: 228769
2015-02-11 00:00:21 +00:00
Zachary Turner be6d1e49b0 Convert std::make_unique<> to llvm::make_unique<>.
llvm-svn: 228768
2015-02-10 23:46:48 +00:00
Petar Jovanovic 08fc9e9158 [mips] Add __clear_cache() definition for non-Android systems
Make sure clear_cache() builtin has an appropriate definition for Linux.
Call syscall(NR_cacheflush, ...).

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

llvm-svn: 228767
2015-02-10 23:36:19 +00:00
Adrian Prantl eb94727098 Add the missing testcase for r228764.
llvm-svn: 228766
2015-02-10 23:32:56 +00:00
Petar Jovanovic d9f52043b1 Fix makeLibCall argument (signed) in SoftenFloatRes_XINT_TO_FP function
The isSigned argument of makeLibCall function was hard-coded to false
(unsigned). This caused zero extension on MIPS64 soft float.
As the result SingleSource/Benchmarks/Stanford/FloatMM test and
SingleSource/UnitTests/2005-07-17-INT-To-FP test failed. 
The solution was to use the proper argument.

Patch by Strahinja Petrovic.

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

llvm-svn: 228765
2015-02-10 23:30:14 +00:00
Adrian Prantl ca7e470221 Debug Info: Support variables that are described by more than one MMI
table entry. This happens when SROA splits up an alloca and the resulting
allocas cannot be lowered to SSA values because their address is passed
to a function.

Fixes PR22502.

llvm-svn: 228764
2015-02-10 23:18:28 +00:00
Adrian Prantl d49691f779 Fix indentation.
llvm-svn: 228763
2015-02-10 23:18:15 +00:00
Enrico Granata 67391b6904 Fix a couple typos in the previous commit
llvm-svn: 228762
2015-02-10 23:17:07 +00:00
David Majnemer 44a5f22fbc EarlyCSE: Add check lines for test added in r228760
llvm-svn: 228761
2015-02-10 23:11:02 +00:00
David Majnemer 7679300d93 EarlyCSE: It isn't safe to CSE across synchronization boundaries
This fixes PR22514.

llvm-svn: 228760
2015-02-10 23:09:43 +00:00
Enrico Granata bb557065f6 Add an LLDB summary for CMTime. Fixes rdar://15370376
llvm-svn: 228759
2015-02-10 23:02:25 +00:00
Zachary Turner c9c9c3489a Add missing function and header include.
llvm-svn: 228758
2015-02-10 22:56:21 +00:00
Oleksiy Vyalov 37386143b8 Extract attach core logic from SBTarget::Attach* methods into unified SBTarget::AttachToProcess and make it work with platform for remote attach purposes.
http://reviews.llvm.org/D7471

llvm-svn: 228757
2015-02-10 22:49:57 +00:00
Zachary Turner 8d7fa9b37b Oops. Don't call Windows functions on non-windows.
llvm-svn: 228756
2015-02-10 22:47:14 +00:00
Zachary Turner a5549178f1 Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.
This makes llvm-pdbdump available on all platforms, although it
will currently fail to create a dumper if there is no PDB reader
implementation for the current platform.

It implements dumping of compilands and children, which is less
information than was previously available, but it has to be
rewritten from scratch using the new set of interfaces, so the
rest of the functionality will be added back in subsequent commits.

llvm-svn: 228755
2015-02-10 22:43:25 +00:00
David Majnemer ca19485f08 X86: @llvm.frameaddress should defer to SelectionDAG for Win CFI
llvm-svn: 228754
2015-02-10 22:00:34 +00:00
Rui Ueyama 123ad4cde7 GNU: Rename parseZOption because it actually parses only -z max-page-size.
llvm-svn: 228753
2015-02-10 21:40:51 +00:00
Zachary Turner 0ca2bde38e Fix build due to mismatched function signatures.
llvm-svn: 228752
2015-02-10 21:40:29 +00:00
Simon Atanasyan 0ca59894aa [Object] Reformat the code with clang-format
No functional changes.

llvm-svn: 228751
2015-02-10 21:38:25 +00:00
Rui Ueyama ea6c8e9c1f Unittest: Do s/_context/_ctx/g.
llvm-svn: 228750
2015-02-10 21:28:52 +00:00
Rui Ueyama 2050b61451 GNU: Add --no-export-dynamic command line option.
llvm-svn: 228749
2015-02-10 21:27:31 +00:00
David Majnemer 13d0b11d7b X86: Make @llvm.frameaddress work correctly with Windows unwind codes
Simply loading or storing the frame pointer is not sufficient for
Windows targets.  Instead, create a synthetic frame object that we will
lower later.  References to this synthetic object will be replaced with
the correct reference to the frame address.

llvm-svn: 228748
2015-02-10 21:22:05 +00:00
Zachary Turner cffff26b68 Provide DIA implementation of DebugInfoPDB.
This implements DebugInfoPDB when the DIA SDK is present on the system.
Specifically, this means that the following conditions are met:
  1) You are building on Windows.
  2) You are building with MSVC.
  3) Visual Studio did not corrupt the installation of DIA due to a
     known issue with side-by-side installations of VS2012 and VS2013.
If all of these conditions are true, you will be able to pass a value
of PDB_Reader::DIA to PDB::createPdbReader().

There are no tests for this yet, as any test will be in the form of a
lit test which tests the llvm-pdbdump.exe, which still needs to be
rewritten in terms of this library.

llvm-svn: 228747
2015-02-10 21:17:52 +00:00
Eric Christopher f3e79e8714 Reformat (and remove some tabs) to make debugging this code a
little easier to step through.

llvm-svn: 228746
2015-02-10 21:15:06 +00:00
Aaron Ballman 7f53bd5b8d Now use the __debugbreak intrinsic instead of calling RaiseException; it requires no forward declares and still calls VEH.
llvm-svn: 228745
2015-02-10 21:13:04 +00:00
Vince Harron df3f00f30a Fix 'process launch -i' for remote processes
We want to forward stdin when stdio is not disabled and when we're not
redirecting stdin from a file.

renamed m_stdio_disable to m_stdin_forward and inverted value because
that's what we want to remember.

There was previously a bug that if you redirected stdin from a file,
stdout and stderr would also be redirected to /dev/null

Adds support for remote target to TestProcessIO.py

Fixes ProcessIOTestCase.test_stdin_redirection_with_dwarf for remote
Linux targets

llvm-svn: 228744
2015-02-10 21:09:04 +00:00
Rui Ueyama c008539736 Driver: move non-positional parameters out of switch. NFC.
llvm-svn: 228743
2015-02-10 20:57:43 +00:00
Daniel Jasper 1d966eff08 Fix overly prescriptive test that broken on Mac after r228725.
llvm-svn: 228742
2015-02-10 20:49:05 +00:00
Nico Weber 43f1836535 fix docs typo
llvm-svn: 228741
2015-02-10 20:43:54 +00:00
Kuba Brecka 9a18c3016c Fix ASan's Noinst unit tests
We currently skip all "Noinst" unit tests on OS X, which was probably caused when we removed the "allow_reexec" flag. The MaybeReexec function fails to re-execute when the runtime is linked statically, because there is no dylib to use. This patch adds an explicit DisableReexec function that is used from asan_noinst_test.cc and the runtime then doesn't try to re-execute.

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

llvm-svn: 228740
2015-02-10 20:37:57 +00:00
Bill Schmidt 911b7b1de6 [PowerPC] Remove the --no-tls-optimize workaround from the clang driver
llvm-svn: 228739
2015-02-10 20:36:08 +00:00
Aaron Ballman 6ede1e8080 Changing the status code generated by LLVM_BUILTIN_TRAP on Windows to be something categorized as a valid error code. Fixes crashing uses (such as not --crash) with existing sys::Wait behavior.
llvm-svn: 228738
2015-02-10 20:13:52 +00:00
Anton Yartsev b3fa86d6f3 [analyzer] Pass actual state to alloc/dealloc handling functions.
The state obtained from CheckerContext::getState() may be outdated by the time the alloc/dealloc handling function is called (e.g. the state was modified but the transition was not performed). State argument was added to all alloc/dealloc handling functions in order to get the latest state and to allow sequential calls to those functions.

llvm-svn: 228737
2015-02-10 20:13:08 +00:00
Andrey Churbanov b41e62b713 Fixed memory corruption problem.
llvm-svn: 228736
2015-02-10 20:10:21 +00:00
Pete Cooper 7dc8af5306 Check for backtraces in tests which are verifying pretty stack traces from a crashing clang.
PrettyStackTrace now requires the ENABLE_BACKTRACES option.  We need to check for that here or these tests fail llvm-lit.

Reviewed by chandlerc

llvm-svn: 228735
2015-02-10 19:53:38 +00:00
Andrey Churbanov 440af7eccc Updated the kmp_omp_struct_info_t structure used by debuggers.
llvm-svn: 228734
2015-02-10 19:53:13 +00:00
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