platform/upstream/llvm.git
9 years agoAsmParser: Make sure GlobalVariables have sane types
David Majnemer [Mon, 16 Feb 2015 08:41:08 +0000 (08:41 +0000)]
AsmParser: Make sure GlobalVariables have sane types

llvm-svn: 229364

9 years agoAsmParser: Reject alloca with function type
David Majnemer [Mon, 16 Feb 2015 08:38:03 +0000 (08:38 +0000)]
AsmParser: Reject alloca with function type

llvm-svn: 229363

9 years agoSwitch our index sequence away from template aliases and just use
Chandler Carruth [Mon, 16 Feb 2015 08:22:35 +0000 (08:22 +0000)]
Switch our index sequence away from template aliases and just use
classes. We can't use template aliases because on MSVC they don't appear
to work correctly in the common usage such as Format.h.

Many thanks to Zach for doing all the testing and debugging here. I just
slotted the fix into the code.

llvm-svn: 229362

9 years agoVerifier: Diagnose module flags which have null ID operands
David Majnemer [Mon, 16 Feb 2015 08:14:22 +0000 (08:14 +0000)]
Verifier: Diagnose module flags which have null ID operands

llvm-svn: 229361

9 years agoFix formatting
Tobias Grosser [Mon, 16 Feb 2015 06:40:23 +0000 (06:40 +0000)]
Fix formatting

llvm-svn: 229360

9 years ago[X86] Add support for lowering shuffles to 256-bit PALIGNR instruction.
Craig Topper [Mon, 16 Feb 2015 06:29:06 +0000 (06:29 +0000)]
[X86] Add support for lowering shuffles to 256-bit PALIGNR instruction.

llvm-svn: 229359

9 years ago[X86] Remove some hard tab characters from tests.
Craig Topper [Mon, 16 Feb 2015 06:29:02 +0000 (06:29 +0000)]
[X86] Remove some hard tab characters from tests.

llvm-svn: 229358

9 years agoFix TestRegisters on remote target.
Chaoren Lin [Mon, 16 Feb 2015 06:17:51 +0000 (06:17 +0000)]
Fix TestRegisters on remote target.

Summary:
Using spawnSubprocess instead of forkSubprocess, so that the subprocess
spawns on the target and not the host.

Requires http://reviews.llvm.org/D7660 for cleanup.

Test Plan: TestRegisters.py passing.

Reviewers: ovyalov, vharron, clayborg

Subscribers: lldb-commits

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

llvm-svn: 229357

9 years agoDebugInfo: Don't crash if 'Debug Info Version' has a strange value
David Majnemer [Mon, 16 Feb 2015 06:04:53 +0000 (06:04 +0000)]
DebugInfo: Don't crash if 'Debug Info Version' has a strange value

llvm-svn: 229356

9 years agoDataLayout: Validate that the pref alignment is at least the ABI align
David Majnemer [Mon, 16 Feb 2015 05:41:55 +0000 (05:41 +0000)]
DataLayout: Validate that the pref alignment is at least the ABI align

llvm-svn: 229355

9 years agoDataLayout: Report when the datalayout type alignment/width is too large
David Majnemer [Mon, 16 Feb 2015 05:41:53 +0000 (05:41 +0000)]
DataLayout: Report when the datalayout type alignment/width is too large

llvm-svn: 229354

9 years agoDR1467: If aggregate initialization encounters an initializer list for which
Richard Smith [Mon, 16 Feb 2015 04:42:59 +0000 (04:42 +0000)]
DR1467: If aggregate initialization encounters an initializer list for which
subobject initialization is not possible, be sure to note the overall
initialization as having failed so that overload resolution knows that the
relevant candidate is not viable.

llvm-svn: 229353

9 years agoIR: Properly return nullptr when getAggregateElement is out-of-bounds
David Majnemer [Mon, 16 Feb 2015 04:02:09 +0000 (04:02 +0000)]
IR: Properly return nullptr when getAggregateElement is out-of-bounds

We didn't properly handle the out-of-bounds case for
ConstantAggregateZero and UndefValue.  This would manifest as a crash
when the constant folder was asked to fold a load of a constant global
whose struct type has no operands.

This fixes PR22595.

llvm-svn: 229352

9 years ago[CMake] Add RuntimeDyld to libdeps corresponding to r229343.
NAKAMURA Takumi [Mon, 16 Feb 2015 02:13:30 +0000 (02:13 +0000)]
[CMake] Add RuntimeDyld to libdeps corresponding to r229343.

llvm-svn: 229351

