Commit Graph

183317 Commits

Author SHA1 Message Date
Daniel Sanders ae275e38a2 [mips] Add CCValAssign::[ASZ]ExtUpper and CCPromoteToUpperBitsInType and handle struct's correctly on big-endian N32/N64 return values.
Summary:
The N32/N64 ABI's require that structs passed in registers are laid out
such that spilling the register with 'sd' places the struct at the lowest
address. For little endian this is trivial but for big-endian it requires
that structs are shifted into the upper bits of the register.

We also require that structs passed in registers have the 'inreg'
attribute for big-endian N32/N64 to work correctly. This is because the
tablegen-erated calling convention implementation only has access to the
lowered form of struct arguments (one or more integers of up to 64-bits
each) and is unable to determine the original type.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

llvm-svn: 218451
2014-09-25 12:15:05 +00:00
Renato Golin f5dd1dacb6 Add aliases for VAND imm to VBIC ~imm
On ARM NEON, VAND with immediate (16/32 bits) is an alias to VBIC ~imm with
the same type size. Adding that logic to the parser, and generating VBIC
instructions from VAND asm files.

This patch also fixes the validation routines for NEON splat immediates which
were wrong.

Fixes PR20702.

llvm-svn: 218450
2014-09-25 11:31:24 +00:00
Chandler Carruth 0a6e961efd [x86] Teach the new vector shuffle lowering to use AVX2 instructions for
v4f64 and v8f32 shuffles when they are lane-crossing. We have fully
general lane-crossing permutation functions in AVX2 that make this easy.

Part of this also changes exactly when and how these vectors are split
up when we don't have AVX2. This isn't always a win but it usually is
a win, so on the balance I think its better. The primary regressions are
all things that just need to be fixed anyways such as modeling when
a blend can be completely accomplished via VINSERTF128, etc.

Also, this highlights one of the few remaining big features: we do
a really poor job of inserting elements into AVX registers efficiently.

This completes almost all of the big tricks I have in mind for AVX2. The
only things left that I plan to add:

1) element insertion smarts
2) palignr and other fairly specialized lowerings when they happen to
   apply

llvm-svn: 218449
2014-09-25 11:03:55 +00:00
Sylvestre Ledru 1623b463ae Update my previous commit to fit 80 cols...
llvm-svn: 218448
2014-09-25 10:58:16 +00:00
Sylvestre Ledru b5984fabbd Details that -debug-only is not available when LLVM is built with --enable-optimized
llvm-svn: 218447
2014-09-25 10:57:00 +00:00
Chandler Carruth e91d68c475 [x86] Teach the new vector shuffle lowering a fancier way to lower
256-bit vectors with lane-crossing.

Rather than immediately decomposing to 128-bit vectors, try flipping the
256-bit vector lanes, shuffling them and blending them together. This
reduces our worst case shuffle by a pretty significant margin across the
board.

llvm-svn: 218446
2014-09-25 10:21:15 +00:00
Oliver Stannard 3256b26ef2 [Thumb2] BXJ should be undefined for v7M, v8A
The Thumb2 BXJ instruction (Branch and Exchange Jazelle) is not
defined for v7M or v8A. It is defined for all other Thumb2-supporting
architectures (v6T2, v7A and v7R).

llvm-svn: 218445
2014-09-25 10:02:05 +00:00
Alexander Potapenko bc4ce3a224 Follow-up for r217523: fix the dependencies for standalone compiler-rt build.
Patch by Kuba Brecka (kuba.brecka@gmail.com)

llvm-svn: 218444
2014-09-25 09:30:05 +00:00
Alexander Kornienko f5a57c9c24 Clang-tidy google-readability-function check: don't warn on gmock
testing::Unused parameters.

Reviewers: bkramer, klimek

Reviewed By: klimek

Subscribers: curdeius, cfe-commits

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

