Commit Graph

157680 Commits

Author SHA1 Message Date
Ed Maste 16a4d8c15d test: Add @expectedFailureFreeBSD decorator
llvm.org/pr17213 Expression evaluation fails on FreeBSD in some cases

llvm-svn: 190622
2013-09-12 18:37:42 +00:00
Hans Wennborg e8677ef5ca Move the execution code from Compilation::ExecuteCommand to Command::Execute
I think it makes sense that a Command knows how to execute itself.

There's no functionality change but i rewrote the code to avoid the manual
memory management of Argv.

My motivation for this is that I plan to subclass Command to build fall-back
functionality into clang-cl.

Differential Revision: http://llvm-reviews.chandlerc.com/D1654

llvm-svn: 190621
2013-09-12 18:35:08 +00:00
Hans Wennborg b212b34f19 Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.
This moves the code to Job.cpp, which seems like a more natural fit,
and replaces the "is this a JobList? is this a Command?" logic with
a virtual function call.

It also removes the code duplication between PrintJob and
PrintDiagnosticJob and simplifies the code a little.

There's no functionality change here, except that the Executable is
now always printed within quotes, whereas it would previously not be
quoted in crash reports, which I think was a bug.

Differential Revision: http://llvm-reviews.chandlerc.com/D1653

llvm-svn: 190620
2013-09-12 18:23:34 +00:00
Shankar Easwaran 2206d5ad7d [lld][tests] Fix buildbot failure on darwin
llvm-svn: 190619
2013-09-12 18:10:20 +00:00
Roman Divacky 62cb63543b Implement asm support for a few PowerPC bookIII that are needed for assembling
FreeBSD kernel.

llvm-svn: 190618
2013-09-12 17:50:54 +00:00
Filip Pizlo f2189bf311 This switches CrashRecoveryContext to using ManagedStatic for its global Mutex and
global ThreadLocals, thereby getting rid of the load-time initialization of those 
objects and also getting rid of their destruction unless the LLVM client calls 
llvm_shutdown.

llvm-svn: 190617
2013-09-12 17:46:57 +00:00
Greg Clayton 5764873955 <rdar://problem/14944683>
LLDB now handles explicit alignment for inherited classes.

llvm-svn: 190616
2013-09-12 17:22:32 +00:00
Marshall Clow b387ea89a6 Test for 'bad_array_length'; got left out of initial commit
llvm-svn: 190614
2013-09-12 17:01:38 +00:00
Jordan Rose f31f5f8488 [CMake] Put controversial always-recheck-revision-number behind an option.
CMake does not have the ability to perform actions before calculating
dependencies, so it can't know whether it needs to rebuild clangBasic
to update for a new revision number. CLANG_ALWAYS_CHECK_VC_REV (off by
default) will cause clangBasic to always be dirty by deleting the
generated SVNVersion.inc after use; otherwise, SVNVersion.inc will
always be updated, but only included in the final binary when clangBasic
is rebuilt.

It'd be great to find a better way to do this, but hopefully this is
still an improvement over the complete lack of version information before.

llvm-svn: 190613
2013-09-12 16:17:41 +00:00
Shankar Easwaran d6d1b52937 [lld][LayoutPass] change comments to reflect the sort order
llvm-svn: 190612
2013-09-12 15:59:34 +00:00
Ben Langmuir 1650175de6 Partial support for Intel SHA Extensions (sha1rnds4)
Add basic assembly/disassembly support for the first Intel SHA
instruction 'sha1rnds4'. Also includes feature flag, and test cases.

Support for the remaining instructions will follow in a separate patch.

llvm-svn: 190611
2013-09-12 15:51:31 +00:00
Shankar Easwaran 2734d79d94 [lld][ELF] Fix vaddr of the first section
The first section in the output was not aligned to the alignment of the section.

llvm-svn: 190610
2013-09-12 15:43:17 +00:00
Shankar Easwaran df2dd193ee [lld][ELF] Fix the readonly section order.
This associates rodata and sections which just have the SHF_ALLOC flag
to be set to typeConstant.

llvm-svn: 190609
2013-09-12 15:43:13 +00:00
Shankar Easwaran f1b341c80e [lld][LayoutPass] Order the atoms that are in the same chain
We need to order atoms that exist in the same chain. This is to make sure that
the command line order is preserved when we emit the atoms to the output file.

Credits: BigCheese for finding the bug.

Adds a test which otherwise would fail.

llvm-svn: 190608
2013-09-12 15:43:09 +00:00
Ariel J. Bernal dfa4c7548b Point doxygen link to somthing useful.
llvm-svn: 190607
2013-09-12 15:26:44 +00:00
Kostya Serebryany 7638aa135e [asan] a bit of performance improvement in fake stack, generalized one test, fixed android build of another test
llvm-svn: 190606
2013-09-12 14:41:10 +00:00
Hal Finkel 0096dbd50d Mark PPC MFTB and DST (and friends) as deprecated
Use the new instruction deprecation feature to mark mftb (now replaced with
mfspr) and dst (along with the other Altivec cache control instructions) as
deprecated when targeting cores supporting at least ISA v2.03.

