]> granicus.if.org Git - llvm/log
llvm
10 years agoMerging r214517:
Hal Finkel [Tue, 9 Dec 2014 02:09:06 +0000 (02:09 +0000)]
Merging r214517:
------------------------------------------------------------------------
r214517 | uweigand | 2014-08-01 14:35:58 +0000 (Fri, 01 Aug 2014) | 8 lines

[PowerPC] PR20280 - Slots for byval parameters are not immutable

Found by inspection while looking at PR20280: code would mark slots
in the parameter save area where a byval parameter is passed as
"immutable".  This is not correct since code is allowed to modify
byval parameters in place in the parameter save area.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223736 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r215793:
Hal Finkel [Tue, 9 Dec 2014 01:56:18 +0000 (01:56 +0000)]
Merging r215793:
------------------------------------------------------------------------
r215793 | hfinkel | 2014-08-16 00:16:29 +0000 (Sat, 16 Aug 2014) | 9 lines

[PowerPC] Darwin byval arguments are not immutable

On PPC/Darwin, byval arguments occur at fixed stack offsets in the callee's
frame, but are not immutable -- the pointer value is directly available to the
higher-level code as the address of the argument, and the value of the byval
argument can be modified at the IR level.

This is necessary, but not sufficient, to fix PR20280. When PR20280 is fixed in
a follow-up commit, its test case will cover this change.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223735 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r213960:
Hal Finkel [Tue, 9 Dec 2014 01:53:54 +0000 (01:53 +0000)]
Merging r213960:
------------------------------------------------------------------------
r213960 | hfinkel | 2014-07-25 17:47:22 +0000 (Fri, 25 Jul 2014) | 3 lines

[PowerPC] Support TLS on PPC32/ELF

Patch by Justin Hibbits!
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223734 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223500 (this time for real):
Duncan P. N. Exon Smith [Mon, 8 Dec 2014 23:29:14 +0000 (23:29 +0000)]
Merging r223500 (this time for real):
------------------------------------------------------------------------
r223500 | dexonsmith | 2014-12-05 11:13:42 -0800 (Fri, 05 Dec 2014) | 9 lines

BFI: Saturate when combining edges to a successor

When a loop gets bundled up, its outgoing edges are quite large, and can
just barely overflow 64-bits.  If one successor has multiple incoming
edges -- and that successor is getting all the incoming mass --
combining just its edges can overflow.  Handle that by saturating rather
than asserting.

This fixes PR21622.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223716 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReverting r223712; apparently I don't understand SVN
Duncan P. N. Exon Smith [Mon, 8 Dec 2014 23:22:11 +0000 (23:22 +0000)]
Reverting r223712; apparently I don't understand SVN

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223713 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223500:
Duncan P. N. Exon Smith [Mon, 8 Dec 2014 23:18:00 +0000 (23:18 +0000)]
Merging r223500:
------------------------------------------------------------------------
r223500 | dexonsmith | 2014-12-05 11:13:42 -0800 (Fri, 05 Dec 2014) | 9 lines

BFI: Saturate when combining edges to a successor

When a loop gets bundled up, its outgoing edges are quite large, and can
just barely overflow 64-bits.  If one successor has multiple incoming
edges -- and that successor is getting all the incoming mass --
combining just its edges can overflow.  Handle that by saturating rather
than asserting.

This fixes PR21622.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223712 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r221318:
David Majnemer [Mon, 8 Dec 2014 09:16:46 +0000 (09:16 +0000)]
Merging r221318:
------------------------------------------------------------------------
r221318 | majnemer | 2014-11-04 15:49:08 -0800 (Tue, 04 Nov 2014) | 10 lines

Analysis: Make isSafeToSpeculativelyExecute fire less for divides

Divides and remainder operations do not behave like other operations
when they are given poison: they turn into undefined behavior.

It's really hard to know if the operands going into a div are or are not
poison.  Because of this, we should only choose to speculate if there
are constant operands which we can easily reason about.

This fixes PR21412.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223647 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoI did not intend to merge these in.
David Majnemer [Mon, 8 Dec 2014 09:15:41 +0000 (09:15 +0000)]
I did not intend to merge these in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223646 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r215818:
David Majnemer [Mon, 8 Dec 2014 09:11:48 +0000 (09:11 +0000)]
Merging r215818:
------------------------------------------------------------------------
r215818 | majnemer | 2014-08-16 02:23:42 -0700 (Sat, 16 Aug 2014) | 12 lines

InstCombine: Fix a potential bug in 0 - (X sdiv C)  -> (X sdiv -C)

While *most* (X sdiv 1) operations will get caught by InstSimplify, it
is still possible for a sdiv to appear in the worklist which hasn't been
simplified yet.

This means that it is possible for 0 - (X sdiv 1) to get transformed
into (X sdiv -1); dividing by -1 can make the transform produce undef
values instead of the proper result.

Sorry for the lack of testcase, it's a bit problematic because it relies
on the exact order of operations in the worklist.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223645 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r214385:
David Majnemer [Mon, 8 Dec 2014 09:11:36 +0000 (09:11 +0000)]
Merging r214385:
------------------------------------------------------------------------
r214385 | majnemer | 2014-07-30 21:49:29 -0700 (Wed, 30 Jul 2014) | 9 lines

InstCombine: Correctly propagate NSW/NUW for x-(-A) -> x+A

We can only propagate the nsw bits if both subtraction instructions are
marked with the appropriate bit.

N.B.  We only propagate the nsw bit in InstCombine because the nuw case
is already handled in InstSimplify.

This fixes PR20189.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223644 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix merge conflict & minor test output differences
David Majnemer [Mon, 8 Dec 2014 09:10:57 +0000 (09:10 +0000)]
Fix merge conflict & minor test output differences

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223643 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r222500:
David Majnemer [Mon, 8 Dec 2014 08:54:39 +0000 (08:54 +0000)]
Merging r222500:
------------------------------------------------------------------------
r222500 | majnemer | 2014-11-20 18:37:38 -0800 (Thu, 20 Nov 2014) | 1 line