llvm-svn: 218443
2014-09-25 08:16:24 +00:00
Chandler Carruth 02387122e0 [x86] Fix an oversight in the v8i32 path of the new vector shuffle
lowering where it only used the mask of the low 128-bit lane rather than
the entire mask.

This allows the new lowering to correctly match the unpack patterns for
v8i32 vectors.

For reference, the reason that we check for the the entire mask rather
than checking the repeated mask is because the repeated masks don't
abide by all of the invariants of normal masks. As a consequence, it is
safer to use the full mask with functions like the generic equivalence
test.

llvm-svn: 218442
2014-09-25 04:10:27 +00:00
Chandler Carruth 8140158cb5 [x86] Rearrange the code for v16i16 lowering a bit for clarity and to
reduce the amount of checking we do here.

The first realization is that only non-crossing cases between 128-bit
lanes are handled by almost the entire function. It makes more sense to
handle the crossing cases first.

THe second is that until we actually are going to generate fancy shared
lowering strategies that use the repeated semantics of the v8i16
lowering, we should waste time checking for repeated masks. It is
simplest to directly test for the entire unpck masks anyways, so we
gained nothing from this.

This also matches the structure of v32i8 more closely.

No functionality changed here.

llvm-svn: 218441
2014-09-25 04:03:22 +00:00
Chandler Carruth d8f528adb8 [x86] Implement AVX2 support for v32i8 in the new vector shuffle
lowering.

This completes the basic AVX2 feature support, but there are still some
improvements I'd like to do to really get the last mile of performance
here.

llvm-svn: 218440
2014-09-25 02:52:12 +00:00
Chandler Carruth 397d12c4b4 [x86] More tweaks to the v32i8 test cases.
I made a mistake in the previous commit and produced the wrong pattern.
Fix that. Also make one more shuffle pattern byte-based rather than
word-based, and add two more blend patterns.

llvm-svn: 218439
2014-09-25 02:44:39 +00:00
Chandler Carruth a03011ffae [x86] Re-work a bunch of the v32i8 test cases to actually involve byte
shuffles rather than word shuffles.

As you might guess, these were built starting from the word shuffle test
cases and I failed to properly port a bunch of them and left them as
widened word shuffle test cases. We still have a couple of tests that
check our ability to widen shuffles, but now we will test the actual
byte shuffle quite a bit better.

llvm-svn: 218438
2014-09-25 02:20:02 +00:00
Reid Kleckner 81782f0cb8 MC: Use @IMGREL instead of @IMGREL32, which we can't parse
Nico Rieck added support for this 32-bit COFF relocation some time ago
for Win64 stuff. It appears that as an oversight, the assembly output
used "foo"@IMGREL32 instead of "foo"@IMGREL, which is what we can parse.

Sadly, there were actually tests that took in IMGREL and put out
IMGREL32, and we didn't notice the inconsistency. Oh well. Now LLVM can
assemble it's own output with slightly more fidelity.

llvm-svn: 218437
2014-09-25 02:09:18 +00:00
Chandler Carruth d355369dbb [x86] Remove the defunct X86ISD::BLENDV entry -- we use vector selects
for this now.

Should prevent folks from running afoul of this and not knowing why
their code won't instruction select the way I just did...

llvm-svn: 218436
2014-09-25 01:16:01 +00:00
Richard Trieu 52b8b60d4c Add increment/decrement operators and compound assignment operators to the
uninitialized checkers that did not have them before.

llvm-svn: 218435
2014-09-25 01:15:40 +00:00
Chandler Carruth a577bc26b6 [x86] Fix the v16i16 blend logic I added in the prior commit and add the
missing test cases for it.

Unsurprisingly, without test cases, there were bugs here. Surprisingly,
this bug wasn't caught at compile time. Yep, there is an X86ISD::BLENDV.
It isn't wired to anything. Oops. I'll fix than next.

