oota-llvm.git
11 years agoAdded missing dashes from header declaration comment.
Michael Gottesman [Tue, 29 Jan 2013 04:53:55 +0000 (04:53 +0000)]
Added missing dashes from header declaration comment.

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

11 years agoJuggled Debug.h from ObjCARC.h to only the including cpp files that
Michael Gottesman [Tue, 29 Jan 2013 04:51:59 +0000 (04:51 +0000)]
Juggled Debug.h from ObjCARC.h to only the including cpp files that
actually have DEBUG statements. Also changed raw_ostream in said header
to be a forward declaration (removing an include).

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

11 years agoSorted includes using utils/sort_includes.
Michael Gottesman [Tue, 29 Jan 2013 04:20:52 +0000 (04:20 +0000)]
Sorted includes using utils/sort_includes.

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

11 years agoAdded two missing headers from ObjCARCAliasAnalysis.h.
Michael Gottesman [Tue, 29 Jan 2013 04:09:24 +0000 (04:09 +0000)]
Added two missing headers from ObjCARCAliasAnalysis.h.

This was missed since whenever I was including ObjCARCAliasAnalysis.h, I
was including ObjCARC.h before it which included these includes
(resulting in no compilation breakage).

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

11 years agoRemoved InstCombine/Targets as library dependencies for libObjCARCOpts since they...
Michael Gottesman [Tue, 29 Jan 2013 04:05:17 +0000 (04:05 +0000)]
Removed InstCombine/Targets as library dependencies for libObjCARCOpts since they are unnecessary.

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

11 years agoConvert getAttributes() to return an AttributeSetNode.
Bill Wendling [Tue, 29 Jan 2013 03:20:31 +0000 (03:20 +0000)]
Convert getAttributes() to return an AttributeSetNode.

The AttributeSetNode contains all of the attributes. This removes one (hopefully
last) use of the Attribute class as a container of multiple attributes.

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

11 years agoExtracted ObjCARCContract from ObjCARCOpts into its own file.
Michael Gottesman [Tue, 29 Jan 2013 03:03:03 +0000 (03:03 +0000)]
Extracted ObjCARCContract from ObjCARCOpts into its own file.

This also required adding 2x headers Dependency Analysis.h/Provenance Analysis.h
and a .cpp file DependencyAnalysis.cpp to unentangle the dependencies inbetween
ObjCARCContract and ObjCARCOpts.

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

11 years agoRemoved some cruft from ObjCARCAliasAnalysis.cpp.
Michael Gottesman [Tue, 29 Jan 2013 03:02:59 +0000 (03:02 +0000)]
Removed some cruft from ObjCARCAliasAnalysis.cpp.

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

11 years agoTeach SDISel to combine fsin / fcos into a fsincos node if the following
Evan Cheng [Tue, 29 Jan 2013 02:32:37 +0000 (02:32 +0000)]
Teach SDISel to combine fsin / fcos into a fsincos node if the following
conditions are met:
1. They share the same operand and are in the same BB.
2. Both outputs are used.
3. The target has a native instruction that maps to ISD::FSINCOS node or
   the target provides a sincos library call.

Implemented the generic optimization in sdisel and enabled it for
Mac OSX. Also added an additional optimization for x86_64 Mac OSX by
using an alternative entry point __sincos_stret which returns the two
results in xmm0 / xmm1.

rdar://13087969
PR13204

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

11 years agoUse an AttrBuilder to generate the correct AttributeSet.
Bill Wendling [Tue, 29 Jan 2013 01:43:29 +0000 (01:43 +0000)]
Use an AttrBuilder to generate the correct AttributeSet.

We no longer accept an encoded integer as representing all of the
attributes. Convert this via the AttrBuilder class into an AttributeSet with the
correct representation (an AttributeSetImpl that holds a list of Attribute
objects).

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