9 years ago[x86] Teach the 128-bit vector shuffle lowering routines to take
Chandler Carruth [Mon, 16 Feb 2015 01:52:02 +0000 (01:52 +0000)]
[x86] Teach the 128-bit vector shuffle lowering routines to take
advantage of the existence of a reasonable blend instruction.

The 256-bit vector shuffle lowering has leveraged the general technique
of decomposed shuffles and blends for quite some time, but this never
made it back into the 128-bit code, and there are a large number of
patterns where this is substantially better. For example, this removes
almost all domain crossing in vector shuffles that involve some blend
and some permutation with SSE4.1 and later. See the massive reduction
in 'shufps' for integer test cases in this commit.

This isn't perfect yet for a few reasons:

1) The v8i16 shuffle lowering continues to plague me. We don't always
   form an unpack-based blend when that would be better. But the wins
   pretty drastically outstrip the losses here.
2) The v16i8 shuffle lowering is just a disaster here. I never went and
   implemented blend support here for some terrible reason. I'll do
   that next probably. I've not updated it for now.

More variations on this technique are coming as well -- we don't
shuffle-into-unpack or shuffle-into-palignr, both of which would also be
profitable.

Note that some test cases grow significantly in the number of
instructions, but I expect to actually be faster. We use
pshufd+pshufd+blendw instead of a single shufps, but the pshufd's are
very likely to pipeline well (two ports on most modern intel chips) and
the blend is a *very* fast instruction. The domain switch penalty will
essentially always be more than a blend instruction, which is the only
increase in tree height.

llvm-svn: 229350

9 years ago[x86] Clean up a few test cases with the update script. NFC
Chandler Carruth [Mon, 16 Feb 2015 01:39:50 +0000 (01:39 +0000)]
[x86] Clean up a few test cases with the update script. NFC

llvm-svn: 229349

9 years ago[X86] Teach clang to lower __builtin_ia32_psrldqi256 and __builtin_ia32_pslldqi256...
Craig Topper [Mon, 16 Feb 2015 00:42:49 +0000 (00:42 +0000)]
[X86] Teach clang to lower __builtin_ia32_psrldqi256 and __builtin_ia32_pslldqi256 to vector shuffles the backend recognizes. This is a step towards removing the corresponding intrinsics from the backend.

llvm-svn: 229348

9 years ago[X86] Remove gcc builtins for AVX2 psll_dq and psrl_dq intrinsics. Clang no longer...
Craig Topper [Mon, 16 Feb 2015 00:42:36 +0000 (00:42 +0000)]
[X86] Remove gcc builtins for AVX2 psll_dq and psrl_dq intrinsics. Clang no longer needs them.

llvm-svn: 229347

9 years agoExtract SBAttachInfo into own set of files - SBAttachInfo.h, SBAttachInfo.cpp and...
Oleksiy Vyalov [Mon, 16 Feb 2015 00:04:19 +0000 (00:04 +0000)]
Extract SBAttachInfo into own set of files - SBAttachInfo.h, SBAttachInfo.cpp and SBAttachInfo.i.

llvm-svn: 229346

9 years ago[Bitcode reader] Fix a few assertions when reading invalid files
Filipe Cabecinhas [Mon, 16 Feb 2015 00:03:11 +0000 (00:03 +0000)]
[Bitcode reader] Fix a few assertions when reading invalid files

Summary:
When creating {insert,extract}value instructions from a BitcodeReader, we
weren't verifying the fields were valid.

Bugs found with afl-fuzz

Reviewers: rafael

Subscribers: llvm-commits

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

llvm-svn: 229345

9 years agoUpdate Polly for the removal of LLVM_DELETED_FUNCTION now that '= delete' works on...
David Blaikie [Sun, 15 Feb 2015 23:40:18 +0000 (23:40 +0000)]
Update Polly for the removal of LLVM_DELETED_FUNCTION now that '= delete' works on all supported compilers (MSVC2012 compat has been dropped)

llvm-svn: 229344

