oota-llvm.git
11 years agoRemove unused, undefined ArgFlagsTy::getArgFlagsString; add a comment about 'returned'
Stephen Lin [Sun, 21 Apr 2013 18:05:20 +0000 (18:05 +0000)]
Remove unused, undefined ArgFlagsTy::getArgFlagsString; add a comment about 'returned'

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

11 years agoSROA: Don't crash on a select with two identical operands.
Benjamin Kramer [Sun, 21 Apr 2013 17:48:39 +0000 (17:48 +0000)]
SROA: Don't crash on a select with two identical operands.

This is an edge case that can happen if we modify a chain of multiple selects.
Update all operands in that case and remove the assert. PR15805.

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

11 years agoRevert "SimplifyCFG: If convert single conditional stores"
Arnold Schwaighofer [Sun, 21 Apr 2013 13:09:04 +0000 (13:09 +0000)]
Revert "SimplifyCFG: If convert single conditional stores"

There is the temptation to make this tranform dependent on target information as
it is not going to be beneficial on all (sub)targets. Therefore, we should
probably do this in MI Early-Ifconversion.

This reverts commit r179957. Original commit message:

"SimplifyCFG: If convert single conditional stores

This transformation will transform a conditional store with a preceeding
uncondtional store to the same location:

a[i] =
may-alias with a[i] load
if (cond)
    a[i] = Y
into an unconditional store.

a[i] = X
may-alias with a[i] load
tmp = cond ? Y : X;
a[i] = tmp

We assume that on average the cost of a mispredicted branch is going to be
higher than the cost of a second store to the same location, and that the
secondary benefits of creating a bigger basic block for other optimizations to
work on outway the potential case were the branch would be correctly predicted
and the cost of the executing the second store would be noticably reflected in
performance.

hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With
this change we are on par with gcc's performance (gcc also performs this
transformation). There was a 1.2 % performance improvement on a ARM swift chip.
Other tests in the test-suite+external seem to be mostly uninfluenced in my
experiments:
This optimization was triggered on 41 tests such that the executable was
different before/after the patch. Only 1 out of the 40 tests (dealII) was
reproducable below 100% (by about .4%). Given that hmmer benefits so much I
believe this to be a fair trade off.

I am going to watch performance numbers across the builtbots and will revert
this if anything unexpected comes up."

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

11 years agoARM: fix part of test which actually needed an asserts build
Tim Northover [Sun, 21 Apr 2013 12:20:19 +0000 (12:20 +0000)]
ARM: fix part of test which actually needed an asserts build

This should fix a buildbot failure that occurred after r179977.

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

11 years agoARM: Use ldrd/strd to spill 64-bit pairs when available.
Tim Northover [Sun, 21 Apr 2013 11:57:07 +0000 (11:57 +0000)]
ARM: Use ldrd/strd to spill 64-bit pairs when available.

This allows common sp-offsets to be part of the instruction and is
probably faster on modern CPUs too.

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

11 years agoRemove the executable bit on cmake files
Sylvestre Ledru [Sun, 21 Apr 2013 09:04:59 +0000 (09:04 +0000)]
Remove the executable bit on cmake files

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

11 years agoSLPVectorize: Add support for vectorization of casts.
Nadav Rotem [Sun, 21 Apr 2013 08:05:59 +0000 (08:05 +0000)]
SLPVectorize: Add support for vectorization of casts.

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

11 years agoSLPVectorizer: Fix a bug in the code that scans the tree in search of nodes with...
Nadav Rotem [Sun, 21 Apr 2013 07:37:56 +0000 (07:37 +0000)]
SLPVectorizer: Fix a bug in the code that scans the tree in search of nodes with multiple users.
We did not terminate the switch case and we executed the search routine twice.

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

11 years ago[objc-arc] Cleaned up tail-call-invariant-enforcement.ll.
Michael Gottesman [Sun, 21 Apr 2013 02:59:44 +0000 (02:59 +0000)]
[objc-arc] Cleaned up tail-call-invariant-enforcement.ll.

