oota-llvm.git
10 years agoMC: Appease the buildbots
David Majnemer [Mon, 10 Mar 2014 01:04:18 +0000 (01:04 +0000)]
MC: Appease the buildbots

This is fallout from r203429.

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

10 years agoMC: Cleanup MCSectionMachO::ParseSectionSpecifier
David Majnemer [Mon, 10 Mar 2014 00:55:07 +0000 (00:55 +0000)]
MC: Cleanup MCSectionMachO::ParseSectionSpecifier

Split by comma once instead of multiple times.  Moving this upfront
makes the rest of the code considerably simpler.

No functional change.

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

10 years ago[PM] Add a comment I missed and add the special members to one more
Chandler Carruth [Mon, 10 Mar 2014 00:54:01 +0000 (00:54 +0000)]
[PM] Add a comment I missed and add the special members to one more
class that might (at some point) need them.

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

10 years ago[PM] Comment on all of the totally pointless definitions of special
Chandler Carruth [Mon, 10 Mar 2014 00:50:56 +0000 (00:50 +0000)]
[PM] Comment on all of the totally pointless definitions of special
members as being te workaround MSVC.

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

10 years ago[PM] I have been educated by several folks that MSVC will never
Chandler Carruth [Mon, 10 Mar 2014 00:35:47 +0000 (00:35 +0000)]
[PM] I have been educated by several folks that MSVC will never
synthesize a move constructor. Thus, for any types where move semantics
are important (yea, that's essentially every type...) you must
explicitly define the special members. Do so systematically throughout
the pass manager as the core of the design relies heavily on move
semantics.

This will hopefully fix the build with MSVC 2013. We still don't know
why MSVC 2012 accepted this code, but it almost certainly wasn't doing
the right thing.

I've also added explicit to a few single-argument constructors spotted
in passing.

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

10 years ago[Sparc] Add support for decoding 'swap' instruction.
Venkatraman Govindaraju [Sun, 9 Mar 2014 23:32:07 +0000 (23:32 +0000)]
[Sparc] Add support for decoding 'swap' instruction.

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

10 years agoFix inconsistent whitespace.
Bob Wilson [Sun, 9 Mar 2014 23:17:28 +0000 (23:17 +0000)]
Fix inconsistent whitespace.

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

10 years agoWork around FreeBSD rtld rpath $ORIGIN limitation
Ed Maste [Sun, 9 Mar 2014 18:48:45 +0000 (18:48 +0000)]
Work around FreeBSD rtld rpath $ORIGIN limitation

FreeBSD's rtld requires the DF_ORIGIN flag set in order to process
$ORIGIN in rpath.

FreeBSD bug http://bugs.freebsd.org/187114

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sun, 9 Mar 2014 18:03:14 +0000 (18:03 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoStackColoring: Use range-based for loops.
Benjamin Kramer [Sun, 9 Mar 2014 15:44:45 +0000 (15:44 +0000)]
StackColoring: Use range-based for loops.

No functionality change.

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

10 years agoMachineModuleInfo: Turn nested std::pairs into a proper struct.
Benjamin Kramer [Sun, 9 Mar 2014 15:44:39 +0000 (15:44 +0000)]
MachineModuleInfo: Turn nested std::pairs into a proper struct.

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

10 years agoSimplifyCFG: Simplify the weight scaling algorithm.
Benjamin Kramer [Sun, 9 Mar 2014 14:42:55 +0000 (14:42 +0000)]
SimplifyCFG: Simplify the weight scaling algorithm.

No change in functionality.

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

10 years ago[LCG] Simplify a bunch of the LCG code with range for loops and auto.
Chandler Carruth [Sun, 9 Mar 2014 12:20:34 +0000 (12:20 +0000)]
[LCG] Simplify a bunch of the LCG code with range for loops and auto.
Still more work to be done here to leverage C++11, but this clears out
the glaring issues.

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

10 years ago[C++11] Add range views for various parts of a Module.
Chandler Carruth [Sun, 9 Mar 2014 12:20:30 +0000 (12:20 +0000)]
[C++11] Add range views for various parts of a Module.

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

10 years agoChange documentation based on feedback from Chandler.
Ahmed Charles [Sun, 9 Mar 2014 12:12:23 +0000 (12:12 +0000)]
Change documentation based on feedback from Chandler.

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

10 years ago[C++11] Now that we have C++11 and I've replaced the use of this
Chandler Carruth [Sun, 9 Mar 2014 11:51:11 +0000 (11:51 +0000)]
[C++11] Now that we have C++11 and I've replaced the use of this
horrible smart pointer by std::unique_ptr and strict move semantics, rip
this out.

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

10 years ago[PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that
Chandler Carruth [Sun, 9 Mar 2014 11:49:53 +0000 (11:49 +0000)]
[PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that
it is available. Also make the move semantics sufficiently correct to
tolerate move-only passes, as the PassManagers *are* move-only passes.

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

10 years ago[C++11] Add llvm::make_unique, according to N3656.
Ahmed Charles [Sun, 9 Mar 2014 11:20:17 +0000 (11:20 +0000)]
[C++11] Add llvm::make_unique, according to N3656.

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

10 years agoRevert r203230, "CodeGenPrep: sink extends of illegal types into use block."
NAKAMURA Takumi [Sun, 9 Mar 2014 11:01:07 +0000 (11:01 +0000)]
Revert r203230, "CodeGenPrep: sink extends of illegal types into use block."

It choked i686 stage2.

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

10 years agoDe-virtualize some methods since they don't override anything.
Craig Topper [Sun, 9 Mar 2014 07:58:15 +0000 (07:58 +0000)]
De-virtualize some methods since they don't override anything.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sun, 9 Mar 2014 07:44:38 +0000 (07:44 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoIR: Change inalloca's grammar a bit
David Majnemer [Sun, 9 Mar 2014 06:41:58 +0000 (06:41 +0000)]
IR: Change inalloca's grammar a bit

The grammar for LLVM IR is not well specified in any document but seems
to obey the following rules:

 - Attributes which have parenthesized arguments are never preceded by
   commas.  This form of attribute is the only one which ever has
   optional arguments.  However, not all of these attributes support
   optional arguments: 'thread_local' supports an optional argument but
   'addrspace' does not.  Interestingly, 'addrspace' is documented as
   being a "qualifier".  What constitutes a qualifier?  I cannot find a
   definition.

 - Some attributes use a space between the keyword and the value.
   Examples of this form are 'align' and 'section'.  These are always
   preceded by a comma.

 - Otherwise, the attribute has no argument.  These attributes do not
   have a preceding comma.

Sometimes an attribute goes before the instruction, between the
instruction and it's type, or after it's type.  'atomicrmw' has
'volatile' between the instruction and the type while 'call' has 'tail'
preceding the instruction.

With all this in mind, it seems most consistent for 'inalloca' on an
'inalloca' instruction to occur before between the instruction and the
type.  Unlike the current formulation, there would be no preceding
comma.  The combination 'alloca inalloca' doesn't look particularly
appetizing, perhaps a better spelling of 'inalloca' is down the road.

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

10 years agoRevert "Clean up SmallString a bit"
David Blaikie [Sun, 9 Mar 2014 06:22:58 +0000 (06:22 +0000)]
Revert "Clean up SmallString a bit"

This reverts commit r203374.

Ambiguities in assign... oh well. I'm just going to revert this and
probably not try to recommit it as it's not terribly important.

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

10 years agoClean up SmallString a bit
David Blaikie [Sun, 9 Mar 2014 06:17:01 +0000 (06:17 +0000)]
Clean up SmallString a bit

Move a common utility (assign(iter, iter)) into SmallVector (some of the
others could be moved there too, but this one seemed particularly
generic) and replace repetitions overrides with using directives.

And simplify SmallVector::assign(num, element) while I'm here rather
than thrashing these files (that cause everyone to rebuild) again.

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

10 years ago[C++11] Fix break due to MSVC bug.
Ahmed Charles [Sun, 9 Mar 2014 04:57:09 +0000 (04:57 +0000)]
[C++11] Fix break due to MSVC bug.

MSVC (2012, 2013, 2013 Nov CTP) fail on the following code:

int main() {
  int arr[] = {1, 2};
  for (int i : arr)
    do {} while (0);
}

The fix is to put {} around the for loop. I've reported this to the MSVC
team.

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

10 years agoFix build break.
Ahmed Charles [Sun, 9 Mar 2014 03:50:36 +0000 (03:50 +0000)]
Fix build break.

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

10 years ago[C++11] Add range based accessors for the Use-Def chain of a Value.
Chandler Carruth [Sun, 9 Mar 2014 03:16:01 +0000 (03:16 +0000)]
[C++11] Add range based accessors for the Use-Def chain of a Value.

This requires a number of steps.
1) Move value_use_iterator into the Value class as an implementation
   detail
2) Change it to actually be a *Use* iterator rather than a *User*
   iterator.
3) Add an adaptor which is a User iterator that always looks through the
   Use to the User.
4) Wrap these in Value::use_iterator and Value::user_iterator typedefs.
5) Add the range adaptors as Value::uses() and Value::users().
6) Update *all* of the callers to correctly distinguish between whether
   they wanted a use_iterator (and to explicitly dig out the User when
   needed), or a user_iterator which makes the Use itself totally
   opaque.