11 years agoConvert the AttrBuilder into a list of Attributes instead of one Attribute object...
Bill Wendling [Tue, 29 Jan 2013 01:02:03 +0000 (01:02 +0000)]
Convert the AttrBuilder into a list of Attributes instead of one Attribute object that holds all of its attributes.

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

11 years agoFormatting correction
Andrew Kaylor [Tue, 29 Jan 2013 00:50:18 +0000 (00:50 +0000)]
Formatting correction

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

11 years agoS'more small non-functional changes in comments and #includes.
Bill Wendling [Tue, 29 Jan 2013 00:48:16 +0000 (00:48 +0000)]
S'more small non-functional changes in comments and #includes.

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

11 years agoReorder some functions and add comments. No functionality change.
Bill Wendling [Tue, 29 Jan 2013 00:34:06 +0000 (00:34 +0000)]
Reorder some functions and add comments. No functionality change.

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

11 years agoUnroll again after running BBVectorize
Hal Finkel [Tue, 29 Jan 2013 00:22:49 +0000 (00:22 +0000)]
Unroll again after running BBVectorize

Because BBVectorize may significantly shorten a loop body, unroll
again after vectorization. This is especially important when using
runtime or partial unrolling.

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

11 years agoAdd isBGQ method to PPCSubtarget
Hal Finkel [Tue, 29 Jan 2013 00:22:47 +0000 (00:22 +0000)]
Add isBGQ method to PPCSubtarget

This function will be used in future commits.

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

11 years agoTry to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.
Bill Wendling [Mon, 28 Jan 2013 22:33:39 +0000 (22:33 +0000)]
Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.

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

11 years agoAvoid Unnecessary Builds
David Greene [Mon, 28 Jan 2013 22:05:50 +0000 (22:05 +0000)]
Avoid Unnecessary Builds

By default, stop the universe build if a key component fails.  This
avoids useless builds when we know a package is broken anyway.
Provide a --keep-going option to override this behavior.

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

11 years agoRemove the AttributeWithIndex class.
Bill Wendling [Mon, 28 Jan 2013 21:55:20 +0000 (21:55 +0000)]
Remove the AttributeWithIndex class.

The AttributeWithIndex class exposed the interior structure of the AttributeSet
class. That was gross. Remove it and all of the code that relied upon it.

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

11 years agoAdd a comment mentioning that InstructionSimplify routines do,
Dan Gohman [Mon, 28 Jan 2013 21:45:32 +0000 (21:45 +0000)]
Add a comment mentioning that InstructionSimplify routines do,
in fact, resolve undef uses.

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

11 years agodocs: reorganize front page slightly
Sean Silva [Mon, 28 Jan 2013 21:28:10 +0000 (21:28 +0000)]
docs: reorganize front page slightly

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

11 years agoAdd support for source and line information to IntelJITEventListener for object emitt...
Andrew Kaylor [Mon, 28 Jan 2013 19:52:37 +0000 (19:52 +0000)]
Add support for source and line information to IntelJITEventListener for object emitted by MCJIT.

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

11 years agoFix gcc/printf/ISO C++ warning
Edwin Vane [Mon, 28 Jan 2013 19:34:42 +0000 (19:34 +0000)]
Fix gcc/printf/ISO C++ warning

Remove the use of the 't' length modifier to avoid a gcc warning. Based
on usage, 32 bits of precision is good enough for printing a stack
offset for a stack trace.

't' length modifier isn't in C++03 but it *is* in C++11. Added a FIXME
to reintroduce once LLVM makes the switch to C++11.

Reviewer: gribozavr

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

11 years agoThis patch addresses bug 15031.
Bill Schmidt [Mon, 28 Jan 2013 18:36:58 +0000 (18:36 +0000)]
This patch addresses bug 15031.

The common code in the post-RA scheduler to break anti-dependencies on the
critical path contained a flaw.  In the reported case, an anti-dependency
between the overlapping registers %X4 and %R4 exists:

%X29<def> = OR8 %X4, %X4
%R4<def>, %X3<def,dead,tied3> = LBZU 1, %X3<kill,tied1>

The unpatched code breaks the dependency by replacing %R4 and its uses
with %R3, the first register on the available list.  However, %R3 and
%X3 overlap, so this creates two overlapping definitions on the same
instruction.

The fix is straightforward, preventing selection of a register that
overlaps any other defined register on the same instruction.

The test case is reduced from the bug report, and verifies that we no
longer produce "lbzu 3, 1(3)" when breaking this anti-dependency.

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

11 years agoFix comment.
Eric Christopher [Mon, 28 Jan 2013 17:33:26 +0000 (17:33 +0000)]
Fix comment.

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

11 years agoVectorization Factor clarification
Renato Golin [Mon, 28 Jan 2013 16:02:45 +0000 (16:02 +0000)]
Vectorization Factor clarification

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

11 years ago[msan] Mostly disable msan-handle-icmp-exact.
Evgeniy Stepanov [Mon, 28 Jan 2013 11:42:28 +0000 (11:42 +0000)]
[msan] Mostly disable msan-handle-icmp-exact.

It is way too slow. Change the default option value to 0.
Always do exact shadow propagation for unsigned ICmp with constants, it is
cheap (under 1% cpu time) and required for correctness.

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

11 years agoRevert r173678.
Evgeniy Stepanov [Mon, 28 Jan 2013 09:18:40 +0000 (09:18 +0000)]
Revert r173678.

Broken tests.

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

11 years ago[msan] Make msan-handle-icmp-exact=0 by default.
Evgeniy Stepanov [Mon, 28 Jan 2013 09:15:15 +0000 (09:15 +0000)]
[msan] Make msan-handle-icmp-exact=0 by default.

50% slowdown on one of the specs.

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

11 years agoFix 256-bit PALIGNR comment decoding to understand that it works on independent 256...
Craig Topper [Mon, 28 Jan 2013 07:41:18 +0000 (07:41 +0000)]
Fix 256-bit PALIGNR comment decoding to understand that it works on independent 256-bit lanes.

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

11 years agoA bugfix for tblgen, in the function ‘emitSourceFileHeader’.
Nadav Rotem [Mon, 28 Jan 2013 07:35:33 +0000 (07:35 +0000)]
A bugfix for tblgen, in the function ‘emitSourceFileHeader’.
When the first parameter (‘Desc’) is more than 80 characters long, it will result the header line that contains the description to be more
Than (4GB!) long. Not only it takes forever to produce, the output file cannot be open, since its ginormous.

Patch by Elior Malul.

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

11 years agoAdd missing break in 256-bit palignr comment printing. No test case yet because the...
Craig Topper [Mon, 28 Jan 2013 07:19:11 +0000 (07:19 +0000)]
Add missing break in 256-bit palignr comment printing. No test case yet because the comment itself is still wrong.

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

11 years agoFix inconsistent usage of PALIGN and PALIGNR when referring to the same instruction.
Craig Topper [Mon, 28 Jan 2013 06:48:25 +0000 (06:48 +0000)]
Fix inconsistent usage of PALIGN and PALIGNR when referring to the same instruction.

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

11 years agoCreated ObjCARCUtil.cpp for functions which in my humble opinion are too large to...
Michael Gottesman [Mon, 28 Jan 2013 06:39:31 +0000 (06:39 +0000)]
Created ObjCARCUtil.cpp for functions which in my humble opinion are too large to static inline and place in a header file such as ObjCARC.h.

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

11 years agoRemove addToNoHelperNeeded function that was left unused after r173649. Fixes a ...
Craig Topper [Mon, 28 Jan 2013 06:09:24 +0000 (06:09 +0000)]
Remove addToNoHelperNeeded function that was left unused after r173649. Fixes a -Wunused warning.

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