9 years ago[ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager into
Lang Hames [Sun, 15 Feb 2015 23:22:43 +0000 (23:22 +0000)]
[ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager into
RuntimeDyld.

This should fix http://llvm.org/PR22593.

llvm-svn: 229343

9 years agoMinGW's snprintf is not exposed through std::.
Benjamin Kramer [Sun, 15 Feb 2015 23:17:20 +0000 (23:17 +0000)]
MinGW's snprintf is not exposed through std::.

llvm-svn: 229342

9 years agoRemoving LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the...
Aaron Ballman [Sun, 15 Feb 2015 23:10:05 +0000 (23:10 +0000)]
Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; lld edition.

llvm-svn: 229341

9 years agoRemoving LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the...
Aaron Ballman [Sun, 15 Feb 2015 22:54:22 +0000 (22:54 +0000)]
Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition.

llvm-svn: 229340

9 years agoRemoving LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the...
Aaron Ballman [Sun, 15 Feb 2015 22:54:08 +0000 (22:54 +0000)]
Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition.

llvm-svn: 229339

9 years agoPartial revert of r229336; this wasn't intended to go in.
Aaron Ballman [Sun, 15 Feb 2015 22:18:04 +0000 (22:18 +0000)]
Partial revert of r229336; this wasn't intended to go in.

llvm-svn: 229338

9 years agoFormat: Modernize using variadic templates.
Benjamin Kramer [Sun, 15 Feb 2015 22:15:41 +0000 (22:15 +0000)]
Format: Modernize using variadic templates.

Introduces a subset of C++14 integer sequences in STLExtras. This is
just enough to support unpacking a std::tuple into the arguments of
snprintf, we can add more of it when it's actually needed.

Also removes an ancient macro hack that leaks a macro into the global
namespace. Clean up users that made use of the convenient hack.

llvm-svn: 229337

9 years agoRemoving LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro...
Aaron Ballman [Sun, 15 Feb 2015 22:00:28 +0000 (22:00 +0000)]
Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition.

llvm-svn: 229336

9 years agoRemoving LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro...
Aaron Ballman [Sun, 15 Feb 2015 22:00:20 +0000 (22:00 +0000)]
Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition.

llvm-svn: 229335

9 years agoos.remove shouldn't fail, if file doesn't exist
Ismail Pazarbasi [Sun, 15 Feb 2015 21:50:28 +0000 (21:50 +0000)]
os.remove shouldn't fail, if file doesn't exist

Summary:
os.remove might throw an exception (of type OSError), if given file
doesn't exist. Catch the exception, and ignore it //iff// errno is
ENOENT. Rethrow the exception, if errno is not ENOENT.

Reviewers: emaste

Subscribers: llvm-commits

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

llvm-svn: 229334

9 years agoSince MSVC 1800 is our lowest common denominator, we don't need an explicit check...
Aaron Ballman [Sun, 15 Feb 2015 21:21:52 +0000 (21:21 +0000)]
Since MSVC 1800 is our lowest common denominator, we don't need an explicit check for it in these macros any longer; NFC.

llvm-svn: 229333

9 years agoCommandLine: Use variadic templates to simplify opt constructors.
Benjamin Kramer [Sun, 15 Feb 2015 21:11:25 +0000 (21:11 +0000)]
CommandLine: Use variadic templates to simplify opt constructors.

llvm-svn: 229332

9 years agollvm-pdbdump: Fix warning caused by missing sentinel value.
Zachary Turner [Sun, 15 Feb 2015 20:37:44 +0000 (20:37 +0000)]
llvm-pdbdump: Fix warning caused by missing sentinel value.

llvm-svn: 229331

9 years agollvm-pdbdump: Add flags controlling the type of values to dump.
Zachary Turner [Sun, 15 Feb 2015 20:27:53 +0000 (20:27 +0000)]
llvm-pdbdump: Add flags controlling the type of values to dump.

llvm-svn: 229330

9 years agoUnbreak the build.
Benjamin Kramer [Sun, 15 Feb 2015 20:24:47 +0000 (20:24 +0000)]
Unbreak the build.

llvm-svn: 229329

9 years agoFoldingSet: Replace faux variadics with real variadics. NFC.
Benjamin Kramer [Sun, 15 Feb 2015 20:12:17 +0000 (20:12 +0000)]
FoldingSet: Replace faux variadics with real variadics. NFC.

llvm-svn: 229328

9 years agoMake pushCleanup a variadic template. NFC.
Benjamin Kramer [Sun, 15 Feb 2015 20:11:22 +0000 (20:11 +0000)]
Make pushCleanup a variadic template. NFC.

llvm-svn: 229327

9 years agoFormat: Make FormatToken's isOneOf a variadic template
Benjamin Kramer [Sun, 15 Feb 2015 20:11:14 +0000 (20:11 +0000)]
Format: Make FormatToken's isOneOf a variadic template

llvm-svn: 229326

9 years agoAnalyzer: Replace a set of particularly ugly faux variadics.
Benjamin Kramer [Sun, 15 Feb 2015 20:11:07 +0000 (20:11 +0000)]
Analyzer: Replace a set of particularly ugly faux variadics.

llvm-svn: 229325

9 years agoRemove LLVM_HAS_VARIADIC_TEMPLATES and all the faux variadic workarounds guarded...
Benjamin Kramer [Sun, 15 Feb 2015 19:34:28 +0000 (19:34 +0000)]
Remove LLVM_HAS_VARIADIC_TEMPLATES and all the faux variadic workarounds guarded by it.

We no longer support compilers without variadic template support.

llvm-svn: 229324

9 years agoUpdate the docs to require at least MSVC 2013.
Benjamin Kramer [Sun, 15 Feb 2015 19:34:17 +0000 (19:34 +0000)]
Update the docs to require at least MSVC 2013.

llvm-svn: 229323

9 years agoRevert 229175
Philip Reames [Sun, 15 Feb 2015 19:07:31 +0000 (19:07 +0000)]
Revert 229175

This change is a logical suspect in 22587 and 22590.  Given it's of minimal importanance and I can't get clang to build on my home machine, I'm reverting so that I can deal with this next week.

llvm-svn: 229322

9 years agoAdded (still inefficient) shuffle test case for PR21138
Simon Pilgrim [Sun, 15 Feb 2015 18:21:39 +0000 (18:21 +0000)]
Added (still inefficient) shuffle test case for PR21138

llvm-svn: 229321

9 years agoReapply r229185(cbieneman) -- Raising minimum required Visual Studio version to 2013.
NAKAMURA Takumi [Sun, 15 Feb 2015 17:53:10 +0000 (17:53 +0000)]
Reapply r229185(cbieneman) -- Raising minimum required Visual Studio version to 2013.

This is based on the discussions on: [LLVMdev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk

llvm-svn: 229320

9 years ago[ADCE] Convert another loop for a range-based for
Hal Finkel [Sun, 15 Feb 2015 15:51:25 +0000 (15:51 +0000)]
[ADCE] Convert another loop for a range-based for

We can use a range-based for for the operands loop too; NFC.

llvm-svn: 229319

9 years ago[ADCE] Use inst_range and range-based fors
Hal Finkel [Sun, 15 Feb 2015 15:51:23 +0000 (15:51 +0000)]
[ADCE] Use inst_range and range-based fors

Convert a few loops to range-based fors; NFC.

llvm-svn: 229318

9 years ago[ADCE] Fix formatting of pointer types
Hal Finkel [Sun, 15 Feb 2015 15:47:52 +0000 (15:47 +0000)]
[ADCE] Fix formatting of pointer types

We prefer to put the * with the variable, not with the type; NFC.

llvm-svn: 229317

9 years ago[ADCE] Fix capitalization of another local variable
Hal Finkel [Sun, 15 Feb 2015 15:45:30 +0000 (15:45 +0000)]
[ADCE] Fix capitalization of another local variable

Bring another local variable in compliance with our naming conventions, NFC.

llvm-svn: 229316

9 years ago[ADCE] Fix capitalization of some local variables
Hal Finkel [Sun, 15 Feb 2015 15:45:28 +0000 (15:45 +0000)]
[ADCE] Fix capitalization of some local variables

Bring some local variables in compliance with our naming conventions, NFC.

llvm-svn: 229315

9 years agoUpdate ARM and x86 ArchHandler to check switch completeness. NFC
Jean-Daniel Dupas [Sun, 15 Feb 2015 15:23:48 +0000 (15:23 +0000)]
Update ARM and x86 ArchHandler to check switch completeness. NFC

Define an explicit type for arch specific reference kinds to make sure all cases are covered in switch statements.

llvm-svn: 229314

9 years agoAdded some test cases of missed opportunities to use unpckl/unpckh shuffles
Simon Pilgrim [Sun, 15 Feb 2015 15:07:45 +0000 (15:07 +0000)]
Added some test cases of missed opportunities to use unpckl/unpckh shuffles

llvm-svn: 229313

9 years agoCoding style fixes to recent patches. NFC.
Simon Pilgrim [Sun, 15 Feb 2015 14:19:29 +0000 (14:19 +0000)]
Coding style fixes to recent patches. NFC.

llvm-svn: 229312

9 years ago[X86][AVX2] vpslldq/vpsrldq byte shifts for AVX2
Simon Pilgrim [Sun, 15 Feb 2015 13:19:52 +0000 (13:19 +0000)]
[X86][AVX2] vpslldq/vpsrldq byte shifts for AVX2

This patch refactors the existing lowerVectorShuffleAsByteShift function to add support for 256-bit vectors on AVX2 targets.

It also fixes a tablegen issue that prevented the lowering of vpslldq/vpsrldq vec256 instructions.

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

llvm-svn: 229311

9 years ago[x86] Add the test case from PR22412, we now get this right even with
Chandler Carruth [Sun, 15 Feb 2015 12:45:05 +0000 (12:45 +0000)]
[x86] Add the test case from PR22412, we now get this right even with
the new vector shuffle legality.

llvm-svn: 229310

9 years ago[x86] Teach the decomposed shuffle/blend lowering to use an early blend
Chandler Carruth [Sun, 15 Feb 2015 12:42:15 +0000 (12:42 +0000)]
[x86] Teach the decomposed shuffle/blend lowering to use an early blend
when that will allow it to lower with a single permute instead of
multiple permutes.

It tries to detect when it will only have to do a single permute in
either case to maximize folding of loads and such.

This cuts a *lot* of the avx2 shuffle permute counts in half. =]

llvm-svn: 229309

9 years ago[SDAG] Teach the SelectionDAG to canonicalize vector shuffles of splats
Chandler Carruth [Sun, 15 Feb 2015 12:18:12 +0000 (12:18 +0000)]
[SDAG] Teach the SelectionDAG to canonicalize vector shuffles of splats
directly into blends of the splats.

These patterns show up even very late in the vector shuffle lowering
where we don't have any chance for DAG combining to kick in, and
blending is a tremendously simpler operation to model. By coercing the
shuffle into a blend we can much more easily match and lower shuffles of
splats.

Immediately with this change there are significantly more blends being
matched in the x86 vector shuffle lowering.

llvm-svn: 229308

9 years ago[x86] Teach the shuffle mask equivalence test to look through build
Chandler Carruth [Sun, 15 Feb 2015 12:07:55 +0000 (12:07 +0000)]
[x86] Teach the shuffle mask equivalence test to look through build
vectors and detect equivalent inputs.

This lets the code match unpck-style instructions when only one of the
inputs are lined up but the other input is a splat and so which lanes we
pull from doesn't matter. Today, this doesn't really happen, but just by
accident. I have a patch that normalizes how we shuffle splats, and with
that patch this will be necessary for a lot of the mask equivalence
tests to work.

I don't really know how to write a test case for this specific change
until the other change lands though.

llvm-svn: 229307

9 years ago[x86] Tweak the ordering of unpack matching vs. element insertion, and
Chandler Carruth [Sun, 15 Feb 2015 12:01:14 +0000 (12:01 +0000)]
[x86] Tweak the ordering of unpack matching vs. element insertion, and
don't try to do element insertion for non-zero-index floating point
vectors.

We don't have any useful patterns or lowering for element insertion into
high elements of a floating point vector, and the generic shuffle
lowering will end up being better -- namely it will fall back to unpck.
But we should try to handle other forms of element insertion before
matching unpck patterns.

While this doesn't matter much right now, I'm working on a patch that
makes unpck matching much more powerful, and that patch will break
without this re-ordering.

llvm-svn: 229306

9 years agowww: update installation instructions to not include gmp/isl
Tobias Grosser [Sun, 15 Feb 2015 11:19:24 +0000 (11:19 +0000)]
www: update installation instructions to not include gmp/isl

llvm-svn: 229305

9 years agoRemove isl/cloog build scripts
Tobias Grosser [Sun, 15 Feb 2015 11:19:20 +0000 (11:19 +0000)]
Remove isl/cloog build scripts

isl is not distributed as part of Polly.

llvm-svn: 229304

9 years agowww: Add code coverage and scan-build results again
Tobias Grosser [Sun, 15 Feb 2015 10:41:06 +0000 (10:41 +0000)]
www: Add code coverage and scan-build results again

Sylvestre Ledru (re)enabled them after the import of isl into polly
significantly simplified the build.

llvm-svn: 229303

9 years ago[PBQP] Assert conservativelly allocatable nodes are spilled by choice.
Arnaud A. de Grandmaison [Sun, 15 Feb 2015 10:35:31 +0000 (10:35 +0000)]
[PBQP] Assert conservativelly allocatable nodes are spilled by choice.

llvm-svn: 229302

9 years ago[x86] Stop shuffling zero vectors. =]
Chandler Carruth [Sun, 15 Feb 2015 10:34:52 +0000 (10:34 +0000)]
[x86] Stop shuffling zero vectors. =]

