Commit Graph

211124 Commits

Author SHA1 Message Date
Enrico Granata 7eed48779d On second thought, amend the previous patch to pass itself the ValueObject& for the static value instead of just its type
llvm-svn: 248316
2015-09-22 19:58:02 +00:00
Enrico Granata c74275bc4a Move the logic to post-process dynamic types for ValueObject purposes from the ValueObjects to the LanguageRuntime plugins
This is meant to cover cases such as the obvious

Base *base = new Derived();

where GetDynamicTypeAndAddress(base) would return the type "Derived", not "Derived *"

llvm-svn: 248315
2015-09-22 19:45:52 +00:00
Ismail Pazarbasi d60db64e7d Analyzer: Teach analyzer how to handle TypeTraitExpr
Summary:
`TypeTraitExpr`s are not supported by the ExprEngine today. Analyzer
creates a sink, and aborts the block. Therefore, certain bugs that
involve type traits intrinsics cannot be detected (see PR24710).

This patch creates boolean `SVal`s for `TypeTraitExpr`s, which are
evaluated by the compiler.

Test within the patch is a summary of PR24710.

Reviewers: zaks.anna, dcoughlin, krememek

Subscribers: cfe-commits

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

llvm-svn: 248314
2015-09-22 19:33:15 +00:00
Dimitry Andric 66aa3a7f9e Add placeholder __libcpp_relaxed_store() for when atomic builtins are not available.
Summary:
In rL241532, atomic_support.h was added, which provides handling of
atomic operations for libc++.  When atomic builtins are not available,
it emits a warning about being unsupported, but it still provides a
number of stubs for the required functions.

However, it misses a stub for `__libcpp_relaxed_store()`.  Add it, by
using the same implementation as for `__libcpp_atomic_store()`.

(Note that I encountered this on arm-freebsd, which still defaults to
armv4, and does not have the runtime libcalls to support atomic
builtins.  For now, I have simply disabled using them.)

Reviewers: mclow.lists, EricWF

Subscribers: theraven, cfe-commits, jroelofs, majnemer, aemerson

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

llvm-svn: 248313
2015-09-22 18:55:37 +00:00
Adrian Prantl 4e6b3b2580 dsymutil: Make -oso-prepend-path available to DwarfLinker.
NFC

llvm-svn: 248312
2015-09-22 18:51:01 +00:00
Adrian Prantl fdd9a8275b dsymutil: Make resolveDIEReference and getUnitForOffset static functions.
NFC.

llvm-svn: 248311
2015-09-22 18:50:58 +00:00
Adrian Prantl c3021ee239 dsymutil: Make DwarfLinker::reportWarning() public. (NFC)
llvm-svn: 248310
2015-09-22 18:50:51 +00:00
Eric Fiselier 56465abe13 Remove possible trailing padding from aligned_storage. Patch from Yiran Wang
llvm-svn: 248309
2015-09-22 18:37:03 +00:00
Rafael Espindola 01205f79a4 Start adding target abstractions.
This is just enough to get PLT working on 32 bit x86.

The idea behind using a virtual interface is that it should be easy to
convert any of the functions to template parameters if any turns out to be
performance critical.

llvm-svn: 248308
2015-09-22 18:19:46 +00:00
Marshall Clow e8fe34d4d1 The test I cnecked in to check the fix for PR#24890 failed (as expected) w/o the fix, but for the wrong reason. Now it fails for the right reason.
llvm-svn: 248307
2015-09-22 18:09:13 +00:00
Todd Fiala da817b6186 Test runner process group isolation take 2.
This one does not create a session, but just creates a
new process group in the same session.

llvm-svn: 248306
2015-09-22 18:05:11 +00:00
Marshall Clow 835e77e29e Check in the test for PR#24890 that I forgot in previous commit
llvm-svn: 248305
2015-09-22 17:57:41 +00:00
Marshall Clow 0510a5adc8 Change pair::swap(pair&) to call ADL swap instead of iter_swap; this fixes an obscure bug having to do with overloaded operator&. Fixes PR#24890
llvm-svn: 248304
2015-09-22 17:50:11 +00:00
Rafael Espindola 50534c2b6f Fix the creation of Elf_Rel sections.
We were always incrementing the output buffer pointer by sizeof(Elf_Rela).

llvm-svn: 248303
2015-09-22 17:49:38 +00:00
Davide Italiano 77011ba16a Remove macho-dump. Its functionality is now covered by llvm-readobj.
Approved by: Rafael Espindola, Eric Christopher, Jim Grosbach, 
             Alex Rosenberg

llvm-svn: 248302
2015-09-22 17:46:10 +00:00
Chaoren Lin 307d3ae4b4 Update TestChangeProcessGroup to remove obsolete workaround.
Expression evaluation in syscalls should work now.

Reviewers: labath

Subscribers: lldb-commits

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

llvm-svn: 248301
2015-09-22 17:37:34 +00:00
Davide Italiano 25423d42bd [MachO] Use llvm-readobj in lieu of macho-dump.
The latter will be removed from the tree anytime soon.