11 years agoCleaned up includes in various ObjCARC files and removed some whitespace violations.
Michael Gottesman [Mon, 28 Jan 2013 05:51:58 +0000 (05:51 +0000)]
Cleaned up includes in various ObjCARC files and removed some whitespace violations.

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

11 years agoRefactor ObjCARCAliasAnalysis into its own file.
Michael Gottesman [Mon, 28 Jan 2013 05:51:54 +0000 (05:51 +0000)]
Refactor ObjCARCAliasAnalysis into its own file.

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

11 years agoMid-air collision. reapply r173656.
Bill Wendling [Mon, 28 Jan 2013 05:51:40 +0000 (05:51 +0000)]
Mid-air collision. reapply r173656.

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

11 years agoRewrite the removeAttr() method.
Bill Wendling [Mon, 28 Jan 2013 05:44:14 +0000 (05:44 +0000)]
Rewrite the removeAttr() method.

This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset (with the requested attributes removed). And then adds the
rest of the subsets.

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

11 years agoRewrite the addAttr() method.
Bill Wendling [Mon, 28 Jan 2013 05:23:28 +0000 (05:23 +0000)]
Rewrite the addAttr() method.

This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset. And then adds the rest of the subsets.

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

11 years agoRevert r173646, "Use proper type for the index."
NAKAMURA Takumi [Mon, 28 Jan 2013 04:29:01 +0000 (04:29 +0000)]
Revert r173646, "Use proper type for the index."

Unfortunately, msvc miscompiles it. Investigating.

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

11 years agoRefactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.
Michael Gottesman [Mon, 28 Jan 2013 04:12:07 +0000 (04:12 +0000)]
Refactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.

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

11 years agoFixed case insensitive issue.
Michael Gottesman [Mon, 28 Jan 2013 03:35:20 +0000 (03:35 +0000)]
Fixed case insensitive issue.

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

11 years agoRemoved extraneous doxygen end module statement.
Michael Gottesman [Mon, 28 Jan 2013 03:30:34 +0000 (03:30 +0000)]
Removed extraneous doxygen end module statement.

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

11 years agoExtracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.
Michael Gottesman [Mon, 28 Jan 2013 03:28:38 +0000 (03:28 +0000)]
Extracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.

I also added the local header ObjCARC.h for common functions used by the
various passes.

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

11 years agoImproved svn repo searching for 'make update'
Edwin Vane [Mon, 28 Jan 2013 03:19:57 +0000 (03:19 +0000)]
Improved svn repo searching for 'make update'

Use a simple recursive bash function to search for svn repos for the 'make
update' target thus including projects like clang-tools-extra.

Reviewers: bkramer, echristo

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

11 years agoMake some code a little simpler.
Reed Kotler [Mon, 28 Jan 2013 02:46:49 +0000 (02:46 +0000)]
Make some code a little simpler.

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

11 years agoExtracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for...
Michael Gottesman [Mon, 28 Jan 2013 01:35:51 +0000 (01:35 +0000)]
Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.

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

11 years agoUse proper type for the index.
Bill Wendling [Mon, 28 Jan 2013 01:30:29 +0000 (01:30 +0000)]
Use proper type for the index.

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

11 years agoRemove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
Bill Wendling [Mon, 28 Jan 2013 01:11:42 +0000 (01:11 +0000)]
Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.

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

11 years agoRemove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
Bill Wendling [Mon, 28 Jan 2013 00:46:02 +0000 (00:46 +0000)]
Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.

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

11 years agoRemove a use of AttributeWithIndex.
Bill Wendling [Mon, 28 Jan 2013 00:21:34 +0000 (00:21 +0000)]
Remove a use of AttributeWithIndex.

We want to remove AttributeWithIndex because it provides a non-encapsulated view
of the AttributeSetImpl object. Instead, use accessor methods and iterators.

Eventually, this code can be simplified because the Attribute object will hold
only one attribute instead of multiple attributes.

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