I was somewhat surprised this pattern really came up, but it does. It
seems better to just directly handle it than try to special case every
place where we end up forming a shuffle that devolves to a shuffle of
a zero vector.

llvm-svn: 229301

9 years ago[x86] Use a more helpful parenthesizing of these comparisons. Silences
Chandler Carruth [Sun, 15 Feb 2015 10:15:20 +0000 (10:15 +0000)]
[x86] Use a more helpful parenthesizing of these comparisons. Silences
a -Wparentheses complaint from GCC.

llvm-svn: 229300

9 years ago[x86] When splitting 256-bit vectors into 128-bit vectors, don't extract
Chandler Carruth [Sun, 15 Feb 2015 10:12:02 +0000 (10:12 +0000)]
[x86] When splitting 256-bit vectors into 128-bit vectors, don't extract
subvectors from buildvectors. That doesn't really make any sense and it
breaks all of the down-stream matching of buildvectors to cleverly lower
shuffles.

With this, we now get the shift-based lowering of 256-bit vector
shuffles with AVX1 when we split them into 128-bit vectors. We also do
much better on the zero-extension patterns, although there remains quite
a bit of room for improvement here.

llvm-svn: 229299

9 years ago[x86] Make computing the zeroable elements slightly more powerful, at
Chandler Carruth [Sun, 15 Feb 2015 09:33:36 +0000 (09:33 +0000)]
[x86] Make computing the zeroable elements slightly more powerful, at
least in theory.