Specifically:

1. Added checks that unwind is being properly added to various instructions.
2. Fixed the declaration/calling of objc_release to have a return type of void.
3. Moved all checks to precede the functions and added checks to ensure that the
checks would only match inside the specific function that we are attempting to
check.

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

11 years ago[objc-arc] Check that objc-arc-expand properly handles all strictly forwarding calls...
Michael Gottesman [Sun, 21 Apr 2013 01:57:46 +0000 (01:57 +0000)]
[objc-arc] Check that objc-arc-expand properly handles all strictly forwarding calls and does not touch calls which are not strictly forwarding (i.e. objc_retainBlock).

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

11 years ago[objc-arc] Renamed the test file clang-arc-used-intrinsic-removed-if-isolated.ll...
Michael Gottesman [Sun, 21 Apr 2013 01:42:24 +0000 (01:42 +0000)]
[objc-arc] Renamed the test file clang-arc-used-intrinsic-removed-if-isolated.ll -> intrinsic-use-isolated.ll to match the other test file intrinsic-use.ll.

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

11 years agoRemove tbaa metadata.
Bill Wendling [Sun, 21 Apr 2013 01:38:25 +0000 (01:38 +0000)]
Remove tbaa metadata.

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

11 years agoWhen we strength reduce an objc_retainBlock call to objc_retain, increment NumPeeps...
Michael Gottesman [Sun, 21 Apr 2013 00:50:27 +0000 (00:50 +0000)]
When we strength reduce an objc_retainBlock call to objc_retain, increment NumPeeps and make sure that Changed is set to true.

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

11 years agoFixed comment typo.
Michael Gottesman [Sun, 21 Apr 2013 00:44:46 +0000 (00:44 +0000)]
Fixed comment typo.

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

11 years ago[objc-arc] Fixed typo in debug message.
Michael Gottesman [Sun, 21 Apr 2013 00:30:50 +0000 (00:30 +0000)]
[objc-arc] Fixed typo in debug message.

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

11 years ago[objc-arc] Fixed comment typo.
Michael Gottesman [Sun, 21 Apr 2013 00:25:04 +0000 (00:25 +0000)]
[objc-arc] Fixed comment typo.

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

11 years ago[objc-arc] Refactored OptimizeReturns so that it uses continue instead of a large...
Michael Gottesman [Sun, 21 Apr 2013 00:25:01 +0000 (00:25 +0000)]
[objc-arc] Refactored OptimizeReturns so that it uses continue instead of a large multi-level nested if statement.

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

11 years ago[objc-arc] Added debug statement saying when we are resetting a sequence's progress.
Michael Gottesman [Sat, 20 Apr 2013 23:36:57 +0000 (23:36 +0000)]
[objc-arc] Added debug statement saying when we are resetting a sequence's progress.

This will make it clearer when we are actually resetting a sequence's progress
vs just changing state. This is an important distinction because the former case
clears any pointers that we are tracking while the later does not.

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

11 years agoCompile varargs functions for SPARCv9.
Jakob Stoklund Olesen [Sat, 20 Apr 2013 22:49:16 +0000 (22:49 +0000)]
Compile varargs functions for SPARCv9.

With a little help from the frontend, it looks like the standard va_*
intrinsics can do the job.

Also clean up an old bitcast hack in LowerVAARG that dealt with
unaligned double loads. Load SDNodes can specify an alignment now.

Still missing: Calling varargs functions with float arguments.

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

11 years agoFix PR15800. Do not try to vectorize vectors and structs.
Nadav Rotem [Sat, 20 Apr 2013 22:29:43 +0000 (22:29 +0000)]
Fix PR15800. Do not try to vectorize vectors and structs.

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

11 years agoSimplifyCFG: If convert single conditional stores
Arnold Schwaighofer [Sat, 20 Apr 2013 21:42:09 +0000 (21:42 +0000)]
SimplifyCFG: If convert single conditional stores