llvm-svn: 190605
2013-09-12 14:40:06 +00:00
Joey Gouly 904d8806ce Somehow this important part of the patch, where I actually check the Mask,
got lost during my iterations of review.

Thanks to Hal for spotting it!

llvm-svn: 190604
2013-09-12 14:23:19 +00:00
Kostya Serebryany 627ea6391e [asan] add a test for use-after-return and exceptions and fix it. Not 100% sure this is a complete fix, will keep looking for harder cases.
llvm-svn: 190603
2013-09-12 13:25:29 +00:00
Joey Gouly db6144e3e3 [LTO] Fix the LTO tool, after my API breakage.
Thanks to Zonr Chang!

llvm-svn: 190602
2013-09-12 12:55:29 +00:00
Joey Gouly 92dfcfa403 Fix the MCTargetAsmParser API change.
llvm-svn: 190601
2013-09-12 10:59:24 +00:00
Elena Demikhovsky c2293fc7f2 LLVM interpreter: added a test for insert- extract- value
llvm-svn: 190600
2013-09-12 10:52:03 +00:00
Elena Demikhovsky 8e97f0164d LLVM Interpreter: implementation of "insertvalue" and "extractvalue";
undef constatnt for structure and test for these functions.

done by Yuri Veselov (mailto:Yuri.Veselov@intel.com)

llvm-svn: 190599
2013-09-12 10:48:23 +00:00
Joey Gouly 0e76fa7df5 Add an instruction deprecation feature to TableGen.
The 'Deprecated' class allows you to specify a SubtargetFeature that the
instruction is deprecated on.

The 'ComplexDeprecationPredicate' class allows you to define a custom
predicate that is called to check for deprecation.
For example:
  ComplexDeprecationPredicate<"MCR">

would mean you would have to define the following function:
  bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
                             std::string &Info)

Which returns 'false' for not deprecated, and 'true' for deprecated
and store the warning message in 'Info'.

The MCTargetAsmParser constructor was chaned to take an extra argument of
the MCInstrInfo class, so out-of-tree targets will need to be changed.

llvm-svn: 190598
2013-09-12 10:28:05 +00:00
Alexander Potapenko 9caa10d0c7 [ASan] Do not build asan_fake_stack_test.cc on OSX until https://code.google.com/p/address-sanitizer/issues/detail?id=222 is fixed.
llvm-svn: 190597
2013-09-12 09:46:56 +00:00
Kostya Serebryany 79d98a851b [asan] limit the size of the fake stack with a reasonable constant. This fixes a failure when the main thread's stack is considered unlimited (very large).
llvm-svn: 190596
2013-09-12 09:08:13 +00:00
Elena Demikhovsky 8952974e29 AVX-512: implemented extractelement with variable index.
Added parsing of mask register and "zeroing" semantic, like {%k1} {z}.

llvm-svn: 190595
2013-09-12 08:55:00 +00:00
Kostya Serebryany 44441cc34b [asan] (part 2) don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)
llvm-svn: 190594
2013-09-12 08:47:00 +00:00
Kostya Serebryany 736bd08e05 [asan] don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)
llvm-svn: 190593
2013-09-12 08:43:44 +00:00
Kostya Serebryany 628cda7367 [asan] hopefully make the FakeStack async-signal safe, enable the related test
llvm-svn: 190592
2013-09-12 08:34:50 +00:00
Alexey Samsonov 9c0748a90c Fixup for r190409: add dep on LZMA only if CMake is cross-compiling
llvm-svn: 190591
2013-09-12 08:26:53 +00:00
Evgeniy Stepanov 58dbe06230 [asan] Fix deadlock in stack unwinder on android/x86.
Fixes PR17116.
Patch by 林作健 (manjian2006 at gmail.com).

llvm-svn: 190590
2013-09-12 08:16:28 +00:00
Kostya Serebryany e8f961e847 [asan] use xchg instead of CAS in FakeStack::Allocate (5% faster for this case)
llvm-svn: 190589
2013-09-12 07:28:42 +00:00
Kostya Serebryany 729c8dc65b [asan] fully re-implement the FakeStack (use-after-return) to make it faster and async-signal-safe. The implementation is not yet complete (see FIXMEs) but the existing tests pass.
llvm-svn: 190588
2013-09-12 07:11:58 +00:00
Hal Finkel 7fe6a5390f PPC: Enable aggressive anti-dependency breaking
Aggressive anti-dependency breaking is enabled by default for all PPC cores.
This provides a general speedup on the P7 and other platforms (among other
factors, the instruction group formation for the non-embedded PPC cores is done
during post-RA scheduling). In order to do this safely, the incompatibility
between uses of the MFOCRF instruction and anti-dependency breaking are
resolved by marking MFOCRF with hasExtraSrcRegAllocReq. As noted in the removed
FIXME, the problem was that MFOCRF's output is sensitive to the identify of the
source register, and always paired with a shift to undo this effect. Because
anti-dependency breaking is unaware of this hidden dependency of the shift
amount on the source register of the MFOCRF instruction, changing that register
must be inhibited.

