oota-llvm.git
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::.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229342 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229340 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229337 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229335 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229333 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229332 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229331 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229330 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229328 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229324 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229323 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229322 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229321 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229320 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229319 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229318 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229317 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229316 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229315 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229313 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229312 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229311 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229310 91177308-0d34-0410-b5e6-96231b3b80d8

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. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229309 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229308 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229307 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229306 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229302 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229301 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229300 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229299 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229298 91177308-0d34-0410-b5e6-96231b3b80d8

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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229297 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229296 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229292 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229290 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229287 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229286 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229285 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229284 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229283 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229280 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229279 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229278 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229277 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229276 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229275 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229268 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229267 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229266 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229265 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTarget: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 15:36:52 +0000 (15:36 +0000)]
Target: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229261 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNVPTX: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 15:35:43 +0000 (15:35 +0000)]
NVPTX: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229260 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[optnone] Skip pass Constant Hoisting on optnone functions.
Andrea Di Biagio [Sat, 14 Feb 2015 15:11:48 +0000 (15:11 +0000)]
[optnone] Skip pass Constant Hoisting on optnone functions.

Added test CodeGen/X86/constant-hoisting-optnone.ll to verify that
pass Constant Hoisting is not run on optnone functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229258 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Ensure integer domain on scalar load/store stack folding tests. NFC
Simon Pilgrim [Sat, 14 Feb 2015 14:10:44 +0000 (14:10 +0000)]
[X86] Ensure integer domain on scalar load/store stack folding tests. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229257 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLine ending fix. NFC.
Simon Pilgrim [Sat, 14 Feb 2015 13:27:53 +0000 (13:27 +0000)]
Line ending fix. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229256 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[gold] Consolidate the gold plugin options and actually search for
Chandler Carruth [Sat, 14 Feb 2015 09:43:57 +0000 (09:43 +0000)]
[gold] Consolidate the gold plugin options and actually search for
a gold binary explicitly. Substitute this binary into the tests rather
than just directly executing the 'ld' binary.

This should allow folks to inject a cross compiling gold binary, or in
my case to use a gold binary built and installed somewhere other than
/usr/bin/ld. It should also allow the tests to find 'ld.gold' so that
things work even if gold isn't the default on the system.

I've only stubbed out support in the makefile to preserve the existing
behavior with none of the fancy logic. If someone else wants to add
logic here, they're welcome to do so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229251 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove a variable only used in an assert and sink its initializer into
Chandler Carruth [Sat, 14 Feb 2015 09:14:44 +0000 (09:14 +0000)]
Remove a variable only used in an assert and sink its initializer into
the assert. Fixes -Wunused-variable on non-asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229250 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBack out two accidental changes that snuck in with r229245. Sorry these
Chandler Carruth [Sat, 14 Feb 2015 09:05:58 +0000 (09:05 +0000)]
Back out two accidental changes that snuck in with r229245. Sorry these
snuck in, they weren't ready for prime time and had *nothing* to do
with that commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229248 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[lit] Make the gold plugin support testing work with a python3
Chandler Carruth [Sat, 14 Feb 2015 09:05:56 +0000 (09:05 +0000)]
[lit] Make the gold plugin support testing work with a python3
interpreter. Seems that's a better path than pinning to python2.7.

Thanks to Justin for prodding me toward a fix. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229247 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r229224: Make the 'llvm-lit' utility defend against a system where Python3
Chandler Carruth [Sat, 14 Feb 2015 07:11:25 +0000 (07:11 +0000)]
Revert r229224: Make the 'llvm-lit' utility defend against a system where Python3

Apparantly python2.7 also doesn't work. Awesome.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229245 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[lit] Make the 'llvm-lit' utility defend against a system where Python3
Chandler Carruth [Sat, 14 Feb 2015 07:05:15 +0000 (07:05 +0000)]
[lit] Make the 'llvm-lit' utility defend against a system where Python3
is the default.

The lit.cfg files are not all valid Python3 and I've no idea if anyone
is really prepared to update them. The easiest way I know of to ensure
that this script uses Python 2 is to use 'python2.7' in the command. Mac
and Linux are definitely fine with this and I think other platforms will
be as well, but if anyone struggles with this set up and has better
ideas, let me know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229244 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Try harder to stop DebugInfo/PDB/DIA being built if not available.
Richard Smith [Sat, 14 Feb 2015 05:54:56 +0000 (05:54 +0000)]
[modules] Try harder to stop DebugInfo/PDB/DIA being built if not available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229243 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Implement correct f64 fdiv
Matt Arsenault [Sat, 14 Feb 2015 04:30:08 +0000 (04:30 +0000)]
R600/SI: Implement correct f64 fdiv