This Reassociate change unintentionally slipped in r222499
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223640 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r216891:
David Majnemer [Mon, 8 Dec 2014 08:53:47 +0000 (08:53 +0000)]
Merging r216891:
------------------------------------------------------------------------
r216891 | majnemer | 2014-09-01 14:20:14 -0700 (Mon, 01 Sep 2014) | 12 lines

SROA: Don't insert instructions before a PHI

SROA may decide that it needs to insert a bitcast and would set it's
insertion point before a PHI.  This will create an invalid module
right quick.

Instead, choose the first insertion point in the basic block that holds
our PHI.

This fixes PR20822.

Differential Revision: http://reviews.llvm.org/D5141
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223639 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r217115:
David Majnemer [Mon, 8 Dec 2014 08:50:39 +0000 (08:50 +0000)]
Merging r217115:
------------------------------------------------------------------------
r217115 | majnemer | 2014-09-03 17:23:13 -0700 (Wed, 03 Sep 2014) | 3 lines

IndVarSimplify: Address review comments for r217102

No functional change intended, just some cleanups and comments added.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223638 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging rr217102:
David Majnemer [Mon, 8 Dec 2014 08:50:22 +0000 (08:50 +0000)]
Merging rr217102:
------------------------------------------------------------------------
r217102 | majnemer | 2014-09-03 16:03:18 -0700 (Wed, 03 Sep 2014) | 11 lines

IndVarSimplify: Don't let LFTR compare against a poison value

LinearFunctionTestReplace tries to use the *next* indvar to compare
against when possible.  However, it may be the case that the calculation
for the next indvar has NUW/NSW flags and that it may only be safely
used inside the loop.  Using it in a comparison to calculate the exit
condition could result in observing poison.

This fixes PR20680.

Differential Revision: http://reviews.llvm.org/D5174
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223637 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging rr221501:
David Majnemer [Mon, 8 Dec 2014 08:49:20 +0000 (08:49 +0000)]
Merging rr221501:
------------------------------------------------------------------------
r221501 | majnemer | 2014-11-06 16:31:14 -0800 (Thu, 06 Nov 2014) | 7 lines

LoopVectorize: Don't assume pointees are sized

A pointer's pointee might not be sized: the pointee could be a function.

Report this as IK_NoInduction when calculating isInductionVariable.

This fixes PR21508.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223636 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging rr222376:
David Majnemer [Mon, 8 Dec 2014 08:48:58 +0000 (08:48 +0000)]
Merging rr222376:
------------------------------------------------------------------------
r222376 | majnemer | 2014-11-19 11:36:18 -0800 (Wed, 19 Nov 2014) | 3 lines

AliasSet: Simplify mergeSetIn

No functional change intended.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223635 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r222338:
David Majnemer [Mon, 8 Dec 2014 08:48:09 +0000 (08:48 +0000)]
Merging r222338:
------------------------------------------------------------------------
r222338 | majnemer | 2014-11-19 01:41:05 -0800 (Wed, 19 Nov 2014) | 16 lines

AliasSetTracker: UnknownInsts should contribute to the refcount

AliasSetTracker::addUnknown may create an AliasSet devoid of pointers
just to contain an instruction if no suitable AliasSet already exists.
It will then AliasSet::addUnknownInst and we will be done.

However, it's possible for addUnknown to choose an existing AliasSet to
addUnknownInst.
If this were to occur, we are in a bit of a pickle: removing pointers
from the AliasSet can cause the entire AliasSet to become destroyed,
taking our unknown instructions out with them.

Instead, keep track whether or not our AliasSet has any unknown
instructions.

This fixes PR21582.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223627 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r215169:
Daniel Sanders [Sat, 6 Dec 2014 10:34:51 +0000 (10:34 +0000)]
Merging r215169:
------------------------------------------------------------------------
r215169 | ghoflehner | 2014-08-08 00:19:55 +0100 (Fri, 08 Aug 2014) | 2 lines

Fix for multi-line comment warning

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223582 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r220360:
Daniel Sanders [Sat, 6 Dec 2014 10:34:24 +0000 (10:34 +0000)]
Merging r220360:
------------------------------------------------------------------------
r220360 | filcab | 2014-10-22 03:16:06 +0100 (Wed, 22 Oct 2014) | 5 lines

Silence gcc's -Wcomment

gcc's (4.7, I think) -Wcomment warning is not "as smart" as clang's and
warns even if the line right after the backslash-newline sequence only has
a line comment that starts at the beginning of the line.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223581 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223171:
Michael Zolotukhin [Fri, 5 Dec 2014 22:31:29 +0000 (22:31 +0000)]
Merging r223171:

PR21302. Vectorize only bottom-tested loops.

rdar://problem/18886083

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223535 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223170:
Michael Zolotukhin [Fri, 5 Dec 2014 22:29:16 +0000 (22:29 +0000)]
Merging r223170:

Apply loop-rotate to several vectorizer tests.

Such loops shouldn't be vectorized due to the loops form.
After applying loop-rotate (+simplifycfg) the tests again start to check
what they are intended to check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223534 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r221009:
Michael Zolotukhin [Fri, 5 Dec 2014 22:17:26 +0000 (22:17 +0000)]
Merging r221009:

Correctly update dom-tree after loop vectorizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223531 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd the big-endian O32 small structures bugfix to the Mips release notes.
Daniel Sanders [Fri, 5 Dec 2014 11:06:13 +0000 (11:06 +0000)]
Add the big-endian O32 small structures bugfix to the Mips release notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223459 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223148:
Daniel Sanders [Fri, 5 Dec 2014 10:20:37 +0000 (10:20 +0000)]
Merging r223148:
------------------------------------------------------------------------
r223148 | dsanders | 2014-12-02 20:40:27 +0000 (Tue, 02 Dec 2014) | 17 lines

[mips] Fix passing of small structures for big-endian O32.

Summary:
Like N32/N64, they must be passed in the upper bits of the register.