This transformation will transform a conditional store with a preceeding
uncondtional store to the same location:

 a[i] =
 may-alias with a[i] load
 if (cond)
   a[i] = Y

into an unconditional store.

 a[i] = X
 may-alias with a[i] load
 tmp = cond ? Y : X;
 a[i] = tmp

We assume that on average the cost of a mispredicted branch is going to be
higher than the cost of a second store to the same location, and that the
secondary benefits of creating a bigger basic block for other optimizations to
work on outway the potential case were the branch would be correctly predicted
and the cost of the executing the second store would be noticably reflected in
performance.

hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With
this change we are on par with gcc's performance (gcc also performs this
transformation). There was a 1.2 % performance improvement on a ARM swift chip.
Other tests in the test-suite+external seem to be mostly uninfluenced in my
experiments:
This optimization was triggered on 41 tests such that the executable was
different before/after the patch. Only 1 out of the 40 tests (dealII) was
reproducable below 100% (by about .4%). Given that hmmer benefits so much I
believe this to be a fair trade off.

I am going to watch performance numbers across the builtbots and will revert
this if anything unexpected comes up.

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

11 years agoARM: don't add FrameIndex offset for LDMIA (has no immediate)
Tim Northover [Sat, 20 Apr 2013 19:31:00 +0000 (19:31 +0000)]
ARM: don't add FrameIndex offset for LDMIA (has no immediate)

Previously, when spilling 64-bit paired registers, an LDMIA with both
a FrameIndex and an offset was produced. This kind of instruction
shouldn't exist, and the extra operand was being confused with the
predicate, causing aborts later on.

This removes the invalid 0-offset from the instruction being
produced.

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

11 years agorecommit tests
Nuno Lopes [Sat, 20 Apr 2013 17:39:52 +0000 (17:39 +0000)]
recommit tests

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

11 years agoMinor renaming of tests (for consistency with an in-development patch)
Stephen Lin [Sat, 20 Apr 2013 16:21:26 +0000 (16:21 +0000)]
Minor renaming of tests (for consistency with an in-development patch)

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

11 years agoAArch64: remove useless comment
Tim Northover [Sat, 20 Apr 2013 15:57:41 +0000 (15:57 +0000)]
AArch64: remove useless comment

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

11 years agoMove 'kw_align' case to proper section, reorganize function attribute keyword case...
Stephen Lin [Sat, 20 Apr 2013 13:16:13 +0000 (13:16 +0000)]
Move 'kw_align' case to proper section, reorganize function attribute keyword case statements to be consistent with r179119

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

11 years agoRemove unused ShouldFoldAtomicFences flag.
Tim Northover [Sat, 20 Apr 2013 12:32:43 +0000 (12:32 +0000)]
Remove unused ShouldFoldAtomicFences flag.

I think it's almost impossible to fold atomic fences profitably under
LLVM/C++11 semantics. As a result, this is now unused and just
cluttering up the target interface.

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

11 years agoRemove unused MEMBARRIER DAG node; it's been replaced by ATOMIC_FENCE.
Tim Northover [Sat, 20 Apr 2013 12:32:17 +0000 (12:32 +0000)]
Remove unused MEMBARRIER DAG node; it's been replaced by ATOMIC_FENCE.

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

11 years agoRemove dead code.
Rafael Espindola [Sat, 20 Apr 2013 11:06:34 +0000 (11:06 +0000)]
Remove dead code.

This is part of a future patch to use yamlio that incorrectly ended up in a
cleanup patch.

Thanks to Benjamin Kramer for reporting it.

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

11 years agoDon't litter .s files in test directory.
Benjamin Kramer [Sat, 20 Apr 2013 10:43:40 +0000 (10:43 +0000)]
Don't litter .s files in test directory.

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

11 years agoVecUtils: Clean up uses of dyn_cast.
Benjamin Kramer [Sat, 20 Apr 2013 10:36:17 +0000 (10:36 +0000)]
VecUtils: Clean up uses of dyn_cast.

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