This version passes the OpenCL conformance test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229239 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Use complex operand folding for div_scale
Matt Arsenault [Sat, 14 Feb 2015 04:24:28 +0000 (04:24 +0000)]
R600/SI: Use complex operand folding for div_scale

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229238 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Add tests for div_fmas with inline immediate operands
Matt Arsenault [Sat, 14 Feb 2015 04:22:02 +0000 (04:22 +0000)]
R600/SI: Add tests for div_fmas with inline immediate operands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229237 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix implicit vcc operand to v_div_fmas_*
Matt Arsenault [Sat, 14 Feb 2015 04:22:00 +0000 (04:22 +0000)]
R600/SI: Fix implicit vcc operand to v_div_fmas_*

This should allow finally fixing the f64 fdiv implementation.

Test is disabled for VI since there seems to be a problem with one
of the buffer load instructions on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229236 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix schedule model for v_div_scale_{f32|f64}
Matt Arsenault [Sat, 14 Feb 2015 04:03:18 +0000 (04:03 +0000)]
R600/SI: Fix schedule model for v_div_scale_{f32|f64}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229235 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Really fix size of VReg_1
Matt Arsenault [Sat, 14 Feb 2015 03:54:32 +0000 (03:54 +0000)]
R600/SI: Really fix size of VReg_1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229234 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Rename encoding field to match docs for VOP3b
Matt Arsenault [Sat, 14 Feb 2015 03:54:29 +0000 (03:54 +0000)]
R600/SI: Rename encoding field to match docs for VOP3b

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229233 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-pdbdump: Only dump whitelisted global symbols.
Zachary Turner [Sat, 14 Feb 2015 03:54:28 +0000 (03:54 +0000)]
llvm-pdbdump: Only dump whitelisted global symbols.

Dumping the global scope contains a lot of very uninteresting
things and is generally polluted with a lot of random junk.
Furthermore, it dumps values unsorted, making it hard to read.
This patch dumps known interesting types only, and as a side
effect sorts the list by symbol type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229232 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-pdbdump: Re-order header files according to LLVM style guide.
Zachary Turner [Sat, 14 Feb 2015 03:53:56 +0000 (03:53 +0000)]
llvm-pdbdump: Re-order header files according to LLVM style guide.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229231 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix not encoding src2 for v_div_scale_{f32|f64}
Matt Arsenault [Sat, 14 Feb 2015 03:40:35 +0000 (03:40 +0000)]
R600/SI: Fix not encoding src2 for v_div_scale_{f32|f64}

This apparently got lost in the VI changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229230 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix VOP3b encoding on VI
Matt Arsenault [Sat, 14 Feb 2015 03:02:23 +0000 (03:02 +0000)]
R600/SI: Fix VOP3b encoding on VI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229228 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix phys reg copies in SIFoldOperands
Matt Arsenault [Sat, 14 Feb 2015 02:55:57 +0000 (02:55 +0000)]
R600/SI: Fix phys reg copies in SIFoldOperands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229227 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix copies from SGPR to VCC
Matt Arsenault [Sat, 14 Feb 2015 02:55:56 +0000 (02:55 +0000)]
R600/SI: Fix copies from SGPR to VCC

This shows up without optimizations when vcc is required
to be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229226 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Add hack to copy from a VGPR to VCC
Matt Arsenault [Sat, 14 Feb 2015 02:55:54 +0000 (02:55 +0000)]
R600/SI: Add hack to copy from a VGPR to VCC

This hopefully should be fixed when VReg_1 is removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229225 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPowerPC: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:54:07 +0000 (02:54 +0000)]
PowerPC: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229224 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix size of VReg_1
Matt Arsenault [Sat, 14 Feb 2015 02:51:44 +0000 (02:51 +0000)]
R600/SI: Fix size of VReg_1

This is really a 32-bit register, if we try to check the size of it,
we want 32-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229223 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:45:45 +0000 (02:45 +0000)]
R600: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229222 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMips: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:37:48 +0000 (02:37 +0000)]
Mips: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229221 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARM: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:24:44 +0000 (02:24 +0000)]
ARM: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229220 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAArch64: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:09:06 +0000 (02:09 +0000)]
AArch64: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229218 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-cov: Actually use the command line arguments when reporting
Justin Bogner [Sat, 14 Feb 2015 02:05:05 +0000 (02:05 +0000)]
llvm-cov: Actually use the command line arguments when reporting

This code didn't really make sense as is. If a filename is passed in,
the user obviously wants the coverage *for that file*, not *for
everything*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229217 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-cov: Simplify coverage reports, fixing PR22575 in the process
Justin Bogner [Sat, 14 Feb 2015 02:01:24 +0000 (02:01 +0000)]
llvm-cov: Simplify coverage reports, fixing PR22575 in the process