11 years agoImprove the debug output a bit.
Bill Wendling [Sun, 27 Jan 2013 23:53:56 +0000 (23:53 +0000)]
Improve the debug output a bit.

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

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:50:44 +0000 (23:50 +0000)]
Use proper return type for attribute index.

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

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:49:44 +0000 (23:49 +0000)]
Use proper return type for attribute index.

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

11 years agoPush the calculation of the 'Raw' attribute mask down into the implementation. It...
Bill Wendling [Sun, 27 Jan 2013 23:41:29 +0000 (23:41 +0000)]
Push the calculation of the 'Raw' attribute mask down into the implementation. It in turn uses the correct list for calculating the 'Raw' value.

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

11 years agoDon't erase these methods. They're used during testing.
Bill Wendling [Sun, 27 Jan 2013 22:46:17 +0000 (22:46 +0000)]
Don't erase these methods. They're used during testing.

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

11 years agoAdd special 'get' methods to create an Attribute with an alignment. Also do some...
Bill Wendling [Sun, 27 Jan 2013 22:43:04 +0000 (22:43 +0000)]
Add special 'get' methods to create an Attribute with an alignment. Also do some random cleanup. No functionality change.

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

11 years ago[XCore] Add missing l2rus instructions.
Richard Osborne [Sun, 27 Jan 2013 22:28:30 +0000 (22:28 +0000)]
[XCore] Add missing l2rus instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years agoPrivitize some the copy c'tor and assignment operator of uniquified objects.
Bill Wendling [Sun, 27 Jan 2013 21:38:03 +0000 (21:38 +0000)]
Privitize some the copy c'tor and assignment operator of uniquified objects.

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

11 years agoAdd some helpful comments.
Bill Wendling [Sun, 27 Jan 2013 21:32:11 +0000 (21:32 +0000)]
Add some helpful comments.

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

11 years ago[XCore] Add missing l2r instructions.
Richard Osborne [Sun, 27 Jan 2013 21:26:02 +0000 (21:26 +0000)]
[XCore] Add missing l2r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years agos/AttrList/pImpl/g in AttributeSet. No functionality change.
Bill Wendling [Sun, 27 Jan 2013 21:23:46 +0000 (21:23 +0000)]
s/AttrList/pImpl/g in AttributeSet. No functionality change.

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

11 years agoStart using more of the AttrNode in the AttributeSetImpl class.
Bill Wendling [Sun, 27 Jan 2013 21:20:06 +0000 (21:20 +0000)]
Start using more of the AttrNode in the AttributeSetImpl class.

Also add some asserts.

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

11 years agoLegalizer: Reword comment again, per Duncan's suggestion.
Benjamin Kramer [Sun, 27 Jan 2013 21:02:52 +0000 (21:02 +0000)]
Legalizer: Reword comment again, per Duncan's suggestion.

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

11 years ago[XCore] Add missing 1r instructions.
Richard Osborne [Sun, 27 Jan 2013 20:46:21 +0000 (20:46 +0000)]
[XCore] Add missing 1r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years ago[XCore] Add missing 0r instructions.
Richard Osborne [Sun, 27 Jan 2013 20:42:57 +0000 (20:42 +0000)]
[XCore] Add missing 0r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

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

11 years agoBBVectorize: Better use of TTI->getShuffleCost
Hal Finkel [Sun, 27 Jan 2013 20:07:01 +0000 (20:07 +0000)]
BBVectorize: Better use of TTI->getShuffleCost

When flipping the pair of subvectors that form a vector, if the
vector length is 2, we can use the SK_Reverse shuffle kind to get
more-accurate cost information. Also we can use the SK_ExtractSubvector
shuffle kind to get accurate subvector extraction costs.

The current cost model implementations don't yet seem complex enough
for this to make a difference (thus, there are no test cases with this
commit), but it should help in future.

Depending on how the various targets optimize and combine shuffles in
practice, we might be able to get more-accurate costs by combining the
costs of multiple shuffle kinds. For example, the cost of flipping the
subvector pairs could be modeled as two extractions and two subvector
insertions. These changes, however, should probably be motivated
by specific test cases.

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