11 years agoSLPVectorizer: Strength reduce SmallVectors to ArrayRefs.
Benjamin Kramer [Sat, 20 Apr 2013 09:49:10 +0000 (09:49 +0000)]
SLPVectorizer: Strength reduce SmallVectors to ArrayRefs.

Avoids a couple of copies and allows more flexibility in the clients.

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

11 years agoSLPVectorizer: Reduce the compile time by eliminating the search for some of the...
Nadav Rotem [Sat, 20 Apr 2013 07:29:34 +0000 (07:29 +0000)]
SLPVectorizer: Reduce the compile time by eliminating the search for some of the more expensive patterns. After this change will only check basic arithmetic trees that start at cmpinstr.

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

11 years agorefactor tryToVectorizePair to a new method that supports vectorization of lists.
Nadav Rotem [Sat, 20 Apr 2013 07:22:58 +0000 (07:22 +0000)]
refactor tryToVectorizePair to a new method that supports vectorization of lists.

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

11 years agoFix an unused variable warning.
Nadav Rotem [Sat, 20 Apr 2013 06:40:28 +0000 (06:40 +0000)]
Fix an unused variable warning.

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

11 years agoSLPVectorizer: Improve the cost model for loop invariant broadcast values.
Nadav Rotem [Sat, 20 Apr 2013 06:13:47 +0000 (06:13 +0000)]
SLPVectorizer: Improve the cost model for loop invariant broadcast values.

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

11 years agoReport the number of stores that were found in the debug message.
Nadav Rotem [Sat, 20 Apr 2013 05:23:11 +0000 (05:23 +0000)]
Report the number of stores that were found in the debug message.

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

11 years agoFix the header comment.
Nadav Rotem [Sat, 20 Apr 2013 05:18:51 +0000 (05:18 +0000)]
Fix the header comment.

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

11 years agoUse 64bit arithmetic for calculating distance between pointers.
Nadav Rotem [Sat, 20 Apr 2013 05:17:47 +0000 (05:17 +0000)]
Use 64bit arithmetic for calculating distance between pointers.

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

11 years agoMove PPC getSwappedPredicate for reuse
Hal Finkel [Sat, 20 Apr 2013 05:16:26 +0000 (05:16 +0000)]
Move PPC getSwappedPredicate for reuse

The getSwappedPredicate function can be used in other places (such as in
improvements to the PPCCTRLoops pass). Instead of trapping it as a static
function in PPCInstrInfo, move it into PPCPredicates with other
predicate-related things.

No functionality change intended.

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

11 years agoAdd CodeGen support for functions that always return arguments via a new parameter...
Stephen Lin [Sat, 20 Apr 2013 05:14:40 +0000 (05:14 +0000)]
Add CodeGen support for functions that always return arguments via a new parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter).

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

11 years agoAllow tail call opportunity detection through nested and/or multiple iterations of...
Stephen Lin [Sat, 20 Apr 2013 04:27:51 +0000 (04:27 +0000)]
Allow tail call opportunity detection through nested and/or multiple iterations of extractelement/insertelement indirection

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

11 years agoThese can be void.
Rafael Espindola [Sat, 20 Apr 2013 03:33:09 +0000 (03:33 +0000)]
These can be void.

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

11 years agoRename obj2yaml local namespace to avoid conflicts with llvm::yaml.
Rafael Espindola [Sat, 20 Apr 2013 03:16:59 +0000 (03:16 +0000)]
Rename obj2yaml local namespace to avoid conflicts with llvm::yaml.

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

11 years agoRemove local namespace yaml to avoid confusion with llvm::yaml.
Rafael Espindola [Sat, 20 Apr 2013 03:13:00 +0000 (03:13 +0000)]
Remove local namespace yaml to avoid confusion with llvm::yaml.

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

11 years agoSmall obj2yaml cleanups.
Rafael Espindola [Sat, 20 Apr 2013 02:55:00 +0000 (02:55 +0000)]
Small obj2yaml cleanups.