PR22575 occurred because we were unsafely storing references into a
std::vector. If the vector moved because it grew, we'd be left
iterating through garbage memory. This avoids the issue by simplifying
the logic to gather coverage information as we go, rather than storing
it and iterating over it.

I'm relying on the existing tests showing that this is semantically
NFC, since it's difficult to hit the issue this fixes without
relatively large covered programs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229215 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoX86: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 01:59:52 +0000 (01:59 +0000)]
X86: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229214 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-go: Set $GCCGO instead of putting a gccgo executable on $PATH.
Peter Collingbourne [Sat, 14 Feb 2015 01:45:57 +0000 (01:45 +0000)]
llvm-go: Set $GCCGO instead of putting a gccgo executable on $PATH.

Now that llgo ships its own go command we can rely on it having support for $GCCGO.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229210 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-go: Add flag for specifying path to go command.
Peter Collingbourne [Sat, 14 Feb 2015 01:45:56 +0000 (01:45 +0000)]
llvm-go: Add flag for specifying path to go command.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229209 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 01:44:41 +0000 (01:44 +0000)]
CodeGen: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

Also, add `Function::getFnStackAlignment()`, and canonicalize:

getAttributes().getStackAlignment(AttributeSet::FunctionIndex)
  => getFnStackAlignment()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229208 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Factor out the CMOV pseudo definitions. NFCI.
Ahmed Bougacha [Sat, 14 Feb 2015 01:36:53 +0000 (01:36 +0000)]
[X86] Factor out the CMOV pseudo definitions. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229206 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "On ELF, put PIC jump tables in a non executable section."
Matthias Braun [Sat, 14 Feb 2015 01:16:54 +0000 (01:16 +0000)]
Revert "On ELF, put PIC jump tables in a non executable section."

This reverts commit r228939.

The commit broke something in the output of exception handling tables on
darwin x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229203 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTransforms: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 01:11:29 +0000 (01:11 +0000)]
Transforms: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229202 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Split off a separate module for DebugInfo/PDB/DIA so that its headers
Richard Smith [Sat, 14 Feb 2015 00:47:20 +0000 (00:47 +0000)]
[modules] Split off a separate module for DebugInfo/PDB/DIA so that its headers
don't get included on systems where the DIA SDK is unavailable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229200 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r229185, "Raising minimum required Visual Studio version to 2013."
NAKAMURA Takumi [Sat, 14 Feb 2015 00:45:32 +0000 (00:45 +0000)]
Revert r229185, "Raising minimum required Visual Studio version to 2013."

All builders are not ready yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229199 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUnify the two EH personality classification routines I wrote
Reid Kleckner [Sat, 14 Feb 2015 00:21:02 +0000 (00:21 +0000)]
Unify the two EH personality classification routines I wrote

We only need one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229193 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAnalysis: Canonicalize access to function attributes, NFC
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 00:12:15 +0000 (00:12 +0000)]
Analysis: Canonicalize access to function attributes, NFC

Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229192 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse the template method to grab the target specific subtarget.
Eric Christopher [Sat, 14 Feb 2015 00:09:46 +0000 (00:09 +0000)]
Use the template method to grab the target specific subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229191 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] When canonicalizing gep indices, prefer zext when possible
Philip Reames [Sat, 14 Feb 2015 00:05:36 +0000 (00:05 +0000)]
[InstCombine] When canonicalizing gep indices, prefer zext when possible

If we know that the sign bit of a value being sign extended is zero, we can use a zero extension instead.  This is motivated by the fact that zero extensions are generally cheaper on x86 (and most other architectures?).  We already apply a similar transform in DAGCombine, this just extends that to the IR level.

This comes up when we eagerly canonicalize gep indices to the width of a machine register (i64 on x86_64). To do so, we insert sign extensions (sext) to promote smaller types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229189 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRaising minimum required Visual Studio version to 2013.
Chris Bieneman [Fri, 13 Feb 2015 23:24:14 +0000 (23:24 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229185 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Add DIE selection algorithm.
Frederic Riss [Fri, 13 Feb 2015 23:18:34 +0000 (23:18 +0000)]
[dsymutil] Add DIE selection algorithm.

With this commit, llvm-dsymutil learns how to choose which DIEs
it will link in the final output and which ones it won't. This
is based on the 'valid relocation' information that has been
built in the previous commits.

The test only tests that we choose the right 'root DIEs'. The
selection algorithm (and especially the part that walk the
dependencies of a root DIE) lacks a bit test coverage. This
will be much easier to cover when we output actual Dwarf and
thus can use llvm-dwarfdump to verify the structure of the
emitted DIE trees. I'll add more tests then.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229183 91177308-0d34-0410-b5e6-96231b3b80d8