Because #6 requires churning essentially everything that walked the
Use-Def chains, I went ahead and added all of the range adaptors and
switched them to range-based loops where appropriate. Also because the
renaming requires at least churning every line of code, it didn't make
any sense to split these up into multiple commits -- all of which would
touch all of the same lies of code.

The result is still not quite optimal. The Value::use_iterator is a nice
regular iterator, but Value::user_iterator is an iterator over User*s
rather than over the User objects themselves. As a consequence, it fits
a bit awkwardly into the range-based world and it has the weird
extra-dereferencing 'operator->' that so many of our iterators have.
I think this could be fixed by providing something which transforms
a range of T&s into a range of T*s, but that *can* be separated into
another patch, and it isn't yet 100% clear whether this is the right
move.

However, this change gets us most of the benefit and cleans up
a substantial amount of code around Use and User. =]

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

10 years agoUpdate comment from r203315 based on review
Adam Nemet [Sat, 8 Mar 2014 21:51:55 +0000 (21:51 +0000)]
Update comment from r203315 based on review

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

10 years agoAdding some includes to appease build bots. Amends r203354
Aaron Ballman [Sat, 8 Mar 2014 20:15:31 +0000 (20:15 +0000)]
Adding some includes to appease build bots. Amends r203354

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

10 years agoAdding range-based STL-like helper APIs. llvm::distance() is the range version of...
Aaron Ballman [Sat, 8 Mar 2014 20:11:24 +0000 (20:11 +0000)]
Adding range-based STL-like helper APIs. llvm::distance() is the range version of std::distance. llvm::copy is the range version of std::copy.

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