* using namespace llvm.
* whitespace.
* early return.

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

11 years agoRemove COFFYAML::Header.
Rafael Espindola [Sat, 20 Apr 2013 02:02:25 +0000 (02:02 +0000)]
Remove COFFYAML::Header.

Instead, use MappingNormalization to directly parse COFF::header. Also change
the naming convention of the helper classes to be a bit shorter.

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

11 years agoTest commit
Stephen Lin [Sat, 20 Apr 2013 00:47:48 +0000 (00:47 +0000)]
Test commit

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

11 years agoSimplify the code in FastISel::tryToFoldLoad, add an assertion and fix a comment.
Eli Bendersky [Fri, 19 Apr 2013 23:26:18 +0000 (23:26 +0000)]
Simplify the code in FastISel::tryToFoldLoad, add an assertion and fix a comment.

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

11 years ago[mips] Instruction selection patterns for DSP-ASE vector shifts.
Akira Hatanaka [Fri, 19 Apr 2013 23:21:32 +0000 (23:21 +0000)]
[mips] Instruction selection patterns for DSP-ASE vector shifts.

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

11 years agoMergeFunc: Make pointer and integer types generate the same hash.
Benjamin Kramer [Fri, 19 Apr 2013 23:06:44 +0000 (23:06 +0000)]
MergeFunc: Make pointer and integer types generate the same hash.

The logic that actually compares the types considers pointers and integers the
same if they are of the same size. This created a strange mismatch between hash
and reality and made the test case for this fail on some platforms (yay,
test cases).

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

11 years agoMake variable match any name.
Bill Wendling [Fri, 19 Apr 2013 22:30:43 +0000 (22:30 +0000)]
Make variable match any name.

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

11 years agoMove TryToFoldFastISelLoad to FastISel, where it belongs. In general, I'm
Eli Bendersky [Fri, 19 Apr 2013 22:29:18 +0000 (22:29 +0000)]
Move TryToFoldFastISelLoad to FastISel, where it belongs. In general, I'm
trying to move as much FastISel logic as possible out of the main path in
SelectionDAGISel - intermixing them just adds confusion.

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

11 years agoArrayRefize getMachineNode(). No functionality change.
Michael Liao [Fri, 19 Apr 2013 22:22:57 +0000 (22:22 +0000)]
ArrayRefize getMachineNode(). No functionality change.

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

11 years agoFix PPC optimizeCompareInstr swapped-sub argument handling
Hal Finkel [Fri, 19 Apr 2013 22:08:38 +0000 (22:08 +0000)]
Fix PPC optimizeCompareInstr swapped-sub argument handling

When matching a compare with a subtract where the arguments of the compare are
swapped w.r.t. the arguments of the subtract, we need to negate the predicates
(or CR bit indices) of the users. This, however, is not the same as inverting
the predicate (negating LT -> GT, but inverting LT -> GE, for example). The ARM
backend seems to do this correctly, but when I adapted the code for the PPC
backend, I introduced an error in this logic.

Comparison optimization is now enabled again by default.

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

11 years agoAdd an MRI::verifyUseLists() function.
Jakob Stoklund Olesen [Fri, 19 Apr 2013 21:40:57 +0000 (21:40 +0000)]
Add an MRI::verifyUseLists() function.

This checks the sanity of the register use lists in the MI intermediate
representation.

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

11 years agoUse dbgs() consistently for -debug printouts
Eli Bendersky [Fri, 19 Apr 2013 21:37:07 +0000 (21:37 +0000)]
Use dbgs() consistently for -debug printouts

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

11 years agoRemove COFFYAML::Relocation.
Rafael Espindola [Fri, 19 Apr 2013 21:28:07 +0000 (21:28 +0000)]
Remove COFFYAML::Relocation.

Use MappingNormalization to read a COFF::relocation directly.

No functionality change.

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