The new code could be merged with the existing if-statements but I've
refrained from doing this since it will make porting the O32 implementation
to tablegen harder later.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223457 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223055:
Tim Northover [Thu, 4 Dec 2014 22:59:55 +0000 (22:59 +0000)]
Merging r223055:

ARM: lower tail calls correctly when using GHC calling convention.

Patch by Ben Gamari.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223406 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r223163:
Duncan P. N. Exon Smith [Wed, 3 Dec 2014 18:17:15 +0000 (18:17 +0000)]
Merging r223163:
------------------------------------------------------------------------
r223163 | cmatthews | 2014-12-02 14:19:21 -0800 (Tue, 02 Dec 2014) | 5 lines

Give lit a --xunit-xml-output option for saving results in xunit format

  --xunit-xml-output saves test results to disk in JUnit's xml format. This will allow Jenkins to report the details of a lit run.

  Based on a patch by David Chisnall.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223250 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMoved [ASZ]ExtUpper to the end of the CCValAssign::LocInfo enum.
Daniel Sanders [Wed, 3 Dec 2014 17:21:26 +0000 (17:21 +0000)]
Moved [ASZ]ExtUpper to the end of the CCValAssign::LocInfo enum.

This makes the 3.5.1 version of libLLVM-3.5.so compatible with the 3.5.0 version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223242 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded release notes for the Mips target.
Daniel Sanders [Wed, 3 Dec 2014 13:43:39 +0000 (13:43 +0000)]
Added release notes for the Mips target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223231 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221604:
Daniel Sanders [Mon, 1 Dec 2014 19:38:20 +0000 (19:38 +0000)]
Merged from r221604:

[mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223070 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221534:
Daniel Sanders [Mon, 1 Dec 2014 19:33:33 +0000 (19:33 +0000)]
Merged from r221534:

[mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit structs...

Summary:
... and after all that refactoring, it's possible to distinguish softfloat
floating point values from integers so this patch no longer breaks softfloat to
do it.

Remove direct handling of i32's in the N32/N64 ABI by promoting them to
i64. This more closely reflects the ABI documentation and also fixes
problems with stack arguments on big-endian targets.

We now rely on signext/zeroext annotations (already generated by clang) and
the Assert[SZ]ext nodes to avoid the introduction of unnecessary sign/zero
extends.

It was not possible to convert three tests to use signext/zeroext. These tests
are bswap.ll, ctlz-v.ll, ctlz-v.ll. It's not possible to put signext on a
vector type so we just accept the sign extends here for now. These tests don't
pass the vectors the same way clang does (clang puts multiple elements in the
same argument, these map 1 element to 1 argument) so we don't need to worry too
much about it.

With this patch, all known N32/N64 bugs should be fixed and we now pass the
first 10,000 tests generated by ABITestGen.py.

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223069 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221529:
Daniel Sanders [Mon, 1 Dec 2014 19:02:59 +0000 (19:02 +0000)]
Merged from r221529:

[mips] Removed the remainder of MipsCC. NFC.

Summary:
One of the calls to AllocateStack (the one in LowerCall) doesn't look like
it should be there but it was there before and removing it breaks the
frame size calculation.

Reviewers: vmedic, theraven

Reviewed By: theraven

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223065 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221528:
Daniel Sanders [Mon, 1 Dec 2014 18:57:45 +0000 (18:57 +0000)]
Merged from r221528:

[mips] Remove MipsCC::reservedArgArea() in favour of MipsABIInfo::GetCalleeAllocdArgSizeInBytes(). NFC.

Summary:

Reviewers: theraven, vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223063 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221527:
Daniel Sanders [Mon, 1 Dec 2014 18:52:41 +0000 (18:52 +0000)]
Merged from r221527:

MipsCCState.h: Use LLVM_DELETED_FUNCTION for msc17.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223062 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221525:
Daniel Sanders [Mon, 1 Dec 2014 18:48:22 +0000 (18:48 +0000)]
Merged from r221525:

[mips] Move MipsCCState to a separate file and clang-formatted it.

Summary:

Reviewers: theraven, vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223061 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221522:
Daniel Sanders [Mon, 1 Dec 2014 18:43:35 +0000 (18:43 +0000)]
Merged from r221522:

[mips] Fix unused variable warnings introduced in r221521

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223058 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221521:
Daniel Sanders [Mon, 1 Dec 2014 17:14:37 +0000 (17:14 +0000)]
Merged from r221521:

[mips] Remove remaining use of MipsCC::intArgRegs() in favour of MipsABIInfo::GetByValArgRegs() and MipsABIInfo::GetVarArgRegs()

Summary:

Reviewers: theraven, vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223053 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221519:
Daniel Sanders [Mon, 1 Dec 2014 17:12:32 +0000 (17:12 +0000)]
Merged from r221519:

[mips] Remove MipsCC::getRegVT(). NFC

Summary: It's no longer used.

Reviewers: vmedic, theraven

Reviewed By: theraven

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223052 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221518:
Daniel Sanders [Mon, 1 Dec 2014 17:05:38 +0000 (17:05 +0000)]
Merged from r221518:

[mips] Remove MipsCC::analyzeCallOperands in favour of CCState::AnalyzeCallOperands. NFC

Summary:
In addition to the usual f128 workaround, it was also necessary to provide
a means of accessing ArgListEntry::IsFixed.

Reviewers: theraven, vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223048 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221517:
Daniel Sanders [Mon, 1 Dec 2014 17:02:26 +0000 (17:02 +0000)]
Merged from r221517:

[mips] Move SpecialCallingConv to MipsCCState and use it from tablegen-erated code. NFC

Summary:
In the long run, it should probably become a calling convention in its own
right but for now just move it out of
MipsISelLowering::analyzeCallOperands() so that we can drop this function
in favour of CCState::AnalyzeCallOperands().

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223047 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221516:
Daniel Sanders [Mon, 1 Dec 2014 16:35:35 +0000 (16:35 +0000)]
Merged from r221516:

[mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.

Summary:
CCState objects already carry this information in their isVarArg() method.

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223045 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221463:
Daniel Sanders [Mon, 1 Dec 2014 16:33:17 +0000 (16:33 +0000)]
Merged from r221463:

[mips] Removed IsSoftFloat from MipsISelLowering::analyzeCallOperands(). NFC

Summary:
It isn't used anymore.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223044 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221461:
Daniel Sanders [Mon, 1 Dec 2014 16:32:03 +0000 (16:32 +0000)]
Merged from r221461:

[mips] Removed MipsISelLowering::analyzeFormalArguments() in favour of CCState::AnalyzeFormalArguments()

Summary:
As with returns, we must be able to identify f128 arguments despite them
being lowered away. We do this with a pre-analyze step that builds a
vector and then we use this vector from the tablegen-erated code.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223042 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221146:
Daniel Sanders [Mon, 1 Dec 2014 16:30:07 +0000 (16:30 +0000)]
Merged from r221146:

[mips] Remove unused prototype and variable. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223041 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221081 and r221102:
Daniel Sanders [Mon, 1 Dec 2014 16:26:48 +0000 (16:26 +0000)]
Merged from r221081 and r221102:

-------------------------------------------------------------------------------
Revert r221056 and others, "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC."

  r221056 "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC."
  r221058 "[mips] Fix unused variable warning introduced in r221056"
  r221059 "[mips] Move all ByVal handling into CCState and tablegen-erated code. NFC."
  r221061 "Renamed CCState members that appear to misspell 'Processed' as 'Proceed'. NFC."

It caused an undefined behavior in LLVM :: CodeGen/Mips/return-vector.ll.

-------------------------------------------------------------------------------
Re-commit r221056 and others with fix, "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC."

sret arguments can never originate from an f128 argument so we detect
sret arguments and push false into OriginalArgWasF128.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223040 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221061:
Daniel Sanders [Mon, 1 Dec 2014 16:05:07 +0000 (16:05 +0000)]
Merged from r221061:

Renamed CCState members that appear to misspell
 'Processed' as 'Proceed'. NFC.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223039 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221059:
Daniel Sanders [Mon, 1 Dec 2014 15:50:46 +0000 (15:50 +0000)]
Merged from r221059:

[mips] Move all ByVal handling into CCState and tablegen-erated code. NFC.

Summary:
CCState already contains a byval implementation that is very similar to the
Mips custom code. This patch merges the custom code into the existing
common code and tablegen-erated code.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: rnk, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223037 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221058:
Daniel Sanders [Mon, 1 Dec 2014 15:37:28 +0000 (15:37 +0000)]
Merged from r221058:

[mips] Fix unused variable warning introduced in r221056

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223036 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221057:
Daniel Sanders [Mon, 1 Dec 2014 15:28:54 +0000 (15:28 +0000)]
Merged from r221057:

[mips] Remove ByValArgInfo::Address in favour of CCValAssign::getMemLocOffset(). NFC.

Summary: ByValArgInfo is practically the same as CCState::ByValInfo now.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223035 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221056:
Daniel Sanders [Mon, 1 Dec 2014 15:24:14 +0000 (15:24 +0000)]
Merged from r221056:

[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC.

Summary:
There are a couple more changes to make before analyzeFormalArguments can
be merged into the standard AnalyzeFormalArguments. I've had to temporarily
poke a couple holes in MipsCCState's encapsulation to save having to make
all the required changes for this merge all at once*. These will be removed
shortly.

* We must merge our ByVal argument handling with the implementation in CCState.
  This will be done over the next three patches, then the fourth will merge
  analyzeFormalArguments with AnalyzeFormalArguments.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223034 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221054:
Daniel Sanders [Mon, 1 Dec 2014 15:15:59 +0000 (15:15 +0000)]
Merged from r221054:

[mips] Remove MipsCC::CCInfo. NFC.

Summary:
It's now passed in as an argument to functions that need it. Eventually
this argument will be replaced by the 'this' pointer for a MipsCCState
object.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223033 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r221053:
Daniel Sanders [Mon, 1 Dec 2014 15:14:34 +0000 (15:14 +0000)]
Merged from r221053:

[mips] Removed MipsCC::fixedArgFn(). NFC

Summary:
There is one remaining trace of it in MipsCC::analyzeCallOperands() where
Mips16 might override the calling convention. This will moved into
tablegen-erated code later.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223032 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[tablegen] Add CustomCallingConv and use it to tablegen-erate the outermost parts...
Daniel Sanders [Mon, 1 Dec 2014 15:13:16 +0000 (15:13 +0000)]
[tablegen] Add CustomCallingConv and use it to tablegen-erate the outermost parts of the Mips O32 implementation

Summary:
CustomCallingConv is simply a CallingConv that tablegen should not generate the
implementation for. It allows regular CallingConv's to delegate to these custom
functions. This is (currently) necessary for Mips and we cannot use CCCustom
without having to adapt to the different API that CCCustom uses.

This brings us a bit closer to being able to remove
MipsCC::analyzeCallOperands and MipsCC::analyzeFormalArguments in favour of
the common implementation.

No functional change to the targets.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: vmedic, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223031 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded file that should have been in r223022.
Daniel Sanders [Mon, 1 Dec 2014 15:10:11 +0000 (15:10 +0000)]
Added file that should have been in r223022.

I forgot to 'svn add' it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223030 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd file that should have been in r223027
Daniel Sanders [Mon, 1 Dec 2014 14:43:25 +0000 (14:43 +0000)]
Add file that should have been in r223027

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223028 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r220568:
Daniel Sanders [Mon, 1 Dec 2014 14:30:22 +0000 (14:30 +0000)]
Merged from r220568:

[mips] Replace MipsABIEnum with a MipsABIInfo class.

Summary:
No functional change yet, it's just an object replacement for an enum.
It will allow us to gather ABI information in a single place so that we can
start testing for properties of the ABI's instead of the ABI itself.

For example we will eventually be able to use:
  ABI.MinStackAlignmentInBytes()
instead of:
  (isABI_N32() || isABI_N64()) ? 16 : 8
which is clearer and more maintainable.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223027 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r220564:
Daniel Sanders [Mon, 1 Dec 2014 14:28:19 +0000 (14:28 +0000)]
Merged from r220564:

[mips] Fix >80-column line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223026 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r220561:
Daniel Sanders [Mon, 1 Dec 2014 14:26:43 +0000 (14:26 +0000)]
Merged from r220561:

[mips] Remove redundant code in RetCC_MipsN. NFC.

Summary:
i32 is always promoted to i64 so it no longer makes sense to assign i32 to
registers.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223025 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r220556:
Daniel Sanders [Mon, 1 Dec 2014 14:17:47 +0000 (14:17 +0000)]
Merged from r220556:

[mips] For N32/N64, structs must be passed in the upper bits of a register.

Summary:
Most structs were fixed by r218451 but those of between >32-bits and
<64-bits remained broken since they were not marked with [ASZ]ExtUpper.
This patch fixes the remaining cases by using
CCPromoteToUpperBitsInType<i64> on i64's in addition to i32 and smaller.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223024 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r219931:
Daniel Sanders [Mon, 1 Dec 2014 14:16:14 +0000 (14:16 +0000)]
Merged from r219931:

[mips] Account for endianess when expanding BuildPairF64/ExtractElementF64 nodes.

Summary:
In order to support big endian targets for the BuildPairF64 nodes we
just need to swap the low/high pair registers. Additionally, for the
ExtractElementF64 nodes we have to calculate the correct stack offset
with respect to the node's register/operand that we want to extract.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223023 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r219196:
Daniel Sanders [Mon, 1 Dec 2014 14:15:05 +0000 (14:15 +0000)]
Merged from r219196:

[mips] Return {f128} correctly for N32/N64.

Summary:
According to the ABI documentation, f128 and {f128} should both be returned
in $f0 and $f2. However, this doesn't match GCC's behaviour which is to
return f128 in $f0 and $f2, but {f128} in $f0 and $f1.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223022 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r218452:
Daniel Sanders [Mon, 1 Dec 2014 14:10:48 +0000 (14:10 +0000)]
Merging r218452:
------------------------------------------------------------------------
r218452 | dsanders | 2014-09-25 14:08:51 +0100 (Thu, 25 Sep 2014) | 3 lines

Add llvm_unreachables() for [ASZ]ExtUpper to X86FastISel.cpp to appease the buildbots.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223021 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r218510:
Daniel Sanders [Mon, 1 Dec 2014 13:58:19 +0000 (13:58 +0000)]
Merged from r218510:

Fix unused variable warning added in r218509

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223020 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r218509:
Daniel Sanders [Mon, 1 Dec 2014 13:55:59 +0000 (13:55 +0000)]
Merged from r218509:

[mips] Generalize the handling of f128 return values to support f128 arguments.

Summary:
This will allow us to handle f128 arguments without duplicating code from
CCState::AnalyzeFormalArguments() or CCState::AnalyzeCallOperands().

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223019 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r218451:
Daniel Sanders [Mon, 1 Dec 2014 13:46:55 +0000 (13:46 +0000)]
Merged from r218451:

[mips] Add CCValAssign::[ASZ]ExtUpper and CCPromoteToUpperBitsInType and handle struct's correctly on big-endian N32/N64 return values.

Summary:
The N32/N64 ABI's require that structs passed in registers are laid out
such that spilling the register with 'sd' places the struct at the lowest
address. For little endian this is trivial but for big-endian it requires
that structs are shifted into the upper bits of the register.

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

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223018 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r218036:
Daniel Sanders [Mon, 1 Dec 2014 13:34:51 +0000 (13:34 +0000)]
Merged from r218036:

[mips] Remove custom versions of CCState::AnalyzeReturn() and CCState::AnalyzeCallReturn().

Summary:
The N32/N64 ABI's return f128 values in $f0 and $f2 for hard-float and $v0 and
$a0 for soft-float. The registers used in the soft-float case differ from the
usual $v0, and $v1 specified for return values.

Both cases were previously handled by duplicating the CCState::AnalyzeReturn()
and CCState::AnalyzeCallReturn() functions and modifying them to delegate to
a different assignment function for f128 and further replace the register type
for the hard-float case. There is a simpler way to do both of these.

We now use the common functions and select an initial assignment function based
on whether the original type is f128 or not. We then handle the hard-float case
using CCBitConvertToType<>.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223017 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r217494:
Daniel Sanders [Mon, 1 Dec 2014 13:25:44 +0000 (13:25 +0000)]
Merged from r217494:

[mips] Remove inverted predicates from MipsSubtarget that were only used by MipsCallingConv.td

Summary: No functional change

Reviewers: echristo, vmedic

Reviewed By: echristo, vmedic

Subscribers: echristo, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223016 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r217485:
Daniel Sanders [Mon, 1 Dec 2014 13:18:25 +0000 (13:18 +0000)]
Merged from r217485:

[mips] Return an ArrayRef from MipsCC::intArgRegs() and remove MipsCC::numIntArgRegs()

Summary: No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223015 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r217436:
Daniel Sanders [Mon, 1 Dec 2014 13:17:00 +0000 (13:17 +0000)]
Merged from r217436:

[mips] Move MipsTargetLowering::MipsCC::regSize() to MipsSubtarget::getGPRSizeInBytes()

Summary:
The GPR size is more a property of the subtarget than that of the ABI so move
this information to the MipsSubtarget.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223014 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r217434:
Daniel Sanders [Mon, 1 Dec 2014 13:15:04 +0000 (13:15 +0000)]
Merged from r217434:

[mips] Don't cache IsO32 and IsFP64 in MipsTargetLowering::MipsCC

Summary:
Use a MipsSubtarget reference instead.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223013 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r215640:
Daniel Sanders [Mon, 1 Dec 2014 11:43:13 +0000 (11:43 +0000)]
Merged from r215640:

[mips] Improve robustness of some tests.

Summary:
This is done by removing some hardcoded registers like $at or expecting a single digit register to be selected.

Contains work done by Matheus Almeida.

Reviewers: matheusalmeida, dsanders

Reviewed By: dsanders

Subscribers: tomatabacu

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223012 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r215211:
Daniel Sanders [Mon, 1 Dec 2014 11:38:38 +0000 (11:38 +0000)]
Merged from r215211:

[mips] Invert the abicalls feature bit to be noabicalls so that it's possible for -mno-abicalls to take effect.

Also added the testcase that should have been in r215194.

This behaviour has surprised me a few times now. The problem is that the
generated MipsSubtarget::ParseSubtargetFeatures() contains code like this:

   if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true;

so '-abicalls' means 'leave it at the default' and '+abicalls' means 'set it to
true'. In this case, (and the similar -modd-spreg case) I'd like the code to be

  IsABICalls = (Bits & Mips::FeatureABICalls) != 0;

or possibly:

   if ((Bits & Mips::FeatureABICalls) != 0)
     IsABICalls = true;
   else
     IsABICalls = false;

and preferably arrange for 'Bits & Mips::FeatureABICalls' to be true by default
(on some triples).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223011 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r215194:
Daniel Sanders [Mon, 1 Dec 2014 11:32:07 +0000 (11:32 +0000)]
Merged from r215194:

[mips] Initial implementation of -mabicalls/-mno-abicalls.

This patch implements the main rules for -mno-abicalls such as reserving $gp,
and emitting the correct .option directive.

Patch by Matheus Almeida and Toma Tabacu

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223009 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r214578:
Daniel Sanders [Mon, 1 Dec 2014 11:23:40 +0000 (11:23 +0000)]
Merged from r214578:

llvm/test/CodeGen/Mips/cconv/arguments-varargs.ll: Add explicit -mtriple=(mips|mipsel)-linux on 4 lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223008 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerged from r214493:
Daniel Sanders [Mon, 1 Dec 2014 11:22:34 +0000 (11:22 +0000)]
Merged from r214493:

[mips][PR19612] Fix va_arg for big-endian mode.

Summary:
Big-endian mode was not correctly adjusting the offset for types smaller
than an ABI slot.

Fixes PR19612

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: sstankovic, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223007 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r217257:
Daniel Sanders [Thu, 27 Nov 2014 10:55:46 +0000 (10:55 +0000)]
Merging r217257:
------------------------------------------------------------------------
r217257 | tomatabacu | 2014-09-05 17:32:09 +0100 (Fri, 05 Sep 2014) | 9 lines

[mips] Change Feature-related types from unsigned to uint64_t in MipsAsmParser. No functional changes.

Summary: Found a couple of cases where unsigned was still being used. These two should be the last ones in the (entire) Mips backend.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D5028
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@222875 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r218745:
Daniel Sanders [Mon, 24 Nov 2014 21:47:34 +0000 (21:47 +0000)]
Merging r218745:
------------------------------------------------------------------------
r218745 | dsanders | 2014-10-01 09:26:55 +0100 (Wed, 01 Oct 2014) | 7 lines

[mips] Fix disassembly of [ls][wd]c[23], cache, and pref

Fixes PR21015, and PR20993.

Patch by Jun Koi

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@222696 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r216262:
Daniel Sanders [Mon, 24 Nov 2014 21:47:07 +0000 (21:47 +0000)]
Merging r216262:
------------------------------------------------------------------------
r216262 | sstankovic | 2014-08-22 10:23:22 +0100 (Fri, 22 Aug 2014) | 5 lines

[mips] Don't use odd-numbered float registers for double arguments for fastcc
calling convention if FP is 64-bit and +nooddspreg is used.

Differential Revision: http://reviews.llvm.org/D4981.diff

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@222695 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r221453:
Daniel Sanders [Mon, 24 Nov 2014 21:42:40 +0000 (21:42 +0000)]
Merging r221453:
------------------------------------------------------------------------
r221453 | tomatabacu | 2014-11-06 14:25:42 +0000 (Thu, 06 Nov 2014) | 17 lines

[mips] Tolerate the use of the %z inline asm operand modifier with non-immediates.

Summary:
Currently, we give an error if %z is used with non-immediates, instead of continuing as if the %z isn't there.

For example, you use the %z operand modifier along with the "Jr" constraints ("r" makes the operand a register, and "J" makes it an immediate, but only if its value is 0).
In this case, you want the compiler to print "$0" if the inline asm input operand turns out to be an immediate zero and you want it to print the register containing the operand, if it's not.

We give an error in the latter case, and we shouldn't (GCC also doesn't).

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6023
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@222693 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r221408:
Daniel Sanders [Mon, 24 Nov 2014 21:37:42 +0000 (21:37 +0000)]
Merging r221408:
------------------------------------------------------------------------
r221408 | petarj | 2014-11-05 22:42:31 +0000 (Wed, 05 Nov 2014) | 9 lines

[mips64] Fix MIPS64 exception personality encoding

Remove dynamic relocations of __gxx_personality_v0 from the .eh_frame.
The MIPS64 follow-up of the MIPS32 fix (rL209907).

Patch by Vladimir Stefanovic.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@222692 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r216920:
Daniel Sanders [Mon, 24 Nov 2014 21:37:18 +0000 (21:37 +0000)]
Merging r216920:
------------------------------------------------------------------------
r216920 | samsonov | 2014-09-02 18:49:16 +0100 (Tue, 02 Sep 2014) | 4 lines

Fix left shifts of negative values in MipsDisassembler.

This bug was reported by UBSan.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@222691 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r220401:
Tom Stellard [Wed, 5 Nov 2014 20:14:56 +0000 (20:14 +0000)]
Merging r220401:

------------------------------------------------------------------------
r220401 | mail | 2014-10-22 14:18:54 -0400 (Wed, 22 Oct 2014) | 6 lines

test: Make this test runnable in directories with @ in their names

Jenkins likes to use directories with names involving the '@'
character, which breaks the sed expression in this test. Switch to use
'|' on the assumption that it's less likely to show up in a path.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@221390 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoBump version to 3.5.1
Tom Stellard [Fri, 31 Oct 2014 19:33:25 +0000 (19:33 +0000)]
Bump version to 3.5.1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@220990 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r217490:
Dan Liew [Thu, 11 Sep 2014 23:00:09 +0000 (23:00 +0000)]
Merging r217490:
------------------------------------------------------------------------
r217490 | delcypher | 2014-09-10 12:09:23 +0100 (Wed, 10 Sep 2014) | 4 lines

Don't attempt to run llvm-config in cmake/modules/Makefile when doing
``make clean`` because it won't be available.

This is an attempt to unbreak buildbots broken by r217484.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@217640 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r217484:
Dan Liew [Thu, 11 Sep 2014 22:56:28 +0000 (22:56 +0000)]
Merging r217484:
------------------------------------------------------------------------
r217484 | delcypher | 2014-09-10 11:18:59 +0100 (Wed, 10 Sep 2014) | 13 lines

Attempt to fix PR20884

This fixes the generation of broken LLVMExports.cmake file by
the Autoconf/Makefile build system when --enable-shared is passed to
configure.

When --enable_shared is passed the Makefile.rules does not set the
LLVMConfigLibs variable which cmake/modules/Makefile previously relied
on. Now it runs the llvm-config command itself to get the library names.

This still isn't perfect because the generated LLVM targets refer to the
static libraries and not the shared library but that is much larger
problem to fix.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@217638 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate PowerPC target information.
Bill Wendling [Sat, 6 Sep 2014 03:26:11 +0000 (03:26 +0000)]
Update PowerPC target information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@217304 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate release notes.
Bill Wendling [Tue, 2 Sep 2014 21:22:28 +0000 (21:22 +0000)]
Update release notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@216951 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate lang ref.
Bill Wendling [Tue, 2 Sep 2014 21:21:48 +0000 (21:21 +0000)]
Update lang ref.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@216950 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoInclude blurb about Likely. By Josh Klontz.
Bill Wendling [Fri, 29 Aug 2014 20:00:59 +0000 (20:00 +0000)]
Include blurb about Likely. By Josh Klontz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@216762 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate to include ISPC. By Dmitry Babokin.
Bill Wendling [Fri, 29 Aug 2014 19:57:40 +0000 (19:57 +0000)]
Update to include ISPC. By Dmitry Babokin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@216760 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r216064:
Bill Wendling [Wed, 20 Aug 2014 17:42:35 +0000 (17:42 +0000)]
Merging r216064:
------------------------------------------------------------------------
r216064 | kongyi | 2014-08-20 03:40:20 -0700 (Wed, 20 Aug 2014) | 9 lines

ARM: Fix codegen for rbit intrinsic

LLVM generates illegal `rbit r0, #352` instruction for rbit intrinsic.
According to ARM ARM, rbit only takes register as argument, not immediate.
The correct instruction should be rbit <Rd>, <Rm>.

The bug was originally introduced in r211057.

Differential Revision: http://reviews.llvm.org/D4980
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@216089 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r215711:
Bill Wendling [Mon, 18 Aug 2014 05:16:58 +0000 (05:16 +0000)]
Merging r215711:
------------------------------------------------------------------------
r215711 | wschmidt | 2014-08-15 06:51:57 -0700 (Fri, 15 Aug 2014) | 8 lines

[PPC64] Add test case for r215685.

I had deferred adding this test case until I could get it down to a
reasonable size.  That's done now.

Thanks,
Bill

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215879 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r215685:
Bill Wendling [Mon, 18 Aug 2014 05:16:33 +0000 (05:16 +0000)]
Merging r215685:
------------------------------------------------------------------------
r215685 | wschmidt | 2014-08-14 18:25:26 -0700 (Thu, 14 Aug 2014) | 69 lines

[PPC64] Add missing dependency on X2 to LDinto_toc.

The LDinto_toc pattern has been part of 64-bit PowerPC for a long
time, and represents loading from a memory location into the TOC
register (X2).  However, this pattern doesn't explicitly record that
it modifies that register.  This patch adds the missing dependency.

It was very surprising to me that this has never shown up as a problem
in the past, and that we only saw this problem recently in a single
scenario when building a self-hosted clang.  It turns out that in most
cases we have another dependency present that keeps the LDinto_toc
instruction tied in place.  LDinto_toc is used for TOC restore
following a call site, so this is a typical sequence:

   BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
   LDinto_toc 24, %X1
   ADJCALLSTACKUP 96, 0, %R1<imp-def>, %R1<imp-use>

Because the LDinto_toc is inserted prior to the ADJCALLSTACKUP, there
is a natural anti-dependency between the two that keeps it in place.

Therefore we don't usually see a problem.  However, in one particular
case, one call is followed immediately by another call, and the second
call requires a parameter that is a TOC-relative address.  This is the
code sequence:

  BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X4<imp-use>, %X5<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
  LDinto_toc 24, %X1
  ADJCALLSTACKUP 96, 0, %R1<imp-def>, %R1<imp-use>
  ADJCALLSTACKDOWN 96, %R1<imp-def>, %R1<imp-use>
  %vreg39<def> = ADDIStocHA %X2, <ga:@.str>; G8RC_and_G8RC_NOX0:%vreg39
  %vreg40<def> = ADDItocL %vreg39<kill>, <ga:@.str>; G8RC:%vreg40 G8RC_and_G8RC_NOX0:%vreg39

Note that the back-to-back stack adjustments are the same size!  The
back end is smart enough to recognize this and optimize them away:

  BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X4<imp-use>, %X5<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
  LDinto_toc 24, %X1
  %vreg39<def> = ADDIStocHA %X2, <ga:@.str>; G8RC_and_G8RC_NOX0:%vreg39
  %vreg40<def> = ADDItocL %vreg39<kill>, <ga:@.str>; G8RC:%vreg40 G8RC_and_G8RC_NOX0:%vreg39

Now there is nothing to prevent the ADDIStocHA instruction from moving
ahead of the LDinto_toc instruction, and because of the longest-path
heuristic, this is what happens.

With the accompanying patch, %X2 is represented as an implicit def:

  BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X4<imp-use>, %X5<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
  LDinto_toc 24, %X1, %X2<imp-def,dead>
  ADJCALLSTACKUP 96, 0, %R1<imp-def,dead>, %R1<imp-use>
  ADJCALLSTACKDOWN 96, %R1<imp-def,dead>, %R1<imp-use>
  %vreg39<def> = ADDIStocHA %X2, <ga:@.str>; G8RC_and_G8RC_NOX0:%vreg39
  %vreg40<def> = ADDItocL %vreg39<kill>, <ga:@.str>; G8RC:%vreg40 G8RC_and_G8RC_NOX0:%vreg39

So now when the two stack adjustments are removed, ADDIStocHA is
prevented from being moved above LDinto_toc.

I have not yet created a test case for this, because the original
failure occurs on a relatively large function that needs reduction.
However, this is a fairly serious bug, despite its infrequency, and I
wanted to get this patch onto the list as soon as possible so that it
can be considered for a 3.5 backport.  I'll work on whittling down a
test case.

Have we missed the boat for 3.5 at this point?

Thanks,
Bill

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215878 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r215806:
Bill Wendling [Mon, 18 Aug 2014 05:14:39 +0000 (05:14 +0000)]
Merging r215806:
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215874 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r214679:
Bill Wendling [Tue, 12 Aug 2014 05:41:35 +0000 (05:41 +0000)]
Merging r214679:
------------------------------------------------------------------------
r214679 | chandlerc | 2014-08-03 17:54:28 -0700 (Sun, 03 Aug 2014) | 10 lines

[x86] Fix the test case added in r214670 and tweaked in r214674 further.

Fundamentally, there isn't a really portable way to test the constant
pool contents. Instead, pin this test to the bare-metal triple. This
also makes it a 64-bit triple which allows us to only match a single
constant pool rather than two. It can also just hard code the '.' prefix
as the format should be stable now that it has a fixed triple. Finally,
I've switched it to use CHECK-NEXT to be more precise in the instruction
sequence expected and to use variables rather than hard coding decisions
by the register allocator.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215430 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r214674:
Bill Wendling [Tue, 12 Aug 2014 05:41:22 +0000 (05:41 +0000)]
Merging r214674:
------------------------------------------------------------------------
r214674 | spatel | 2014-08-03 16:20:16 -0700 (Sun, 03 Aug 2014) | 2 lines

Account for possible leading '.' in label string.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215429 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r214670:
Bill Wendling [Tue, 12 Aug 2014 05:41:11 +0000 (05:41 +0000)]
Merging r214670:
------------------------------------------------------------------------
r214670 | spatel | 2014-08-03 15:48:23 -0700 (Sun, 03 Aug 2014) | 8 lines

fix for PR20354 - Miscompile of fabs due to vectorization

This is intended to be the minimal change needed to fix PR20354 ( http://llvm.org/bugs/show_bug.cgi?id=20354 ). The check for a vector operation was wrong; we need to check that the fabs itself is not a vector operation.

This patch will not generate the optimal code. A constant pool load and 'and' op will be generated instead of just returning a value that we can calculate in advance (as we do for the scalar case). I've put a 'TODO' comment for that here and expect to have that patch ready soon.

There is a very similar optimization that we can do in visitFNEG, so I've put another 'TODO' there and expect to have another patch for that too.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215428 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert r.215058.
Bill Wendling [Tue, 12 Aug 2014 05:35:26 +0000 (05:35 +0000)]
Revert r.215058.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215426 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded pocl and TCE to the list of projects that work with Clang/LLVM 3.5.
Pekka Jaaskelainen [Thu, 7 Aug 2014 09:06:53 +0000 (09:06 +0000)]
Added pocl and TCE to the list of projects that work with Clang/LLVM 3.5.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215090 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerging r214481:
Bill Wendling [Thu, 7 Aug 2014 04:52:45 +0000 (04:52 +0000)]
Merging r214481:
------------------------------------------------------------------------
r214481 | hfinkel | 2014-07-31 22:20:41 -0700 (Thu, 31 Jul 2014) | 38 lines

[PowerPC] Generate unaligned vector loads using intrinsics instead of regular loads

Altivec vector loads on PowerPC have an interesting property: They always load
from an aligned address (by rounding down the address actually provided if
necessary). In order to generate an actual unaligned load, you can generate two
load instructions, one with the original address, one offset by one vector
length, and use a special permutation to extract the bytes desired.

When this was originally implemented, I generated these two loads using regular
ISD::LOAD nodes, now marked as aligned. Unfortunately, there is a problem with
this:

The alignment of a load does not contribute to its identity, and SDNodes
are uniqued. So, imagine that we have some unaligned load, L1, that is not
aligned. The routine will create two loads, L1(aligned) and (L1+16)(aligned).
Further imagine that there had already existed a load (L1+16)(unaligned) with
the same chain operand as the load L1. When (L1+16)(aligned) is created as part
of the lowering of L1, this load *is* also the (L1+16)(unaligned) node, just
now marked as aligned (because the new alignment overwrites the old). But the
original users of (L1+16)(unaligned) now get the data intended for the
permutation yielding the data for L1, and (L1+16)(unaligned) no longer exists
to get its own permutation-based expansion. This was PR19991.

A second potential problem has to do with the MMOs on these loads, which can be
used by AA during instruction scheduling to break chain-based dependencies. If
the new "aligned" loads get the MMO from the original unaligned load, this does
not represent the fact that it will load data from below the original address.
Normally, this would not matter, but this load might be combined with another
load pair for a previous vector, and then the dependency on the otherwise-
ignored lower bytes can matter.

To fix both problems, instead of generating the necessary loads using regular
ISD::LOAD instructions, ppc_altivec_lvx intrinsics are used instead. These are
provided with MMOs with a conservative address range.

Unfortunately, I no longer have a failing test case (since PR19991 was
reported, other changes in CodeGen have forced this bug back into hiding it
again). Nevertheless, this should fix the underlying problem.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@215058 91177308-0d34-0410-b5e6-96231b3b80d8