llvm-svn: 218434
2014-09-25 01:13:38 +00:00
Rui Ueyama 1b0e68353d [PECOFF] Fix module definition file output
Previously we emit two or more identical definitions for an
exported symbol if the same /export option is given more than
once. This patch fixes that bug.

llvm-svn: 218433
2014-09-25 00:52:38 +00:00
Justin Bogner b35a72ae9e llvm-cov: Combine segments that cover the same location
If we have multiple coverage counts for the same segment, we need to
add them up rather than arbitrarily choosing one. This fixes that and
adds a test with template instantiations to exercise it.

llvm-svn: 218432
2014-09-25 00:34:18 +00:00
Akira Hatanaka 8cc48bd159 [X86,AVX] Add an isel pattern for X86VBroadcast.
This fixes PR21050 and rdar://problem/18434607.

llvm-svn: 218431
2014-09-25 00:26:15 +00:00
Chandler Carruth 98443d89b9 [x86] Implement v16i16 support with AVX2 in the new vector shuffle
lowering.

This also implements the fancy blend lowering for v16i16 using AVX2 and
teaches the X86 backend to print shuffle masks for 256-bit PSHUFB
and PBLENDW instructions. It also makes the mask decoding correct for
PBLENDW instructions. The yaks, they are legion.

Tests are updated accordingly. There are some missing tests for the
VBLENDVB lowering, but I'll add those in a follow-up as this commit has
accumulated enough cruft already.

llvm-svn: 218430
2014-09-25 00:24:19 +00:00
Nick Kledzik 38cd67624b [mach-o] fix test case to work with latest llvm-objdump output
Take opporunity to clean up test to only run llvm-objdump once now that
llvm-objdump can disassemble mixed thumb and arm code.

llvm-svn: 218429
2014-09-24 23:55:06 +00:00
Richard Smith 5b57167285 Fix handling of preincrement on bit-fields. This gives a bit-field in C++, but
we were failing to find that bit-field when performing integer promotions. This
brings us closer to following the standard, and closer to GCC.

In C, this change is technically a regression: we get bit-field promotions
completely wrong in C, promoting cases that are categorically not bit-field
designators. This change makes us do so slightly more consistently, though.

llvm-svn: 218428
2014-09-24 23:55:00 +00:00
Kostya Serebryany fd5e21adba [asan] make sanitizer tests depend on libclang_rt.profile since we now have a test that uses -coverage
llvm-svn: 218427
2014-09-24 23:54:04 +00:00
Todd Fiala e15fcaa2e5 Moved PlatformDarwin::GetEnvironment() to PlatformPOSIX to fix Linux/llgs issue.
See http://reviews.llvm.org/D5486 for more details.

I was tracking a problem where llgs on linux would not pick up any environment variables. On OSX there is a virtual function PlatformDarwin::GetEnvironment() which correctly sets up the list of environment variables. On linux llgs it defaults to a base class default implementation which clears the list.

I moved the OSX implementation down to PlatformPOSIX. This fixes my problem on linux still works properly on OSX.

Change by Shawn Best.
Slight tweak to convert 'virtual' to 'override' in PlatformDarwin.h virtual method override by Todd.

Tested:
Ubuntu 14.04 x86_64, cmake/ninja build + tests.
MacOSX 10.9.5 x86_64, Xcode 6.1 Beta build + tests.

llvm-svn: 218424
2014-09-24 23:10:30 +00:00
Kevin Enderby bf246f5a9d Flush out enough of llvm-objdump’s SymbolizerSymbolLookUp() for Mach-O files to
get the literal string “Hello world” printed as a comment on the instruction
that loads the pointer to it. For now this is just for x86_64. So for object
files with relocation entries it produces things like:

	leaq	L_.str(%rip), %rax      ## literal pool for: "Hello world\n"

and similar for fully linked images like executables:

	leaq	0x4f(%rip), %rax        ## literal pool for: "Hello world\n"