llvm-svn: 248300
2015-09-22 17:31:01 +00:00
Artem Belevich b5bc923af4 [CUDA] Allow parsing of host and device code simultaneously.
* adds -aux-triple option to specify target triple
 * propagates aux target info to AST context and Preprocessor
 * pulls in target specific preprocessor macros.
 * pulls in target-specific builtins from aux target.
 * sets appropriate host or device attribute on builtins.

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

llvm-svn: 248299
2015-09-22 17:23:22 +00:00
Artem Belevich ccf0d699f0 Augmented CudaHostAction to carry device-side triple.
Differential Revision: http://reviews.llvm.org/D12893

llvm-svn: 248298
2015-09-22 17:23:13 +00:00
Artem Belevich 2325675143 [CUDA] Fixes minor cuda-related issues in the driver
* Only the last of the --cuda-host-only/--cuda-device-only options has effect.
* CudaHostAction always wraps host-side compilation now.
* Fixed printing of empty action lists.

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

llvm-svn: 248297
2015-09-22 17:23:09 +00:00
Artem Belevich 9674a64cd9 [CUDA] Add appropriate host/device attribute to builtins.
The changes are part of attribute-based CUDA function overloading (D12453)
and as such are only enabled when it's in effect (-fcuda-target-overloads).

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

llvm-svn: 248296
2015-09-22 17:23:05 +00:00
Artem Belevich 94a55e8169 [CUDA] Allow function overloads in CUDA based on host/device attributes.
The patch makes it possible to parse CUDA files that contain host/device
functions with identical signatures, but different attributes without
having to physically split source into host-only and device-only parts.

This change is needed in order to parse CUDA header files that have
a lot of name clashes with standard include files.

Gory details are in design doc here: https://goo.gl/EXnymm
Feel free to leave comments there or in this review thread.

This feature is controlled with CC1 option -fcuda-target-overloads
and is disabled by default.

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

llvm-svn: 248295
2015-09-22 17:22:59 +00:00
Ahmed Bougacha 81616a72ea [ARM] Emit clrex in the expanded cmpxchg fail block.
ARM counterpart to r248291:

In the comparison failure block of a cmpxchg expansion, the initial
ldrex/ldxr will not be followed by a matching strex/stxr.
On ARM/AArch64, this unnecessarily ties up the execution monitor,
which might have a negative performance impact on some uarchs.

Instead, release the monitor in the failure block.
The clrex instruction was designed for this: use it.

Also see ARMARM v8-A B2.10.2:
"Exclusive access instructions and Shareable memory locations".

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

llvm-svn: 248294
2015-09-22 17:22:58 +00:00
Artem Belevich c3fa25def7 [CUDA] Add implicit __attribute__((used)) to all __global__ functions.
This makes sure that we emit kernels that were instantiated from the
host code and which would never be explicitly referenced by anything
else on device side.

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

llvm-svn: 248293
2015-09-22 17:22:51 +00:00
Argyrios Kyrtzidis 64f67be319 [tooling] Provide the compile commands of the JSON database in the order that they were provided in the JSON file.
This is useful for debugging of issues and reduction of test cases.
For example, an issue may show up due to the order that some commands were processed.
It is convenient to be able to remove commands from the file and still preserve the order
that they are returned, instead of getting a completely different order when removing a few commands.

llvm-svn: 248292
2015-09-22 17:22:33 +00:00
Ahmed Bougacha 07a844d758 [AArch64] Emit clrex in the expanded cmpxchg fail block.
In the comparison failure block of a cmpxchg expansion, the initial
ldrex/ldxr will not be followed by a matching strex/stxr.
On ARM/AArch64, this unnecessarily ties up the execution monitor,
which might have a negative performance impact on some uarchs.

Instead, release the monitor in the failure block.
The clrex instruction was designed for this: use it.

Also see ARMARM v8-A B2.10.2:
"Exclusive access instructions and Shareable memory locations".

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

llvm-svn: 248291
2015-09-22 17:21:44 +00:00
Greg Clayton d13c4fb7f2 Allow TAB key to switch first responder when tests are running or completed.
Typing the shortcut key ('.' for 'pass', 'e' for 'error', etc) will toggle the visibility of the test in the Results window.

llvm-svn: 248290
2015-09-22 17:18:15 +00:00
Rafael Espindola 454ca1c245 Use a signed value for Delta.
This fixes got.s on 32 bit windows.

Patch by Igor Kudrin!

llvm-svn: 248289
2015-09-22 17:08:25 +00:00
Bruce Mitchener 23a3b0e8a4 Rename clang_type_t to opaque_compiler_type_t.
Summary:
This is no longer related to Clang and is just an opaque pointer
to data for a compiler type.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 248288
2015-09-22 17:04:24 +00:00
Rafael Espindola 503fe9408d Expose ELFFileBase::getEMachine. NFC.
I will use it in a followup patch.

llvm-svn: 248287
2015-09-22 16:53:55 +00:00
Bruce Mitchener 126b8b111a Remove IRToDWARF.h
Summary:
The corresponding .cpp file was removed in September of 2011 in
r139772.

Reviewers: spyffe, clayborg