Two test cases were adjusted: The SjLj test was made more insensitive to
register choices and scheduling; the saveCR test disabled anti-dependency
breaking because part of what it is testing is proper register reuse.

llvm-svn: 190587
2013-09-12 05:24:49 +00:00
Rui Ueyama 81d0d29639 Remove hard-coded leading underscore from entry symbol.
llvm-svn: 190586
2013-09-12 05:09:01 +00:00
Rui Ueyama 1e6af15388 Do not hard code the leading underscore.
Mangling scheme varies on platform, and prepending an underscore is valid only
on 32-bit x86. Added a method to mangle name to PECOFFLinkingContext and use
it to avoid hard coding mangled names.

llvm-svn: 190585
2013-09-12 04:42:31 +00:00
Hal Finkel 6f1ff8e1a8 Fix crash in AggressiveAntiDepBreaker with empty CriticalPathSet
If no register classes are added to CriticalPathRCs, then the CriticalPathSet
bitmask will be empty. In that case, ExcludeRegs must remain NULL or else this
line will cause a segfault:

  } else if ((ExcludeRegs != NULL) && ExcludeRegs->test(AntiDepReg)) {

I have no in-tree test case.

llvm-svn: 190584
2013-09-12 04:22:31 +00:00
Marshall Clow 3cd37e6456 LWG Issue 2210 (Part #6): unordered_map and unordered_multimap
llvm-svn: 190576
2013-09-12 03:00:31 +00:00
Tom Stellard afcf12f33a R600/SI: expose TBUFFER_STORE_FORMAT_* for OpenGL transform feedback
For _XYZ, the type of VDATA is v4i32, because v3i32 doesn't exist.

The ADDR64 bit is not exposed. A simpler intrinsic that doesn't take
a resource descriptor might be nicer.

The maximum number of input SGPRs is bumped to 17.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190575
2013-09-12 02:55:14 +00:00
Tom Stellard 7f6fa4c4c5 R600: Don't use trans slot for instructions that read LDS source registers
This fixes some regressions in the piglit local memory store tests
introduced by recent commits which made the scheduler aware of the trans
slot.

It's not possible to test this using lit, because there is no way to
determine from the assembly dumps whether or not an instruction is in
the trans slot.

Even if this were possible, the test would be highly sensitive to
changes in the scheduler and might generate confusing false negatives.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 190574
2013-09-12 02:55:06 +00:00
Richard Mitton 83f0f88954 Updated CMakeLists to match XCode project
llvm-svn: 190573
2013-09-12 02:20:39 +00:00
Richard Mitton f86248d9ba Added a 'jump' command, similar to GDBs.
This allows the PC to be directly changed to a different line.
It's similar to the example python script in examples/python/jump.py, except implemented as a builtin.

Also this version will track the current function correctly even if the target line resolves to multiple addresses. (e.g. debugging a templated function)

llvm-svn: 190572
2013-09-12 02:20:34 +00:00
Marshall Clow 50c003b577 Implement uses-allocator construction
llvm-svn: 190571
2013-09-12 02:11:16 +00:00
Jason Molenda 475e872489 The output of 'log list' was missing a few of the lldb channels:
communication, connection, host, module, mmap, os.  Add those.  Also
sort the entries so they come in alphabetical order, to make it a
little easier to scan down the list for a specific channel.

llvm-svn: 190570
2013-09-12 01:48:59 +00:00
Rui Ueyama 539b1df7c3 Typo fixes.
llvm-svn: 190569
2013-09-12 01:43:21 +00:00
Argyrios Kyrtzidis 5fcef77b2e [libclang] In clang_getLocation, check that the provided line/column is valid.
rdar://14971432

llvm-svn: 190568
2013-09-12 01:10:36 +00:00
Matt Arsenault bed5bf2e90 Move variable under condition where it is used
llvm-svn: 190567
2013-09-12 01:07:58 +00:00
Matt Arsenault a9e7c7abdc Fix comment to match what the assert actually enforces
llvm-svn: 190566
2013-09-12 01:07:54 +00:00
Matt Arsenault bc08ddba58 Remove pointless assertion after r190376
llvm-svn: 190565
2013-09-12 01:07:49 +00:00