Also to allow testing against darwin’s otool(1), I hooked up the existing 
-no-show-raw-insn option to the Mach-O parser code, added the new Mach-O
only -full-leading-addr option to match otool(1)'s printing of addresses and
also added the new -print-imm-hex option.

llvm-svn: 218423
2014-09-24 23:08:22 +00:00
Todd Fiala f502d72d4e The beginnings of a gtest-based test framework.
Makes use of LLVM gtest support.  This does *not* run as part of
the lldb test suite.

I'm using it to start testing some components that
I'll be adding to the inner guts of NativeThreadLinux to more
maintainably handle thread states and deferred thread state notification.

Runs with default Makefile target "test" using gmake within a given
test directory (currently only test/c++/native_process/thread_state_coordinator).

The Makefile.rules currently assume it is using the LLVM gtest.  It works on
a canonical MacOSX dir structture (i.e. lldb, lldb/llvm, lldb/llvm/tools/clang).
It also works on Ubuntu assuming the standard dir layout of llvm, llvm/tools/clang,
llvm/tools/lldb.  In this case, it expects a directory called build-debug parallel
to the llvm source dir.  All directory assumptions can be overridden with
environment variables.  See test/c++/make/Makefile.rules for details.

We'll want to make this smarter in the future, particularly around finding the LLVM build
output dir.

llvm-svn: 218422
2014-09-24 22:57:33 +00:00
Kostya Serebryany 34ddf8725c [asan] don't instrument module CTORs that may be run before asan.module_ctor. This fixes asan running together -coverage
llvm-svn: 218421
2014-09-24 22:41:55 +00:00
DeLesley Hutchins 0d1ce2f199 Thread Safety Analysis: Update to documentation.
The attribute documentation now conforms to Aaron Ballman's renaming of the
thread safety attributes, as well as the new paper that is due to be published
in the conference on Source Code Analysis and Manipulation (SCAM 2014) later
this week.  In addition, recent changes to the analysis, such as checking
of references and negative capabilities, are now documented.

llvm-svn: 218420
2014-09-24 22:13:34 +00:00
Renato Golin 9c4a6d87ec Removing empty ARM tests from failed revert
llvm-svn: 218419
2014-09-24 21:58:04 +00:00
Chad Rosier 073cbd47f3 [AArch64] Fix an incorrect PLT entry.
This patch is difficult to test in isolation, so a subsequent patch will test
further.

Patch by Daniel Stewart <stewartd@codeaurora.org>!
Phabricator Revision: http://reviews.llvm.org/D5377

llvm-svn: 218418
2014-09-24 21:52:31 +00:00
Renato Golin a86bbc37f2 Removing empty tests from failed revert
llvm-svn: 218417
2014-09-24 21:45:26 +00:00
Renato Golin 4b5f91f513 Revert 218406 - Refactor the RelocVisitor::visit method
llvm-svn: 218416
2014-09-24 21:30:43 +00:00
Renato Golin ba89f068bf Revert 218407 - Add support for ARM and AArch64 BE object files
llvm-svn: 218415
2014-09-24 21:30:14 +00:00
Renato Golin d35e6f6aee Revert 218408 - Report endianness in output of {dwarf, obj}dump
llvm-svn: 218414
2014-09-24 21:29:45 +00:00
Renato Golin 2328747ede Revert 218411 - XFAIL reloc test on x86/hexagon
llvm-svn: 218413
2014-09-24 21:28:53 +00:00
Tobias Grosser 1eedb67fa6 We do not support alias checks for base pointers defined inside the SCoP
The run-time alias check places code that involves the base pointer at the
beginning of the SCoP. This breaks if the base pointer is defined inside the
SCoP. Hence, we can only create a run-time alias check if we are sure the base
pointer is not an instruction defined inside the scop. If it is we refuse to
handle the SCoP.

This commit should unbreak most of our current LNT failures.

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