11 years agoTry explicitly setting the target triple to see if this gets it to pass on ARM.
Bill Wendling [Fri, 19 Apr 2013 21:24:51 +0000 (21:24 +0000)]
Try explicitly setting the target triple to see if this gets it to pass on ARM.

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

11 years agoDo not mangle in MS-way the globals with magic \001 in the name.
Anton Korobeynikov [Fri, 19 Apr 2013 21:20:56 +0000 (21:20 +0000)]
Do not mangle in MS-way the globals with magic \001 in the name.
Based on the patch by David Nadlinger!

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

11 years agoMake test slightly more readable.
Bill Wendling [Fri, 19 Apr 2013 21:14:59 +0000 (21:14 +0000)]
Make test slightly more readable.

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

11 years agoAdd a testcase to make sure we generate the proper compact unwind section for a funct...
Bill Wendling [Fri, 19 Apr 2013 21:07:11 +0000 (21:07 +0000)]
Add a testcase to make sure we generate the proper compact unwind section for a function that cannot produce a compact unwind encoding.

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

11 years agoLoopVectorizer: Use matcher from PatternMatch.h for the min/max patterns
Arnold Schwaighofer [Fri, 19 Apr 2013 21:03:36 +0000 (21:03 +0000)]
LoopVectorizer: Use matcher from PatternMatch.h for the min/max patterns

Also make some static function class functions to avoid having to mention the
class namespace for enums all the time.

No functionality change intended.

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

11 years ago80-col fixup.
Eric Christopher [Fri, 19 Apr 2013 20:37:12 +0000 (20:37 +0000)]
80-col fixup.

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

11 years agoReformat and nuke trailing whitespace.
Eric Christopher [Fri, 19 Apr 2013 20:37:09 +0000 (20:37 +0000)]
Reformat and nuke trailing whitespace.

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

11 years agoRename ClassType to the more accurate UnderlyingType and document its purpose.
Adrian Prantl [Fri, 19 Apr 2013 19:56:02 +0000 (19:56 +0000)]
Rename ClassType to the more accurate UnderlyingType and document its purpose.
rdar://problem/13463793

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

11 years ago[ms-inline asm] Make code layout more canonical with iniline asm handled last.
Chad Rosier [Fri, 19 Apr 2013 19:29:50 +0000 (19:29 +0000)]
[ms-inline asm] Make code layout more canonical with iniline asm handled last.

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

11 years agoAttempt to pacify this test for the buildbots.
Chad Rosier [Fri, 19 Apr 2013 19:27:33 +0000 (19:27 +0000)]
Attempt to pacify this test for the buildbots.

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

11 years ago[mips] First patch which adds support for micromips.
Akira Hatanaka [Fri, 19 Apr 2013 19:03:11 +0000 (19:03 +0000)]
[mips] First patch which adds support for micromips.

This patch adds support for recoded (meaning assembly-language compatible to
standard mips32) arithmetic 32-bit instructions.

Patch by Zoran Jovanovic.

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

11 years ago[mips] Fix InstAlias of XOR and OR macros. Set EmitAlias flag and change
Akira Hatanaka [Fri, 19 Apr 2013 18:47:40 +0000 (18:47 +0000)]
[mips] Fix InstAlias of XOR and OR macros. Set EmitAlias flag and change
operand type to uimm16.

Patch by Vladimir Medic.

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

11 years ago[ms-inline asm] Refactor the parsing of identifiers. No functional change
Chad Rosier [Fri, 19 Apr 2013 18:39:50 +0000 (18:39 +0000)]
[ms-inline asm] Refactor the parsing of identifiers.  No functional change
indended.
Part of rdar://13663589

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

11 years agoAdd test to make sure that a int-to-ptr can be merged correctly.
Bill Wendling [Fri, 19 Apr 2013 18:16:06 +0000 (18:16 +0000)]
Add test to make sure that a int-to-ptr can be merged correctly.

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