10 years agoMake createObjectImage and createObjectImageFromFile static methods on the
Lang Hames [Sat, 8 Mar 2014 18:45:12 +0000 (18:45 +0000)]
Make createObjectImage and createObjectImageFromFile static methods on the
relevant subclasses of RuntimeDyldImpl. This allows construction of
RuntimeDyldImpl instances to be deferred until after the target architecture is
known.

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

10 years agoChange else if => if after return, after r203265
Duncan P. N. Exon Smith [Sat, 8 Mar 2014 15:15:42 +0000 (15:15 +0000)]
Change else if => if after return, after r203265

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

10 years agoFix 80 cols.
Ahmed Charles [Sat, 8 Mar 2014 12:51:31 +0000 (12:51 +0000)]
Fix 80 cols.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sat, 8 Mar 2014 08:27:28 +0000 (08:27 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sat, 8 Mar 2014 07:51:20 +0000 (07:51 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[bugpoint] Don't ignore arg in -compile-commad="tool arg"
Adam Nemet [Sat, 8 Mar 2014 07:48:19 +0000 (07:48 +0000)]
[bugpoint] Don't ignore arg in -compile-commad="tool arg"

Args is an output parameter of the function lexCommand but the reference
operator was missed.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sat, 8 Mar 2014 07:14:16 +0000 (07:14 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoDe-virtualize a method since it doesn't override anything (yay 'override' keyword...
Craig Topper [Sat, 8 Mar 2014 07:07:08 +0000 (07:07 +0000)]
De-virtualize a method since it doesn't override anything (yay 'override' keyword) and its class is in an anonymous namespace.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sat, 8 Mar 2014 07:02:02 +0000 (07:02 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Sat, 8 Mar 2014 06:31:39 +0000 (06:31 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoDebugInfo: further improvements to test following up on r203329
David Blaikie [Sat, 8 Mar 2014 02:45:53 +0000 (02:45 +0000)]
DebugInfo: further improvements to test following up on r203329

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

10 years agoDebugInfo: Fix test fallout from r203323
David Blaikie [Sat, 8 Mar 2014 01:32:51 +0000 (01:32 +0000)]
DebugInfo: Fix test fallout from r203323

Will fix this harder in a moment.

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

10 years agoDebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in DW_TAG_lexical_blocks
David Blaikie [Sat, 8 Mar 2014 00:58:20 +0000 (00:58 +0000)]
DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in DW_TAG_lexical_blocks

Suggested by Adrian Prantl in code review for r203187

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

10 years agoAdd support for hashing location information for CU level hashes.
Eric Christopher [Sat, 8 Mar 2014 00:29:41 +0000 (00:29 +0000)]
Add support for hashing location information for CU level hashes.
Add a testcase based on sret.cpp where we can now hash the entire
compile unit.

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

10 years ago[DAGCombiner] Distribute TRUNC through AND in rotation amount
Adam Nemet [Fri, 7 Mar 2014 23:56:30 +0000 (23:56 +0000)]
[DAGCombiner] Distribute TRUNC through AND in rotation amount

This is already done for shifts.  Allow it for rotations as well. E.g.:

   (rotl:i32 x, (trunc (and y, 31))) -> (rotl:i32 x, (and (trunc y), 31))

Use the newly factored-out distributeTruncateThroughAnd.

With this patch and some X86.td tweaks we should be able to remove redundant
masking of the rotation amount like in the example above.  HW implicitly
performs this masking.

The testcase will be added as part of the X86 patch.

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

10 years ago[DAGCombiner] Recognize another rotation idiom
Adam Nemet [Fri, 7 Mar 2014 23:56:28 +0000 (23:56 +0000)]
[DAGCombiner] Recognize another rotation idiom

This is the new idiom:

  x<<(y&31) | x>>((0-y)&31)

which is recognized as:

  x ROTL (y&31)

The change refines matchRotateSub.  In
Neg & (OpSize - 1) == (OpSize - Pos) & (OpSize - 1), if Pos is
Pos' & (OpSize - 1) we can just use Pos' instead of Pos.

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

10 years ago[DAGCombiner] Slightly improve readability of matchRotateSub
Adam Nemet [Fri, 7 Mar 2014 23:56:24 +0000 (23:56 +0000)]
[DAGCombiner] Slightly improve readability of matchRotateSub

Slightly change the wording in the function comment. Originally, it can be
misunderstood as we turned the input into two subsequent rotates.

Better connect the comment which talks about Mask and the code which used
LoBits.  Renamed variable to MaskLoBits.

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

10 years agoISel: Make VSELECT selection terminate in cases where the condition type has to
Arnold Schwaighofer [Fri, 7 Mar 2014 23:25:55 +0000 (23:25 +0000)]
ISel: Make VSELECT selection terminate in cases where the condition type has to
be split and the result type widened.

When the condition of a vselect has to be split it makes no sense widening the
vselect and thereby widening the condition. We end up in an endless loop of
widening (vselect result type) and splitting (condition mask type) doing this.
Instead, split both the condition and the vselect and widen the result.

I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

Fixes PR18036.

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

10 years agoRemove unnecessary test for Darwin and update testcase to be a little less
Adrian Prantl [Fri, 7 Mar 2014 23:07:21 +0000 (23:07 +0000)]
Remove unnecessary test for Darwin and update testcase to be a little less
horrible/fragile.
rdar://problem/16264854

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

10 years agoAdd a virtual destructor to quiet a warning.
Eric Christopher [Fri, 7 Mar 2014 22:53:36 +0000 (22:53 +0000)]
Add a virtual destructor to quiet a warning.

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

10 years agoRange-ify some for loops.
Owen Anderson [Fri, 7 Mar 2014 22:48:22 +0000 (22:48 +0000)]
Range-ify some for loops.

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

10 years agoActually add the header file.
Eric Christopher [Fri, 7 Mar 2014 22:43:09 +0000 (22:43 +0000)]
Actually add the header file.

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

10 years agoTwo part patch:
Eric Christopher [Fri, 7 Mar 2014 22:40:37 +0000 (22:40 +0000)]
Two part patch:

First: refactor out the emission of entries into the .debug_loc section
into its own routine.

Second: add a new class ByteStreamer that can be used to either emit
using an AsmPrinter or hash using DIEHash the series of bytes that
would be emitted. Use this in all of the location emission routines
for the .debug_loc section.

No functional change intended outside of a few additional comments
in verbose assembly.

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

10 years agoAdd include guards and make public a few routines that add values
Eric Christopher [Fri, 7 Mar 2014 22:40:30 +0000 (22:40 +0000)]
Add include guards and make public a few routines that add values
to the hash.

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

10 years agoRemove unused method declaration
Eli Bendersky [Fri, 7 Mar 2014 22:19:10 +0000 (22:19 +0000)]
Remove unused method declaration

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

10 years agoRevert "Remove unnecessary check for Darwin. rdar://problem/16264854"
Adrian Prantl [Fri, 7 Mar 2014 22:18:23 +0000 (22:18 +0000)]
Revert "Remove unnecessary check for Darwin. rdar://problem/16264854"

This breaks linux buildbots. Go figure.

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

10 years agoMoved test file from test/MC/Mips to test/CodeGen/Mips.
Sasa Stankovic [Fri, 7 Mar 2014 22:08:46 +0000 (22:08 +0000)]
Moved test file from test/MC/Mips to test/CodeGen/Mips.

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

10 years agoRemove unnecessary check for Darwin. rdar://problem/16264854
Adrian Prantl [Fri, 7 Mar 2014 22:04:42 +0000 (22:04 +0000)]
Remove unnecessary check for Darwin. rdar://problem/16264854

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

10 years agoDebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in inlined functions
David Blaikie [Fri, 7 Mar 2014 22:00:56 +0000 (22:00 +0000)]
DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in inlined functions

Suggested by Adrian Prantl in code review for r203187.

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

10 years agoDebugInfo: Update test to cover linux (with a FIXME...) too
David Blaikie [Fri, 7 Mar 2014 22:00:49 +0000 (22:00 +0000)]
DebugInfo: Update test to cover linux (with a FIXME...) too

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

10 years ago[C++11] Revert uses of lambdas with array_pod_sort.
Benjamin Kramer [Fri, 7 Mar 2014 21:52:38 +0000 (21:52 +0000)]
[C++11] Revert uses of lambdas with array_pod_sort.

Looks like GCC implements the lambda->function pointer conversion differently.

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

10 years ago[C++11] Convert sort predicates into lambdas.
Benjamin Kramer [Fri, 7 Mar 2014 21:35:39 +0000 (21:35 +0000)]
[C++11] Convert sort predicates into lambdas.

No functionality change.

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

10 years agoActually include the ArrayRef header rather than rely on the forward
Eric Christopher [Fri, 7 Mar 2014 21:30:49 +0000 (21:30 +0000)]
Actually include the ArrayRef header rather than rely on the forward
declaration.

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

10 years agoFix up formatting.
Eric Christopher [Fri, 7 Mar 2014 21:27:42 +0000 (21:27 +0000)]
Fix up formatting.

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

10 years agoFix EXPECT_* to not produce a compile warning.
Eli Bendersky [Fri, 7 Mar 2014 21:04:24 +0000 (21:04 +0000)]
Fix EXPECT_* to not produce a compile warning.

EXPECT_TRUE/FALSE is also more idiomatic for booleans than EXPECT_EQ

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

10 years agoR600/SI: Using SGPRs is illegal for instructions that read carry-out from VCC
Tom Stellard [Fri, 7 Mar 2014 20:12:39 +0000 (20:12 +0000)]
R600/SI: Using SGPRs is illegal for instructions that read carry-out from VCC

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

10 years agoR600/SI: Custom lower i1 stores
Tom Stellard [Fri, 7 Mar 2014 20:12:33 +0000 (20:12 +0000)]
R600/SI: Custom lower i1 stores

These are sometimes created by the shrink to boolean optimization in the
globalopt pass.

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

10 years ago[C++11] DwarfDebug: Turn single-use functors into lambdas.
Benjamin Kramer [Fri, 7 Mar 2014 19:41:22 +0000 (19:41 +0000)]
[C++11] DwarfDebug: Turn single-use functors into lambdas.

No functionality change.

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

10 years ago[ADT] Update PointerIntPair to handle pointer types with more than 31 bits free.
Jordan Rose [Fri, 7 Mar 2014 19:19:56 +0000 (19:19 +0000)]
[ADT] Update PointerIntPair to handle pointer types with more than 31 bits free.

Previously, the assertions in PointerIntPair would try to calculate the value
(1 << NumLowBitsAvailable); the inferred type here is 'int', so if there were
more than 31 bits available we'd get a shift overflow.

Also, add a rudimentary unit test file for PointerIntPair.

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

10 years ago[docs] Teach CMake docs build how to generate Qt Creator help/documentation files.
Michael Gottesman [Fri, 7 Mar 2014 19:19:28 +0000 (19:19 +0000)]
[docs] Teach CMake docs build how to generate Qt Creator help/documentation files.

Patch by Konrad Kleine.

Differential Revision: http://llvm-reviews.chandlerc.com/D2967

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

10 years ago[C++11] DwarfDebug: Use range-based for loops.
Benjamin Kramer [Fri, 7 Mar 2014 19:09:39 +0000 (19:09 +0000)]
[C++11] DwarfDebug: Use range-based for loops.

It has a lot of them with complex types. C++11 really shines here.

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

10 years agoDon't avoid cfi instructions on the bg/p.
Rafael Espindola [Fri, 7 Mar 2014 19:04:12 +0000 (19:04 +0000)]
Don't avoid cfi instructions on the bg/p.

The integrated assembler now works for ppc. Since this was the last use of the
bg/p predicate and Hal says that it is now dead, drop the predicate too.

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

10 years agoRemove dead 'break' (dominated by 'return').
Ted Kremenek [Fri, 7 Mar 2014 18:54:08 +0000 (18:54 +0000)]
Remove dead 'break' (dominated by 'return').

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

10 years agoRemove dead 'return'.
Ted Kremenek [Fri, 7 Mar 2014 18:51:16 +0000 (18:51 +0000)]
Remove dead 'return'.

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

10 years agoMC: Use MachO::SectionType for MCSectionMachO::getType's return type
David Majnemer [Fri, 7 Mar 2014 18:49:54 +0000 (18:49 +0000)]
MC: Use MachO::SectionType for MCSectionMachO::getType's return type

This is a straightfoward replacement, it makes debugging a little
easier.

This has no functional impact.

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

10 years agoDebugInfo: Refactor high_pc/low_pc construction into reusable function
David Blaikie [Fri, 7 Mar 2014 18:49:45 +0000 (18:49 +0000)]
DebugInfo: Refactor high_pc/low_pc construction into reusable function

For incoming improvements to inlined functions and lexical blocks
suggested by Adrian Prantl in review of r203187.

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

10 years ago"Mac OS/X" -> "Mac OS X" spelling fixes for llvm.
Nico Weber [Fri, 7 Mar 2014 18:08:54 +0000 (18:08 +0000)]
"Mac OS/X" -> "Mac OS X" spelling fixes for llvm.

Patch from Sean McBride <sean@rogue-research.com>!

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

10 years agoC++11: Remove const from in auto guidelines
Duncan P. N. Exon Smith [Fri, 7 Mar 2014 18:06:15 +0000 (18:06 +0000)]
C++11: Remove const from in auto guidelines

Using const is orthogonal to guidelines on using auto& and auto*.

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

10 years agoDebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per spec
David Blaikie [Fri, 7 Mar 2014 18:04:24 +0000 (18:04 +0000)]
DebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per spec

Code review feedback to r203187 from Oliver Stannard. Thanks!

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

10 years agoC++11: Copy pointers with const auto *
Duncan P. N. Exon Smith [Fri, 7 Mar 2014 17:23:29 +0000 (17:23 +0000)]
C++11: Copy pointers with const auto *

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

10 years agoARM: Make .unreq directives case-insensitive
Duncan P. N. Exon Smith [Fri, 7 Mar 2014 16:16:52 +0000 (16:16 +0000)]
ARM: Make .unreq directives case-insensitive

Be case-insensitive when processing .unreq directives.

Patch by Lin Zuojian!

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

10 years ago[C++11] Now that the users are gone, rip out the duplicated traits from type_traits.h
Benjamin Kramer [Fri, 7 Mar 2014 15:54:23 +0000 (15:54 +0000)]
[C++11] Now that the users are gone, rip out the duplicated traits from type_traits.h

Simplify the remaining ones a bit.

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

10 years agoAdd missing std:: qualifiers
Dmitri Gribenko [Fri, 7 Mar 2014 14:55:30 +0000 (14:55 +0000)]
Add missing std:: qualifiers

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

10 years agoMake header standalone for libstdc++.
Benjamin Kramer [Fri, 7 Mar 2014 14:43:48 +0000 (14:43 +0000)]
Make header standalone for libstdc++.

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

10 years ago[C++11] Replace LLVM-style type traits with C++11 standard ones.
Benjamin Kramer [Fri, 7 Mar 2014 14:42:25 +0000 (14:42 +0000)]
[C++11] Replace LLVM-style type traits with C++11 standard ones.

No functionality change.

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

10 years ago[SystemZ] Move sign_extend optimization to PerformDAGCombine
Richard Sandiford [Fri, 7 Mar 2014 11:34:35 +0000 (11:34 +0000)]
[SystemZ] Move sign_extend optimization to PerformDAGCombine

The target was marking SIGN_EXTEND as Custom because it wanted to optimize
certain sign-extended shifts.  In all other respects the extension is Legal,
so it'd be better to do the optimization in PerformDAGCombine instead.

No functional change intended.

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

10 years agoCodeGenPrep: sink extends of illegal types into use block.
Tim Northover [Fri, 7 Mar 2014 11:04:30 +0000 (11:04 +0000)]
CodeGenPrep: sink extends of illegal types into use block.

This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

Patch by Manuel Jacob.

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

10 years agoInstCombine: form shuffles from wider range of insert/extractelements
Tim Northover [Fri, 7 Mar 2014 10:24:44 +0000 (10:24 +0000)]
InstCombine: form shuffles from wider range of insert/extractelements

Sequences of insertelement/extractelements are sometimes used to build
vectorsr; this code tries to put them back together into shuffles, but
could only produce a completely uniform shuffle types (<N x T> from two
<N x T> sources).

This should allow shuffles with different numbers of elements on the
input and output sides as well.

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

10 years agoChange MCDisassembler::setSymbolizer to take unique_ptr by value.
Ahmed Charles [Fri, 7 Mar 2014 09:38:02 +0000 (09:38 +0000)]
Change MCDisassembler::setSymbolizer to take unique_ptr by value.

This changes the interface to be more explicit that ownership is being
transferred.

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

10 years agoRemove unused method.
Craig Topper [Fri, 7 Mar 2014 09:26:53 +0000 (09:26 +0000)]
Remove unused method.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Fri, 7 Mar 2014 09:26:03 +0000 (09:26 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoEnable FeatureFastUAMem for Silvermont processor
Alexey Volkov [Fri, 7 Mar 2014 09:03:49 +0000 (09:03 +0000)]
Enable FeatureFastUAMem for Silvermont processor

Differential Revision: http://llvm-reviews.chandlerc.com/D2982

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

10 years agoTest commit
Alexey Volkov [Fri, 7 Mar 2014 08:28:44 +0000 (08:28 +0000)]
Test commit
Removed whitespace

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

10 years agoMC: Remove superfluous section attribute flag definitions
David Majnemer [Fri, 7 Mar 2014 07:36:05 +0000 (07:36 +0000)]
MC: Remove superfluous section attribute flag definitions

Summary:
llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same
definitions for the section flags.  Instead, grab the definitions out of
support.

No functionality change.

Reviewers: grosbach, Bigcheese, rafael

Reviewed By: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2998

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

10 years ago[Typo] Fix sentence in CMake documentation.
Ahmed Charles [Fri, 7 Mar 2014 06:24:30 +0000 (06:24 +0000)]
[Typo] Fix sentence in CMake documentation.

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

10 years agoReplace PROLOG_LABEL with a new CFI_INSTRUCTION.
Rafael Espindola [Fri, 7 Mar 2014 06:08:31 +0000 (06:08 +0000)]
Replace PROLOG_LABEL with a new CFI_INSTRUCTION.

The old system was fairly convoluted:
* A temporary label was created.
* A single PROLOG_LABEL was created with it.
* A few MCCFIInstructions were created with the same label.

The semantics were that the cfi instructions were mapped to the PROLOG_LABEL
via the temporary label. The output position was that of the PROLOG_LABEL.
The temporary label itself was used only for doing the mapping.

The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to
one by holding an index into the CFI instructions of this function.

I did consider removing MMI.getFrameInstructions completelly and having
CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non
trivial constructors and destructors and are somewhat big, so the this setup
is probably better.

The net result is that we don't create temporary labels that are never used.

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

10 years agoclang-format a bit of code to make the next patch easier to read.
Rafael Espindola [Fri, 7 Mar 2014 05:32:03 +0000 (05:32 +0000)]
clang-format a bit of code to make the next patch easier to read.

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

10 years agoSimplify. No functionality change.
Rafael Espindola [Fri, 7 Mar 2014 04:58:32 +0000 (04:58 +0000)]
Simplify. No functionality change.

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

10 years agoSimplify. No functionality change.
Rafael Espindola [Fri, 7 Mar 2014 04:45:03 +0000 (04:45 +0000)]
Simplify. No functionality change.

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

10 years agoAllow constant folding of round function whenever feasible
Karthik Bhat [Fri, 7 Mar 2014 04:36:21 +0000 (04:36 +0000)]
Allow constant folding of round function whenever feasible

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