llvm-svn: 218412
2014-09-24 21:04:29 +00:00
Renato Golin 7aa836043f XFAIL reloc test on x86/hexagon
llvm-svn: 218411
2014-09-24 21:00:30 +00:00
Enrico Granata 5e35cf9dcc Add an explicit cast to silence compiler warning here
llvm-svn: 218410
2014-09-24 20:52:58 +00:00
Akira Hatanaka 8e77dbbf5a Revert r218380. This was breaking Apple internal build bots.
llvm-svn: 218409
2014-09-24 20:37:14 +00:00
Renato Golin 6f92c6b982 Report endianness in output of {dwarf, obj}dump
For biendian targets like ARM and AArch64, it is useful to have the
output of the llvm-dwarfdump and llvm-objdump report the endianness
used when the object files were generated.

Patch by Charlie Turner.

llvm-svn: 218408
2014-09-24 20:07:41 +00:00
Renato Golin ed654f5852 Add support for ARM and AArch64 BE object files
This change fixes the ARM and AArch64 relocation visitors in
RelocVisitor.  They were unconditionally assuming the object data are
little-endian.  Tests have been added to ensure that the
llvm-dwarfdump utility does not crash when processing big-endian
object files.

Patch by Charlie Turner.

llvm-svn: 218407
2014-09-24 20:07:30 +00:00
Renato Golin 2b25450061 Refactor the RelocVisitor::visit method
This change replaces the brittle if/else chain of string comparisons
with a switch statement on the detected target triple, removing the
need for testing arbitrary architecture names returned from
getFileFormatName, whose primary purpose seems to be for display
(user-interface) purposes. The visitor now takes a reference to the
object file, rather than its arbitrary file format name to figure out
whether the file is a 32 or 64-bit object file and what the detected
target triple is.

A set of tests have been added to help show that the refactoring processes
relocations for the same targets as the original code.

Patch by Charlie Turner.

llvm-svn: 218406
2014-09-24 20:07:22 +00:00
Todd Fiala ad6eee6399 Change inline-breakpoint-strategy setting to default to eInlineBreakpointsAlways strategy.
See thread started here for motivation:
http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-September/005225.html

This change enables the ability to set breakpoints in ccache-based and executables that
make use of preprocessed source files.  This ability existed in lldb before, but was off
by default.

Change by Doug Snyder.

llvm-svn: 218405
2014-09-24 19:59:13 +00:00
Scott Douglass df914d55eb pass environment when invoking llvm-config and clang from lit.cfg
Use the same environment when invoking llvm-config from lit.cfg as
will be used when running tests, so that ASAN_OPTIONS, INCLUDE, etc.
are present.

llvm-svn: 218404
2014-09-24 18:37:52 +00:00
Scott Douglass ae671341c4 pass environment when invoking llvm-config from lit.cfg
Use the same environment when invoking llvm-config from lit.cfg as
will be used when running tests, so that ASAN_OPTIONS, INCLUDE, etc.
are present.

llvm-svn: 218403
2014-09-24 18:37:48 +00:00
Alexander Kornienko e995154ac2 Provide user name in ClangTidyOptions.
Summary:
This adds the ClangTidyOptions::User field and fills it from the USER
or the USERNAME environment variable, if possible. The FileOptionsProvider now
takes "default" options instead of "fallback" options, as it now uses these when
an option is not set in the configuration file (one exception is the checks
list).

Reviewers: bkramer, klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 218402
2014-09-24 18:36:03 +00:00
Chris Bieneman 7827217131 Adding #ifdef around TermColorMutex based on feedback from Craig Topper.
llvm-svn: 218401
2014-09-24 18:35:58 +00:00
Nico Weber 8f63ae1d4c Simplify tests.
This reverts bits of r218166 that are no longer necessary now that r218394 made
-Wmissing-prototype-for-cc a regular warning.

llvm-svn: 218400
2014-09-24 18:25:54 +00:00