11 years ago[ms-inline asm] Remove these asserts. C++ variables that use namespace
Chad Rosier [Fri, 19 Apr 2013 17:37:05 +0000 (17:37 +0000)]
[ms-inline asm] Remove these asserts. C++ variables that use namespace
qualifiers don't necessarily begin with an identifier (e.g., ::foo::bar).

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

11 years ago[ms-inline asm] Move this variable into the scope in which it is used.
Chad Rosier [Fri, 19 Apr 2013 17:32:29 +0000 (17:32 +0000)]
[ms-inline asm] Move this variable into the scope in which it is used.

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

11 years ago[ms-inline asm] Make this a hard error.
Chad Rosier [Fri, 19 Apr 2013 17:31:39 +0000 (17:31 +0000)]
[ms-inline asm] Make this a hard error.

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

11 years agoConstantFolding: ComputeMaskedBits wants the scalar size for vectors.
Benjamin Kramer [Fri, 19 Apr 2013 16:56:24 +0000 (16:56 +0000)]
ConstantFolding: ComputeMaskedBits wants the scalar size for vectors.

Fixes PR15791.

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

11 years ago[ms-inline asm] Cleanup the dot operator implementation.
Chad Rosier [Fri, 19 Apr 2013 15:57:00 +0000 (15:57 +0000)]
[ms-inline asm] Cleanup the dot operator implementation.

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

11 years agoARM: Permit "sp" in ARM variant of STREXD instructions
Tim Northover [Fri, 19 Apr 2013 15:44:32 +0000 (15:44 +0000)]
ARM: Permit "sp" in ARM variant of STREXD instructions

Patch from Mihail Popa

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

11 years agorefactor the struct byte swapping to a helper function.
Rafael Espindola [Fri, 19 Apr 2013 13:45:05 +0000 (13:45 +0000)]
refactor the struct byte swapping to a helper function.

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

11 years agoOnly run the tests in test/Object/ARM if we have ARM support.
Rafael Espindola [Fri, 19 Apr 2013 12:47:53 +0000 (12:47 +0000)]
Only run the tests in test/Object/ARM if we have ARM support.

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

11 years agoAttributes: Don't print trailing whitespace on the function attribute comment.
Benjamin Kramer [Fri, 19 Apr 2013 11:43:21 +0000 (11:43 +0000)]
Attributes: Don't print trailing whitespace on the function attribute comment.

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

11 years agoDon't read one command past the end.
Rafael Espindola [Fri, 19 Apr 2013 11:36:47 +0000 (11:36 +0000)]
Don't read one command past the end.

Thanks to Evgeniy Stepanov for reporting this.

It might be a good idea to add a command iterator abstraction to MachO.h, but
this fixes the bug for now.

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

11 years agoARM: permit "sp" in ARM variants of MOVW/MOVT instructions
Tim Northover [Fri, 19 Apr 2013 09:58:09 +0000 (09:58 +0000)]
ARM: permit "sp" in ARM variants of MOVW/MOVT instructions

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

11 years agoRevert 179826. Tests were worthless.
Jakub Staszak [Fri, 19 Apr 2013 09:32:30 +0000 (09:32 +0000)]
Revert 179826. Tests were worthless.

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

11 years agoRevert "PR14606: debug info imported_module support"
Eric Christopher [Fri, 19 Apr 2013 07:47:16 +0000 (07:47 +0000)]
Revert "PR14606: debug info imported_module support"

This reverts commit r179836 as it seems to have caused test failures.

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

11 years agoPR14606: debug info imported_module support
David Blaikie [Fri, 19 Apr 2013 06:57:04 +0000 (06:57 +0000)]
PR14606: debug info imported_module support

Adding another CU-wide list, in this case of imported_modules (since they
should be relatively rare, it seemed better to add a list where each element
had a "context" value, rather than add a (usually empty) list to every scope).
This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll
need to expand this to cover DW_TAG_imported_declaration too.

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

11 years agoAdd support for index resources (for a SlotIndex) to be relinquished.
Lang Hames [Fri, 19 Apr 2013 04:31:49 +0000 (04:31 +0000)]
Add support for index resources (for a SlotIndex) to be relinquished.