11 years agoLegalizer: Add an assert and tweak a comment to clarify the assumptions this code...
Benjamin Kramer [Sun, 27 Jan 2013 15:04:43 +0000 (15:04 +0000)]
Legalizer: Add an assert and tweak a comment to clarify the assumptions this code makes.

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

11 years agoIn the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attribut...
Bill Wendling [Sun, 27 Jan 2013 12:50:02 +0000 (12:50 +0000)]
In the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attributes being passed in.

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

11 years ago[CMake][Lit][unittests] Cleanup in AddLLVM.cmake.
NAKAMURA Takumi [Sun, 27 Jan 2013 12:46:53 +0000 (12:46 +0000)]
[CMake][Lit][unittests] Cleanup in AddLLVM.cmake.

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

11 years ago[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
NAKAMURA Takumi [Sun, 27 Jan 2013 12:20:50 +0000 (12:20 +0000)]
[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.

For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

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

11 years agoWhen the legalizer is splitting vector shifts, the result may not have the right...
Benjamin Kramer [Sun, 27 Jan 2013 11:19:11 +0000 (11:19 +0000)]
When the legalizer is splitting vector shifts, the result may not have the right shift amount type.

Fix that by adding a cast to the shift expander. This came up with vector shifts
on sse-less X86 CPUs.

   <2 x i64>       = shl <2 x i64> <2 x i64>
-> i64,i64         = shl i64 i64; shl i64 i64
-> i32,i32,i32,i32 = shl_parts i32 i32 i64; shl_parts i32 i32 i64

Now we cast the last two i64s to the right type. Fixes the crash in PR14668.

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

11 years agoFix miscompile. Add back the use of the ArrayRef version of the ::get method.
Bill Wendling [Sun, 27 Jan 2013 10:28:39 +0000 (10:28 +0000)]
Fix miscompile. Add back the use of the ArrayRef version of the ::get method.

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

11 years agoRearrange some deckchairs. Moving the class before it's use.
Bill Wendling [Sun, 27 Jan 2013 10:00:13 +0000 (10:00 +0000)]
Rearrange some deckchairs. Moving the class before it's use.

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

11 years agoRemove dead methods.
Bill Wendling [Sun, 27 Jan 2013 09:55:44 +0000 (09:55 +0000)]
Remove dead methods.

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

11 years agoRe-revert r173342, without losing the compile time improvements, flat
Chandler Carruth [Sun, 27 Jan 2013 06:42:03 +0000 (06:42 +0000)]
Re-revert r173342, without losing the compile time improvements, flat
out bug fixes, or functionality preserving refactorings.

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

11 years agoRenamed function IsPotentialUse to IsPotentialRetainableObjPtr.
Michael Gottesman [Sun, 27 Jan 2013 06:19:48 +0000 (06:19 +0000)]
Renamed function IsPotentialUse to IsPotentialRetainableObjPtr.

This name change does the following:

1. Causes the function name to use proper ARC terminology.
2. Makes it clear what the function truly does.

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

11 years agoFix test to not use the AttributeSet's AttributeWithIndex creation method.
Bill Wendling [Sun, 27 Jan 2013 03:39:10 +0000 (03:39 +0000)]
Fix test to not use the AttributeSet's AttributeWithIndex creation method.

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

11 years agoHide the method that creates an AttributeSet with AttributeWithIndexes.
Bill Wendling [Sun, 27 Jan 2013 03:35:32 +0000 (03:35 +0000)]
Hide the method that creates an AttributeSet with AttributeWithIndexes.

This method will go away once AttributeWithIndex goes away. In the meantime,
hide it from general use.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 03:25:05 +0000 (03:25 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:24:02 +0000 (02:24 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:08:22 +0000 (02:08 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:57:28 +0000 (01:57 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:44:34 +0000 (01:44 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

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

11 years agoConvert the CPP backend to use the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:22:51 +0000 (01:22 +0000)]
Convert the CPP backend to use the AttributeSet instead of AttributeWithIndex.

Further removal of the introspective AttributeWithIndex thing. Also fix the #includes.

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

11 years agoUse the AttributeSet instead of AttributeWithIndex object.
Bill Wendling [Sun, 27 Jan 2013 00:36:48 +0000 (00:36 +0000)]
Use the AttributeSet instead of AttributeWithIndex object.

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

11 years agoPR14566: Debug Info: Removing top level lexical blocks
David Blaikie [Sat, 26 Jan 2013 21:55:23 +0000 (21:55 +0000)]
PR14566: Debug Info: Removing top level lexical blocks

This adds support for LLVM to accept metadata that doesn't include a top level
lexical block in a function. Specifically LLVM couldn't handle this when there
were file changes relating to these blocks. I've updated a few test cases to
ensure other functionality (such as inlining) isn't affected by this change, but
haven't pervasively updated all the test cases.

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

11 years agoIRBuilder: Remove redundant check around SetInstDebugLocation call.
David Blaikie [Sat, 26 Jan 2013 21:55:19 +0000 (21:55 +0000)]
IRBuilder: Remove redundant check around SetInstDebugLocation call.

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

11 years agoBBVectorize: Add a additional comment about the cost computation
Hal Finkel [Sat, 26 Jan 2013 16:49:04 +0000 (16:49 +0000)]
BBVectorize: Add a additional comment about the cost computation

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

11 years agoBBVectorize: Fix anomalous capital letter in comment
Hal Finkel [Sat, 26 Jan 2013 16:49:03 +0000 (16:49 +0000)]
BBVectorize: Fix anomalous capital letter in comment

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

11 years agoX86: Decode PALIGN operands so I don't have to do it in my head.
Benjamin Kramer [Sat, 26 Jan 2013 13:31:37 +0000 (13:31 +0000)]
X86: Decode PALIGN operands so I don't have to do it in my head.

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

11 years agoDocumentation: fix syntax error
Dmitri Gribenko [Sat, 26 Jan 2013 13:30:13 +0000 (13:30 +0000)]
Documentation: fix syntax error

Patch by David Waggoner

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

11 years agoX86: Do splat promotion later, so the optimizer can chew on it first.
Benjamin Kramer [Sat, 26 Jan 2013 11:44:21 +0000 (11:44 +0000)]
X86: Do splat promotion later, so the optimizer can chew on it first.

This catches many cases where we can emit a more efficient shuffle for a
specific mask or when the mask contains undefs. Once the splat is lowered to
unpacks we can't do that anymore.

There is a possibility of moving the promotion after pshufb matching, but I'm
not sure if pshufb with a mask loaded from memory is faster than 3 shuffles, so
I avoided that for now.

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

11 years agoFileCheckize and merge some tests.
Benjamin Kramer [Sat, 26 Jan 2013 11:14:32 +0000 (11:14 +0000)]
FileCheckize and merge some tests.

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

11 years agoObject/RelocVisitor: Add minimal support, R_MIPS_32, for mips.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:36 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_MIPS_32, for mips.

It fixes llvm-dwarfdump for mips and mipsel.

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

11 years agoObject/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:29 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.

It fixes llvm-dwarfdump for ppc64-elf.

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

11 years agoRelocVisitor::visit(): Set hasError in the default path.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:23 +0000 (08:27 +0000)]
RelocVisitor::visit(): Set hasError in the default path.

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

11 years agofix use of std::std. it's ordered set.
Reed Kotler [Sat, 26 Jan 2013 06:58:35 +0000 (06:58 +0000)]
fix use of std::std. it's ordered set.

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

11 years agoDWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?
NAKAMURA Takumi [Sat, 26 Jan 2013 01:45:06 +0000 (01:45 +0000)]
DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?

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