Subscribers: lldb-commits

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

llvm-svn: 248286
2015-09-22 16:30:26 +00:00
Greg Clayton 825ab5878a Add missing file that contains the curses test suite code. To run with curses you now execute:
% ./dotest.py --results-formatter=curses_results.Curses --results-file=/dev/stdout

llvm-svn: 248285
2015-09-22 16:29:15 +00:00
Todd Fiala f42df67cad Roll back r248282.
I'm seeing timed out tests not properly timing out on the Linux
build bot after this change.  Not sure if it is related but
seems suspect.

llvm-svn: 248284
2015-09-22 16:03:43 +00:00
Adrian Prantl 6ec471251a Fix a typo.
llvm-svn: 248283
2015-09-22 15:31:14 +00:00
Todd Fiala 1bf2bb713b test runner: Unix systems now put inferior dotest in its own process group.
This increases isolation as it relates to signal handling between parent and
children.

llvm-svn: 248282
2015-09-22 15:21:50 +00:00
Tamas Berghammer 3f934e4b13 Fix register names in EmulateInstructionMIPS.cpp
llvm-svn: 248281
2015-09-22 15:04:39 +00:00
Vasileios Kalintiris 747372b91a Do not use pthread_setname_np() if we don't have GLIBC or Android.
Summary:
pthread_setname_np() is a nonstandard GNU extension and isn't available
in every C library. Check before it's usage that GLIBC is available or
that we are targeting Android.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 248280
2015-09-22 14:52:31 +00:00
Benjamin Kramer 766f9c308f Remove unused diagnostic. NFC.
llvm-svn: 248279
2015-09-22 14:34:59 +00:00
Benjamin Kramer 3c96f0a54e Make helper function static. NFC.
llvm-svn: 248278
2015-09-22 14:34:57 +00:00
Sagar Thakur af368f6e88 [MIPS32] Emulate MSA instructions for MIPS32
This patch adds MSA branch instruction emulation for MIPS32.

Reviewers: tberghammer, jaydeep
Subscribers: mohit.bhakkad, bhushan, nitesh.jain
Differential: http://reviews.llvm.org/D12898
llvm-svn: 248277
2015-09-22 13:57:11 +00:00
Daniel Sanders 63f2826361 [mips] Added support for using the command line options -Wa,-msoft-float and -Wa,-mhard-float.
Patch by Scott Egerton.

Reviewers: vkalintiris, dsanders

Subscribers: cfe-commits

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

llvm-svn: 248276
2015-09-22 13:52:32 +00:00
Rafael Espindola a794fd44a1 Add support for R_386_PC32.
llvm-svn: 248275
2015-09-22 13:47:45 +00:00
Ewan Crawford d10ca9deee RenderScript lookup bug fix
After the std::move operation the unique pointer is null. 
So this statement always returns a null pointer. 

Also remove unnecessary call to Module::ParseAllDebugSymbols(), 
which spews errors due to how it incorrectly tries to parse DWARF DIE types.

llvm-svn: 248274
2015-09-22 13:36:35 +00:00
Daniel Sanders 86cce70010 [mips][sched] Split IIBranch into specific instruction classes.
Summary:
Almost no functional change since the InstrItinData's have been duplicated.
The one functional change is to remove IIBranch from the MSA branches. The
classes will be assigned to the MSA instructions as part of implementing
the P5600 scheduler.

II_IndirectBranchPseudo and II_ReturnPseudo can probably be removed. I've
preserved the itinerary information for the corresponding pseudo
instructions to avoid making a functional change to these pseudos in
this patch.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

llvm-svn: 248273
2015-09-22 13:36:28 +00:00
Rafael Espindola 21585757e6 Handle implicit addends in Elf_Rel.
llvm-svn: 248272
2015-09-22 13:35:00 +00:00
Ed Maste 80973130ef Remove expectedFailureFreeBSD from passing tests
These two tests are skipped on Linux with a comment that the behaviour
is as expected, but they are consistently passing on FreeBSD now.

llvm.org/pr15989

llvm-svn: 248271
2015-09-22 13:31:16 +00:00
Rafael Espindola ec50eebefd Remove unnecessary parenthesis.
llvm-svn: 248270
2015-09-22 13:30:26 +00:00
Ed Maste 6724f3ba7c Remove expectedFailureFreeBSD from passing test
HelloWorldTestCase::test_with_dwarf_and_process_launch_api passes
consistently for me and for John Wolfe.

llvm.org/pr21620

llvm-svn: 248269
2015-09-22 13:27:26 +00:00
Vasileios Kalintiris 187855b870 Remove unused header <execinfo.h>.
llvm-svn: 248268
2015-09-22 12:43:23 +00:00
Daniel Sanders 1af1d275bc [mips][sched] Temporarily rename IIAlu to IIM16Alu. NFC.
Summary:
The only instructions left in IIAlu are MIPS16 specific. We're not
implementing a MIPS16 scheduler at this time so rename the class to make it
obvious that they are MIPS16 instructions.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

llvm-svn: 248267
2015-09-22 12:36:28 +00:00