When the SlotIndexes pass was introduced it was intended to support insertion
of code during register allocation. Removal of code was a minor consideration
(and raised the question of what to do about dangling SlotIndex objects pointing
to the erased index), so I opted to keep all indexes around indefinitely and
simply null out those that weren't being used.

Nowadays people are moving more code around (e.g. via HandleMove), which means
more zombie indexes. I want to start killing off indexes when we're done with
them to reclaim the resources they use up.

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

11 years agoUse 'array_lengthof' as possible to avoid magic numbers
Michael Liao [Fri, 19 Apr 2013 04:03:37 +0000 (04:03 +0000)]
Use 'array_lengthof' as possible to avoid magic numbers

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

11 years agoR600: Add pattern for the BFI_INT instruction
Tom Stellard [Fri, 19 Apr 2013 02:11:06 +0000 (02:11 +0000)]
R600: Add pattern for the BFI_INT instruction

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

11 years agoR600/SI: Use InstFlag for VOP3 modifier operands
Tom Stellard [Fri, 19 Apr 2013 02:11:00 +0000 (02:11 +0000)]
R600/SI: Use InstFlag for VOP3 modifier operands

InstFlag has a default value of 0 and will simplify the VOP3 patterns.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179829 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Reorganize lit tests and document how they should be organized
Tom Stellard [Fri, 19 Apr 2013 02:10:53 +0000 (02:10 +0000)]
R600: Reorganize lit tests and document how they should be organized

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

11 years agoKeep coding stanard. Don't use "else if" after "return".
Jakub Staszak [Fri, 19 Apr 2013 01:18:04 +0000 (01:18 +0000)]
Keep coding stanard. Don't use "else if" after "return".

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

11 years agoDon't run expensive -O2 and -O3 in tests.
Jakub Staszak [Fri, 19 Apr 2013 01:10:45 +0000 (01:10 +0000)]
Don't run expensive -O2 and -O3 in tests.

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

11 years agoAdd some more stats for fast isel vs. SelectionDAG, w.r.t lowering function
Eli Bendersky [Fri, 19 Apr 2013 01:04:40 +0000 (01:04 +0000)]
Add some more stats for fast isel vs. SelectionDAG, w.r.t lowering function
arguments in entry BBs.

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

11 years agoUse an enum instead of magic constants to improve readability.
Bill Wendling [Fri, 19 Apr 2013 00:05:59 +0000 (00:05 +0000)]
Use an enum instead of magic constants to improve readability.

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

11 years agoImplement a better fix for PR15185.
Bill Wendling [Thu, 18 Apr 2013 23:34:17 +0000 (23:34 +0000)]
Implement a better fix for PR15185.

If the return type is a pointer and the call returns an integer, then do the
inttoptr convertions. And vice versa.

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

11 years agoRelax this assert. It may not hold in all cases.
Bill Wendling [Thu, 18 Apr 2013 23:16:46 +0000 (23:16 +0000)]
Relax this assert. It may not hold in all cases.

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

11 years ago[ms-inline asm] Apply the condition code mnemonic aliases to both the Intel and
Chad Rosier [Thu, 18 Apr 2013 23:16:12 +0000 (23:16 +0000)]
[ms-inline asm] Apply the condition code mnemonic aliases to both the Intel and
AT&T dialect.  Test case for r179804 as well.
rdar://13674398 and PR13340.

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

11 years agoAssert if we're trying to generate a null compact unwind entry.
Bill Wendling [Thu, 18 Apr 2013 22:56:05 +0000 (22:56 +0000)]
Assert if we're trying to generate a null compact unwind entry.

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

11 years agoSet the compact unwind encoding to 'requires EH DWARF' if we cannot generate a CU...
Bill Wendling [Thu, 18 Apr 2013 22:55:29 +0000 (22:55 +0000)]
Set the compact unwind encoding to 'requires EH DWARF' if we cannot generate a CU encoding.

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