I don't actually have a test case that benefits from this, but
theoretically, it could come up, and I don't want to try to think about
whether this is the culprit or something else is, so I'd rather just
make this code powerful. =/ Makes me sad that I can't really test it
though.

llvm-svn: 229298

9 years agogold-plugin: fix test to allow default visibility on local symbols
Michael Kuperstein [Sun, 15 Feb 2015 09:32:30 +0000 (09:32 +0000)]
gold-plugin: fix test to allow default visibility on local symbols

GNU ld sets default, not hidden, visibility on local symbols.
Having default or hidden visibility on local symbols makes no difference in run-time behavior.

Patch by: H.J. Lu <hjl.tools@gmail.com>

llvm-svn: 229297

9 years ago[x86] Update some tests with the latest version of my script and llc.
Chandler Carruth [Sun, 15 Feb 2015 09:26:15 +0000 (09:26 +0000)]
[x86] Update some tests with the latest version of my script and llc.
This mostly adds some shuffle decode comments and cleans up indentation.

llvm-svn: 229296

9 years agoFix a typo in r229291 causing buildbot failure.
Larisse Voufo [Sun, 15 Feb 2015 08:47:33 +0000 (08:47 +0000)]
Fix a typo in r229291 causing buildbot failure.

llvm-svn: 229295

9 years agoAdd more tests for crashes that happend to be fixed by r229288.
Larisse Voufo [Sun, 15 Feb 2015 08:47:31 +0000 (08:47 +0000)]
Add more tests for crashes that happend to be fixed by r229288.

llvm-svn: 229294

9 years agoDon't crash on `struct ::, struct ::` (and the same for enums).
Larisse Voufo [Sun, 15 Feb 2015 08:47:30 +0000 (08:47 +0000)]
Don't crash on `struct ::, struct ::` (and the same for enums).

The first part of that line doesn't parse correctly and ParseClassSpecifier() for
some reason skips to tok::comma to recover, and then
ParseDeclarationSpecifiers() sees the next struct and calls
ParseClassSpecifier() again with the same DeclSpec object.

However, the first call already called ActOnCXXGlobalScopeSpecifier() on the
DeclSpec's CXXScopeSpec, and sema gets confused when this gets called again.

As a fix, let ParseClassSpecifier() (and ParseEnumSpecifier()) call
ParseOptionalCXXScopeSpec() with a temporary CXXScopeSpec object, and only
copy it into the DeclSpec if things work out.  (This is also how all the other
functions that set the DeclSpec's TypeSpecScope set it.)

Found by SLi's bot.

llvm-svn: 229293

9 years ago[x86] Add a slight variation on some of the other generic shuffle
Chandler Carruth [Sun, 15 Feb 2015 08:26:30 +0000 (08:26 +0000)]
[x86] Add a slight variation on some of the other generic shuffle
lowerings -- one which decomposes into an initial blend followed by
a permute.

Particularly on newer chips, blends are handled independently of
shuffles and so this is much less bottlenecked on the single port that
floating point shuffles are executed with on Intel.

I'll be adding this lowering to a bunch of other code paths in
subsequent commits to handle still more places where we can effectively
leverage blends when they're available in the ISA.

llvm-svn: 229292

9 years agoMore on fixing sized deallocation implementation logic: Fix PR21754.
Larisse Voufo [Sun, 15 Feb 2015 08:16:37 +0000 (08:16 +0000)]
More on fixing sized deallocation implementation logic: Fix PR21754.

llvm-svn: 229291

9 years agoEnabled cost calculation for masked memory operations.
Elena Demikhovsky [Sun, 15 Feb 2015 08:08:48 +0000 (08:08 +0000)]
Enabled cost calculation for masked memory operations.

We already have implementation for cost calculation for
masked memory operations. I just call it from the loop vectorizer.

llvm-svn: 229290

9 years agoAdd more tests for crashes that happend to be fixed by r229288.
Nico Weber [Sun, 15 Feb 2015 07:45:39 +0000 (07:45 +0000)]
Add more tests for crashes that happend to be fixed by r229288.

llvm-svn: 229289

9 years agoDon't crash on `struct ::, struct ::` (and the same for enums).
Nico Weber [Sun, 15 Feb 2015 07:26:13 +0000 (07:26 +0000)]
Don't crash on `struct ::, struct ::` (and the same for enums).

The first part of that line doesn't parse correctly and ParseClassSpecifier() for
some reason skips to tok::comma to recover, and then
ParseDeclarationSpecifiers() sees the next struct and calls
ParseClassSpecifier() again with the same DeclSpec object.

However, the first call already called ActOnCXXGlobalScopeSpecifier() on the
DeclSpec's CXXScopeSpec, and sema gets confused when this gets called again.

As a fix, let ParseClassSpecifier() (and ParseEnumSpecifier()) call
ParseOptionalCXXScopeSpec() with a temporary CXXScopeSpec object, and only
copy it into the DeclSpec if things work out.  (This is also how all the other
functions that set the DeclSpec's TypeSpecScope set it.)

Found by SLi's bot.

llvm-svn: 229288

9 years ago[X86] Add assembly parser support for mnemonic aliases for AVX-512 vpcmp instructions.
Craig Topper [Sun, 15 Feb 2015 07:13:48 +0000 (07:13 +0000)]
[X86] Add assembly parser support for mnemonic aliases for AVX-512 vpcmp instructions.

llvm-svn: 229287

9 years ago[x86] Add a test case for PR22390 which was a dup of PR22377 and fixed
Chandler Carruth [Sun, 15 Feb 2015 07:05:50 +0000 (07:05 +0000)]
[x86] Add a test case for PR22390 which was a dup of PR22377 and fixed
by r229285. This is a nice different test case though, so I'd like to
have the extra testing of these kinds of patterns.

llvm-svn: 229286

9 years ago[x86] Fix PR22377, a regression with the new vector shuffle legality
Chandler Carruth [Sun, 15 Feb 2015 07:01:10 +0000 (07:01 +0000)]
[x86] Fix PR22377, a regression with the new vector shuffle legality
test.

This was just a matter of the DAG combine for vector shuffles being too
aggressive. This is a bit of a grey area, but I think generally if we
can re-use intermediate shuffles, we should. Certainly, given the test
cases I have available, this seems like the right call.

llvm-svn: 229285

9 years ago[x86] Switch a collection of tests explicitly to the new vector shuffle
Chandler Carruth [Sun, 15 Feb 2015 06:37:21 +0000 (06:37 +0000)]
[x86] Switch a collection of tests explicitly to the new vector shuffle
legality test (essentially, everything is legal).

I'm planning to make this the default shortly, but I'd like to fix
a collection of the bugs it exposes first, and this will let me easily
test them. It also showcases both the improvements and a few of the
regressions triggered by the change. The biggest improvements by far are
the significantly reduced shuffling and domain crossing in the combining
test case. The biggest regressions are missing some clever blending
patterns.

llvm-svn: 229284

9 years ago[x86] Remove the now-default-on flag for the new vector shuffle lowering
Chandler Carruth [Sun, 15 Feb 2015 06:20:51 +0000 (06:20 +0000)]
[x86] Remove the now-default-on flag for the new vector shuffle lowering
strategy from a bunch of tests.

llvm-svn: 229283

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sun, 15 Feb 2015 06:15:40 +0000 (06:15 +0000)]
Wrap to 80 columns. No behavior change.

llvm-svn: 229282

9 years agoImplement C++14's sized deallocation functions, since there are no longer implicitly...
Larisse Voufo [Sun, 15 Feb 2015 05:18:55 +0000 (05:18 +0000)]
Implement C++14's sized deallocation functions, since there are no longer implicitly defined by clang, as of r229241.

llvm-svn: 229281

9 years ago[X86] Add assembler predicates for the rest of the AVX512 feature flags. This makes...
Craig Topper [Sun, 15 Feb 2015 04:54:55 +0000 (04:54 +0000)]
[X86] Add assembler predicates for the rest of the AVX512 feature flags. This makes the assembly matching consistent across all AVX512 instructions. Without this we were allowing some AVX512 instructions to be parsed always, but not the foundation instructions.

llvm-svn: 229280

9 years ago[X86] Add the remaining 11 possible exact ModRM formats. This makes their encodings...
Craig Topper [Sun, 15 Feb 2015 04:16:44 +0000 (04:16 +0000)]
[X86] Add the remaining 11 possible exact ModRM formats. This makes their encodings linear which can then be used to simplify some other code.

llvm-svn: 229279

9 years agoFileCheck-ize a test to make it easier to migrate to typeless pointers
David Blaikie [Sun, 15 Feb 2015 04:14:00 +0000 (04:14 +0000)]
FileCheck-ize a test to make it easier to migrate to typeless pointers

llvm-svn: 229278

9 years agoUpdate a test to make it easier to migrate to untyped pointers
David Blaikie [Sun, 15 Feb 2015 04:13:58 +0000 (04:13 +0000)]
Update a test to make it easier to migrate to untyped pointers

llvm-svn: 229277

9 years agoUpdate a test to use FileCheck so it's easier to migrate to future typeless pointer...
David Blaikie [Sun, 15 Feb 2015 04:13:57 +0000 (04:13 +0000)]
Update a test to use FileCheck so it's easier to migrate to future typeless pointer changes

llvm-svn: 229276

9 years agoReformat test case to be easier to migrate to typeless pointers.
David Blaikie [Sun, 15 Feb 2015 04:13:53 +0000 (04:13 +0000)]
Reformat test case to be easier to migrate to typeless pointers.

llvm-svn: 229275

9 years agoRemove trailing whitespace to make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:22 +0000 (04:12 +0000)]
Remove trailing whitespace to make test compatible with typeless pointer migration

llvm-svn: 229274

9 years agoRemove trailing whitespace to make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:21 +0000 (04:12 +0000)]
Remove trailing whitespace to make test compatible with typeless pointer migration

llvm-svn: 229273

9 years agoRemove trailing whitespace to make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:19 +0000 (04:12 +0000)]
Remove trailing whitespace to make test compatible with typeless pointer migration

llvm-svn: 229272

9 years agoRemove trailing whitespace to help make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:17 +0000 (04:12 +0000)]
Remove trailing whitespace to help make test compatible with typeless pointer migration

llvm-svn: 229271

9 years agoUpdate test to be ready for typeless pointer changes
David Blaikie [Sun, 15 Feb 2015 04:12:16 +0000 (04:12 +0000)]
Update test to be ready for typeless pointer changes

llvm-svn: 229270

9 years agoUpdate test to make it robust to migration to typeless pointers
David Blaikie [Sun, 15 Feb 2015 04:12:14 +0000 (04:12 +0000)]
Update test to make it robust to migration to typeless pointers

llvm-svn: 229269

9 years ago[x86] Teach my test updating script about another quirk of the printed
Chandler Carruth [Sun, 15 Feb 2015 00:08:01 +0000 (00:08 +0000)]
[x86] Teach my test updating script about another quirk of the printed
asm and port the mmx vector shuffle test to it.

Not thrilled with how it handles the stack manipulation logic, but I'm
much less bothered by that than I am by updating the test manually. =]
If anyone wants to teach the test checks management script about stack
adjustment patterns, that'd be cool too.

llvm-svn: 229268

9 years ago[X86][XOP] Enable commutation for XOP instructions
Simon Pilgrim [Sat, 14 Feb 2015 22:40:46 +0000 (22:40 +0000)]
[X86][XOP] Enable commutation for XOP instructions

Patch to allow XOP instructions (integer comparison and integer multiply-add) to be commuted. The comparison instructions sometimes require the compare mode to be flipped but the remaining instructions can use default commutation modes.

This patch also sets the SSE domains of all the XOP instructions.

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

llvm-svn: 229267

9 years ago[X86] Improve parsing support AVX/SSE floating point compare instruction mnemonic...
Craig Topper [Sat, 14 Feb 2015 21:54:03 +0000 (21:54 +0000)]
[X86] Improve parsing support AVX/SSE floating point compare instruction mnemonic aliases. They'll now print with the alias the parser received instead of converting to the explicit immediate form.

llvm-svn: 229266

9 years agoInstCombine: propagate deref via new addDereferenceableAttr
Ramkumar Ramachandra [Sat, 14 Feb 2015 19:37:54 +0000 (19:37 +0000)]
InstCombine: propagate deref via new addDereferenceableAttr

The "dereferenceable" attribute cannot be added via .addAttribute(),
since it also expects a size in bytes. AttrBuilder#addAttribute or
AttributeSet#addAttribute is wrapped by classes Function, InvokeInst,
and CallInst. Add corresponding wrappers to
AttrBuilder#addDereferenceableAttr.

Having done this, propagate the dereferenceable attribute via
gc.relocate, adding a test to exercise it. Note that -datalayout is
required during execution over and above -instcombine, because
InstCombine only optionally requires DataLayoutPass.

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

llvm-svn: 229265