11 years agoReset the system compiler each time we start a new flavour. Otherwise
Duncan Sands [Thu, 20 Oct 2011 20:10:58 +0000 (20:10 +0000)]
Reset the system compiler each time we start a new flavour.  Otherwise
the last compiler built for the previous flavour is used for the next,
for example the Debug clang compiler was being used for the initial build
of the Release LLVM.  Flavors should be independent of each other.  This
especially matters if the compiler built for the previous flavour doesn't
actually work!

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

11 years agoHaven't yet found a nice way to handle TargetData verification in the
Lang Hames [Thu, 20 Oct 2011 19:24:44 +0000 (19:24 +0000)]
Haven't yet found a nice way to handle TargetData verification in the
AsmParser. This patch adds validation for target data layout strings upon
construction of TargetData objects. An attempt to construct a TargetData object
from a malformed string will trigger an assertion.

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

11 years agoRevert r142579, "Fix a type in the legalization of CONCAT_VECTORS". This is
Chad Rosier [Thu, 20 Oct 2011 19:19:10 +0000 (19:19 +0000)]
Revert r142579, "Fix a type in the legalization of CONCAT_VECTORS". This is
causing one of the unit tests to infinitely loop, which resulted in the
buildbots stalling.

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

11 years agoAs Evan suggested, loads from constant pool are safe to speculate.
Devang Patel [Thu, 20 Oct 2011 17:42:23 +0000 (17:42 +0000)]
As Evan suggested, loads from constant pool are safe to speculate.

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

11 years agoAdd a comment.
Devang Patel [Thu, 20 Oct 2011 17:31:18 +0000 (17:31 +0000)]
Add a comment.

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

11 years agoTidy up. Trailing whitespace.
Jim Grosbach [Thu, 20 Oct 2011 17:28:20 +0000 (17:28 +0000)]
Tidy up. Trailing whitespace.

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

11 years agoARM VLD1/VST1 (one register, no writeback) assembly parsing and encoding.
Jim Grosbach [Thu, 20 Oct 2011 15:04:25 +0000 (15:04 +0000)]
ARM VLD1/VST1 (one register, no writeback) assembly parsing and encoding.

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

11 years agoTidy up formatting.
Jim Grosbach [Thu, 20 Oct 2011 14:57:47 +0000 (14:57 +0000)]
Tidy up formatting.

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

11 years agoARM VTBX (one register) assembly parsing and encoding.
Jim Grosbach [Thu, 20 Oct 2011 14:48:50 +0000 (14:48 +0000)]
ARM VTBX (one register) assembly parsing and encoding.

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

11 years agoFix a type in the legalization of CONCAT_VECTORS.
Nadav Rotem [Thu, 20 Oct 2011 13:38:16 +0000 (13:38 +0000)]
Fix a type in the legalization of CONCAT_VECTORS.

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

11 years agoAdd support for testing dragonegg. This is disabled by default.
Duncan Sands [Thu, 20 Oct 2011 11:13:04 +0000 (11:13 +0000)]
Add support for testing dragonegg.  This is disabled by default.
In fact this commit is not intended to change anything unless you
use one of the new command line flags.

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

11 years agoComment out or remove unused parameter names so as to avoid a slew of
Duncan Sands [Thu, 20 Oct 2011 08:57:54 +0000 (08:57 +0000)]
Comment out or remove unused parameter names so as to avoid a slew of
compiler warnings.

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

11 years agoAvoid warnings about the parameter G being unused.
Duncan Sands [Thu, 20 Oct 2011 08:56:41 +0000 (08:56 +0000)]
Avoid warnings about the parameter G being unused.

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

11 years agoRefactor code from inlining and globalopt that checks whether a function definition...
Eli Friedman [Thu, 20 Oct 2011 05:23:42 +0000 (05:23 +0000)]
Refactor code from inlining and globalopt that checks whether a function definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead.  This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress.  (GlobalDCE can also handle the given tescase, but we only run that at -O3.)  Found while looking at PR11180.

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

11 years agoRemove useless code.
Eli Friedman [Thu, 20 Oct 2011 04:33:44 +0000 (04:33 +0000)]
Remove useless code.

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

11 years agoA FIXME about block addresses and indirectbr.
Eli Friedman [Thu, 20 Oct 2011 04:05:33 +0000 (04:05 +0000)]
A FIXME about block addresses and indirectbr.

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

11 years agoSimplify; no intended functional change.
Eli Friedman [Thu, 20 Oct 2011 03:23:14 +0000 (03:23 +0000)]
Simplify; no intended functional change.

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

11 years agoRevamp the script to handle the 'TEST=simple' output.
Bill Wendling [Thu, 20 Oct 2011 00:45:46 +0000 (00:45 +0000)]
Revamp the script to handle the 'TEST=simple' output.

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

11 years ago"@string = constant i8 0" is a value i8* string of length zero. Analyze that
Nick Lewycky [Thu, 20 Oct 2011 00:34:35 +0000 (00:34 +0000)]
"@string = constant i8 0" is a value i8* string of length zero. Analyze that
correctly in GetStringLength, fixing PR11181!

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

11 years agoRevert 142337. Thumb1 still doesn't support dynamic stack realignment. :(
Chad Rosier [Thu, 20 Oct 2011 00:07:12 +0000 (00:07 +0000)]
Revert 142337.  Thumb1 still doesn't support dynamic stack realignment. :(

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

11 years agoInitialze ScalarEvalution dependency.
Devang Patel [Wed, 19 Oct 2011 23:56:07 +0000 (23:56 +0000)]
Initialze ScalarEvalution dependency.
Patch by Pranav Bhandarkar!

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

11 years agoFix TLS lowering bug. The CopyFromReg must be glued to the TLSCALL. rdar://10291355
Evan Cheng [Wed, 19 Oct 2011 22:22:54 +0000 (22:22 +0000)]
Fix TLS lowering bug. The CopyFromReg must be glued to the TLSCALL. rdar://10291355

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

11 years agoImprove code generation for vselect on SSE2:
Nadav Rotem [Wed, 19 Oct 2011 20:43:16 +0000 (20:43 +0000)]
Improve code generation for vselect on SSE2:
When checking the availability of instructions using the TLI, a 'promoted'
instruction IS available. It means that the value is bitcasted to another type
for which there is an operation. The correct check for the availablity of an
instruction is to check if it should be expanded.

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

11 years agoFix parsing of a line with only a # in it.
Rafael Espindola [Wed, 19 Oct 2011 18:48:52 +0000 (18:48 +0000)]
Fix parsing of a line with only a # in it.

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

11 years agoUpdating 'update' target to handle svn 1.7 'info' output. Patch by Jean-Danial Dupas!
David Blaikie [Wed, 19 Oct 2011 18:35:30 +0000 (18:35 +0000)]
Updating 'update' target to handle svn 1.7 'info' output. Patch by Jean-Danial Dupas!

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

11 years agoUse literal pool loads instead of MOVW/MOVT for materializing global addresses when...
James Molloy [Wed, 19 Oct 2011 14:11:07 +0000 (14:11 +0000)]
Use literal pool loads instead of MOVW/MOVT for materializing global addresses when optimizing for size.

On spec/gcc, this caused a codesize improvement of ~1.9% for ARM mode and ~4.9% for Thumb(2) mode. This is
codesize including literal pools.

The pools themselves doubled in size for ARM mode and quintupled for Thumb mode, leaving suggestion that there
is still perhaps redundancy in LLVM's use of constant pools that could be decreased by sharing entries.

Fixes PR11087.

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

11 years agoDocument Paste
David Greene [Wed, 19 Oct 2011 13:04:59 +0000 (13:04 +0000)]
Document Paste

Document paste as a shorthand for !strconcat.

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

11 years agoDocument NAME
David Greene [Wed, 19 Oct 2011 13:04:56 +0000 (13:04 +0000)]
Document NAME

Document NAME as a special member of def records that should
not be defined anywhere else.

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

11 years agoAdd Paste Test
David Greene [Wed, 19 Oct 2011 13:04:50 +0000 (13:04 +0000)]
Add Paste Test

This tests TableGen's paste functionality.

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

11 years agoImplement Paste
David Greene [Wed, 19 Oct 2011 13:04:43 +0000 (13:04 +0000)]
Implement Paste

Add a paste operator '#' to take two identifier-like strings and joint
them.  Internally paste gets represented as a !strconcat() with any
necessary casts to string added.

This will be used to implement basic for loop functionality as in:

for i = [0, 1, 2, 3, 4, 5, 6, 7] {
  def R#i : Register<...>

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

11 years agoProcess NAME
David Greene [Wed, 19 Oct 2011 13:04:35 +0000 (13:04 +0000)]
Process NAME

During multiclass def instantiation, replace NAME in any expressions
with the value of the def or defm ID.

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

11 years agoProcess Defm Prefix as Init
David Greene [Wed, 19 Oct 2011 13:04:31 +0000 (13:04 +0000)]
Process Defm Prefix as Init

Parse and process a defm prefix as an Init expression.  This allows
paste operations to create defm prefixes.

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

11 years agoParse Def ID as Value
David Greene [Wed, 19 Oct 2011 13:04:29 +0000 (13:04 +0000)]
Parse Def ID as Value

Allow def and defm IDs to be general values.  We need this for paste

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

11 years agoDon't Parse Object Body as a Name
David Greene [Wed, 19 Oct 2011 13:04:26 +0000 (13:04 +0000)]
Don't Parse Object Body as a Name

Stop parsing a value if we are in name parsing mode and we see a left
brace.  A left brace indicates the start of an object body when we are
parsing a name.

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

11 years agoUse Parse Mode
David Greene [Wed, 19 Oct 2011 13:04:21 +0000 (13:04 +0000)]
Use Parse Mode

Augment the value parser to respect the parse mode and not error if an
ID doesn't map to an object and we are in name parsing mode.

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

11 years agoMake ID Parsing More Flexible
David Greene [Wed, 19 Oct 2011 13:04:20 +0000 (13:04 +0000)]
Make ID Parsing More Flexible

Add a mode control to value and ID parsers.  The two modes are:

- Parse a value.  Expect the parsed ID to map to an existing object.

- Parse a name.  Expect the parsed ID to not map to any existing object.

The first is used when parsing an identifier to be looked up, for
example a record field or template argument.  The second is used for
parsing declarations.  Paste functionality implies that declarations
can contain arbitrary expressions so we need to be able to call into
the general value parser to parse declarations with paste operators.
So we need a way to parse a value-like thing without expecting that
the result will map to some existing object.  This parse mode provides

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

11 years agoAdd NAME Member
David Greene [Wed, 19 Oct 2011 13:04:13 +0000 (13:04 +0000)]
Add NAME Member

Add a Value named "NAME" to each Record.  This will be set to the def or defm
name when instantiating multiclasses.  This will replace the #NAME# processing
hack once paste functionality is in place.

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:04:02 +0000 (13:04 +0000)]
Fix Name Access

Get the Record name as a string explicitly to avoid asserts.

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:03:58 +0000 (13:03 +0000)]
Fix Name Access

Get the Record name as a string explicitly to avoid asserts.

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:03:51 +0000 (13:03 +0000)]
Fix Name Access

Get the Record name as a string explicitly to avoid asserts.

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:03:45 +0000 (13:03 +0000)]
Fix Name Access

Get the Record name by string explicitly to avoid potential asserts.

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

11 years agoDisambiguate Numbers and Identifiers
David Greene [Wed, 19 Oct 2011 13:03:39 +0000 (13:03 +0000)]
Disambiguate Numbers and Identifiers

Use lookahead to determine whether a number is really a number or is
part of something forming an identifier.  This won't come into play
until the paste operator is recognized as a unique token.

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

11 years agoAdd Peek
David Greene [Wed, 19 Oct 2011 13:03:35 +0000 (13:03 +0000)]
Add Peek

Add a peek function to let the Lexer look at a character arbitrarily
far ahead in the stream without consuming anything.  We need this to
disambiguate numbers and operands of a paste operation.  For example:

def foo#8i

Without lookahead the lexer will treat '8' as a number rather than as
part of a string to be pasted to form an identifier.

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

11 years agoResolve Record Names
David Greene [Wed, 19 Oct 2011 13:03:30 +0000 (13:03 +0000)]
Resolve Record Names

When resolving Record values, be sure to update the Record name as it
may contain references to the value.

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

11 years agoAllow Names Changes on Unregistered Records
David Greene [Wed, 19 Oct 2011 13:03:25 +0000 (13:03 +0000)]
Allow Names Changes on Unregistered Records

Add Record names to be changed even on Records that aren't yet
registered.  We need to be able to do this for paste functionality
because we do not want to register def names before they are unique
and that can only happen once all paste operations are done.  This
change lets us update Record names formed by paste operations and
register the result later.

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

11 years agoCall Record Initializer
David Greene [Wed, 19 Oct 2011 13:03:21 +0000 (13:03 +0000)]
Call Record Initializer

Call the common Record initializer code from constructors.

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

11 years agoAdd Name Init Record Constructor
David Greene [Wed, 19 Oct 2011 13:03:15 +0000 (13:03 +0000)]
Add Name Init Record Constructor

Add a Record constructor that takes the Record name as an Init.  This
is more work toward paste functionality.

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

11 years agoFix 80-col Violation
David Greene [Wed, 19 Oct 2011 13:03:10 +0000 (13:03 +0000)]
Fix 80-col Violation

Split up the initializer list for Record to avoid 80-col issues.

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:03:02 +0000 (13:03 +0000)]
Fix Name Access

Ask for the Record name as a string explicitly to avoid a possible assert.

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:02:57 +0000 (13:02 +0000)]
Fix Name Access

Ask for the Record name as a string explicitly to avoid a possible

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

11 years agoFix Name Access
David Greene [Wed, 19 Oct 2011 13:02:52 +0000 (13:02 +0000)]
Fix Name Access

Ask for the record name as a string explicitly to avoid a potential

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

11 years agoFix Name Check
David Greene [Wed, 19 Oct 2011 13:02:48 +0000 (13:02 +0000)]
Fix Name Check

Avoid a potential assert by asking for record names as strings explicitly.

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

11 years agoFix Name Check
David Greene [Wed, 19 Oct 2011 13:02:47 +0000 (13:02 +0000)]
Fix Name Check

Record names may not be fully resolved at this point so ask for the
record name as a string explicitly.  This avoids a potential assert.

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

11 years agoAdd Record Init
David Greene [Wed, 19 Oct 2011 13:02:45 +0000 (13:02 +0000)]
Add Record Init

Add an init function to be shared among Record constructors.

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

11 years agoMake Template Arg Names Inits
David Greene [Wed, 19 Oct 2011 13:02:42 +0000 (13:02 +0000)]
Make Template Arg Names Inits

Allow template arg names to be Inits.  This is further work to
implement paste as it allows template names to participate in paste

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

11 years agoLet SetValue Take and Init Name
David Greene [Wed, 19 Oct 2011 13:02:39 +0000 (13:02 +0000)]
Let SetValue Take and Init Name

Convert SetValue to take the value name as an Init.  This allows us to
set values for variables whose names are not yet fully resolved.

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

11 years agoAdd Utility to Scope Names
David Greene [Wed, 19 Oct 2011 13:02:36 +0000 (13:02 +0000)]
Add Utility to Scope Names

Add a couple of utility functions to take a variable name and qualify
it with the namespace of the enclosing class and/or multiclass.  This
is inpreparation for making template arg names first-class Inits.

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

11 years agoMake VarInit Name an Init
David Greene [Wed, 19 Oct 2011 13:02:33 +0000 (13:02 +0000)]
Make VarInit Name an Init

Make the VarInit name an Init itself.  We need this to implement paste
functionality so we can reference variables whose names are not yet
completely resolved.

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

11 years agoAdd Value Accessors
David Greene [Wed, 19 Oct 2011 13:02:29 +0000 (13:02 +0000)]
Add Value Accessors

Add accessors to get Record values by Init name.  This lets us look up
Record values whose names are not yet fully resolved.  More work
toward paste.

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

11 years agoAdd Name Init Accessors
David Greene [Wed, 19 Oct 2011 13:02:28 +0000 (13:02 +0000)]
Add Name Init Accessors

Add a utility to get the name init and get the string representation
of the name.  This will be used for paste functionality.

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

11 years agoAdd Init Accessors
David Greene [Wed, 19 Oct 2011 13:02:22 +0000 (13:02 +0000)]
Add Init Accessors

Add a couple of utility functions to get at the name init and return
the name init as a string.  This will be used for paste functionality.

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

11 years agoGeneralize the reading of probability metadata to work for both branches
Chandler Carruth [Wed, 19 Oct 2011 10:32:19 +0000 (10:32 +0000)]
Generalize the reading of probability metadata to work for both branches
and switches, with arbitrary numbers of successors. Still optimized for
the common case of 2 successors for a conditional branch.

Add a test case for switch metadata showing up in the BlockFrequencyInfo pass.

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

11 years agoTeach the BranchProbabilityInfo analysis pass to read any metadata
Chandler Carruth [Wed, 19 Oct 2011 10:30:30 +0000 (10:30 +0000)]
Teach the BranchProbabilityInfo analysis pass to read any metadata
encoding of probabilities. In the absense of metadata, it continues to
fall back on static heuristics.

This allows __builtin_expect, after lowering through llvm.expect
a branch instruction's metadata, to actually enter the branch
probability model. This is one component of resolving PR2577.

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

11 years agoAdd pass printing support to BlockFrequencyInfo pass. The implementation
Chandler Carruth [Wed, 19 Oct 2011 10:12:41 +0000 (10:12 +0000)]
Add pass printing support to BlockFrequencyInfo pass. The implementation
layer already had support for printing the results of this analysis, but
the wiring was missing.

Now that printing the analysis works, actually bring some of this
analysis, and the BranchProbabilityInfo analysis that it wraps, under
test! I'm planning on fixing some bugs and doing other work here, so
having a nice place to add regression tests and a way to observe the
results is really useful.

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

11 years agoDuncan pointed out that sometimes CC and CXX are used to specify the compiler. Also...
Bill Wendling [Wed, 19 Oct 2011 09:47:00 +0000 (09:47 +0000)]
Duncan pointed out that sometimes CC and CXX are used to specify the compiler. Also that the configure script takes care of finding an appropriate compiler if one's not specified.

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

11 years agoAdd support for the vector-widening of vselect and vector-setcc
Nadav Rotem [Wed, 19 Oct 2011 09:45:11 +0000 (09:45 +0000)]
Add support for the vector-widening of vselect and vector-setcc

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

11 years agoUse bash instead.
Bill Wendling [Wed, 19 Oct 2011 09:25:49 +0000 (09:25 +0000)]
Use bash instead.

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

11 years agoMake sure we emit the 'movw' and 'movt' only if it's supported. Otherwise, use a...
Bill Wendling [Wed, 19 Oct 2011 09:24:02 +0000 (09:24 +0000)]
Make sure we emit the 'movw' and 'movt' only if it's supported. Otherwise, use a constant pool.

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

11 years agoRemove some dead code.
Bill Wendling [Wed, 19 Oct 2011 09:04:11 +0000 (09:04 +0000)]
Remove some dead code.

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

11 years agoMake changes so that this runs on FreeBSD.
Bill Wendling [Wed, 19 Oct 2011 08:42:07 +0000 (08:42 +0000)]
Make changes so that this runs on FreeBSD.

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

11 years agoRename PEXTR to PEXT. Add intrinsics for BMI instructions.
Craig Topper [Wed, 19 Oct 2011 07:48:35 +0000 (07:48 +0000)]
Rename PEXTR to PEXT. Add intrinsics for BMI instructions.

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

11 years agoAdding dependencies to allow -DBUILD_SHARED_LIBS=true to complete.
Joe Abbey [Wed, 19 Oct 2011 00:13:13 +0000 (00:13 +0000)]
Adding dependencies to allow -DBUILD_SHARED_LIBS=true to complete.

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

11 years agoAdded testcase for <rdar://problem/10215997>
Lang Hames [Tue, 18 Oct 2011 23:50:52 +0000 (23:50 +0000)]
Added testcase for <rdar://problem/10215997>

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

11 years agoEmit the MOVT instruction only if the # LPads is > 64K.
Bill Wendling [Tue, 18 Oct 2011 23:19:55 +0000 (23:19 +0000)]
Emit the MOVT instruction only if the # LPads is > 64K.

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

11 years agoFor Thumb mode, we need to use a constant pool if the value is too large to be
Bill Wendling [Tue, 18 Oct 2011 23:11:05 +0000 (23:11 +0000)]
For Thumb mode, we need to use a constant pool if the value is too large to be
used with the CMP instruction.

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

11 years agoRegenerate projects/sample/configure.
Daniel Dunbar [Tue, 18 Oct 2011 23:10:58 +0000 (23:10 +0000)]
Regenerate projects/sample/configure.

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

11 years agoprojects/sample: Import adapted form of current LLVM autoconf/Makefile setup so that...
Daniel Dunbar [Tue, 18 Oct 2011 23:10:47 +0000 (23:10 +0000)]
projects/sample: Import adapted form of current LLVM autoconf/Makefile setup so that projects/sample is standalone and not tied to the LLVM build setup.
 - This currently just moves over all of the behavior from LLVM. Eventually all of the configure checks that are directly needed by the LLVM build setup should probably go away, and the project should manage their own configuration checks if necessary.

 - This is the 1st half of this work, the actual Makefile.common hasn't moved over yet. I've tried to stage this in such a way that incremental builds will properly reconfigure for most active developers (the Makefiles don't handle reconfiguring in a perfectly reliable way, and I haven't found an easy way to make them do so).

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

11 years agoRevert "Turn on the vzeroupper pass by default."
Eric Christopher [Tue, 18 Oct 2011 23:10:11 +0000 (23:10 +0000)]
Revert "Turn on the vzeroupper pass by default."

This reverts commit 494f7ac3e8d2ab3d94e52317abf9c42a949fe1f3.

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

11 years agoAdd additional element-promotion tests.
Nadav Rotem [Tue, 18 Oct 2011 23:05:33 +0000 (23:05 +0000)]
Add additional element-promotion tests.

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

11 years agoARM VTBL (one register) assembly parsing and encoding.
Jim Grosbach [Tue, 18 Oct 2011 23:02:30 +0000 (23:02 +0000)]
ARM VTBL (one register) assembly parsing and encoding.

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

11 years agoUse the integer compare when the value is small enough. Use the "move into a
Bill Wendling [Tue, 18 Oct 2011 22:52:20 +0000 (22:52 +0000)]
Use the integer compare when the value is small enough. Use the "move into a
register and then compare against that" method when it's too large. We have to
move the value into the register in the "movw, movt" pair of instructions.

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

11 years agoTurn on the vzeroupper pass by default.
Eric Christopher [Tue, 18 Oct 2011 22:50:17 +0000 (22:50 +0000)]
Turn on the vzeroupper pass by default.

I'll remove/rename the option in a few days.

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

11 years agoWhitespace.
Eric Christopher [Tue, 18 Oct 2011 22:50:13 +0000 (22:50 +0000)]

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

11 years agoUse the integer compare when the value is small enough. Use the "move into a
Bill Wendling [Tue, 18 Oct 2011 22:49:07 +0000 (22:49 +0000)]
Use the integer compare when the value is small enough. Use the "move into a
register and then compare against that" method when it's too large. We have to
move the value into the register in the "movw, movt" pair of instructions.

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

11 years agoMissed a spot!
Nick Lewycky [Tue, 18 Oct 2011 22:40:18 +0000 (22:40 +0000)]
Missed a spot!

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

11 years agoFix some typo/formatting issues. No functionality change.
Nick Lewycky [Tue, 18 Oct 2011 22:39:43 +0000 (22:39 +0000)]
Fix some typo/formatting issues. No functionality change.

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

11 years agoFix a bug in the legalization of vector anyext-load and trunc-store. Mem Index starts...
Nadav Rotem [Tue, 18 Oct 2011 22:32:43 +0000 (22:32 +0000)]
Fix a bug in the legalization of vector anyext-load and trunc-store. Mem Index starts with zero.

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

11 years agoTeach fast isel about vector stores, and make DoSelectCall return false when it fails...
Lang Hames [Tue, 18 Oct 2011 22:11:33 +0000 (22:11 +0000)]
Teach fast isel about vector stores, and make DoSelectCall return false when it fails to emit a store. This fixes <rdar://problem/10215997>.

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

11 years agoThe value we're comparing against may be too large for the ARM CMP
Bill Wendling [Tue, 18 Oct 2011 22:11:18 +0000 (22:11 +0000)]
The value we're comparing against may be too large for the ARM CMP
instruction. Move the value into a register and then use that for the CMP.

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

11 years agoThe immediate may be too large for the CMP instruction. Move it into a register
Bill Wendling [Tue, 18 Oct 2011 21:55:58 +0000 (21:55 +0000)]
The immediate may be too large for the CMP instruction. Move it into a register
and use that in the CMP.

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

11 years agoTidy up formatting.
Jim Grosbach [Tue, 18 Oct 2011 21:09:01 +0000 (21:09 +0000)]
Tidy up formatting.

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

11 years agoTidy up formatting.
Jim Grosbach [Tue, 18 Oct 2011 21:08:16 +0000 (21:08 +0000)]
Tidy up formatting.

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

11 years agoYet more ARM NEON assembly parsing for the lane index operand.
Jim Grosbach [Tue, 18 Oct 2011 20:21:17 +0000 (20:21 +0000)]
Yet more ARM NEON assembly parsing for the lane index operand.

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

11 years agoEnable more encoded immediate tests.
Jim Grosbach [Tue, 18 Oct 2011 20:20:51 +0000 (20:20 +0000)]
Enable more encoded immediate tests.

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

11 years agoMore vmov lane testcases.
Jim Grosbach [Tue, 18 Oct 2011 20:19:48 +0000 (20:19 +0000)]
More vmov lane testcases.

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

11 years agoARM vmla/vmls assembly parsing for the lane index operand.
Jim Grosbach [Tue, 18 Oct 2011 20:14:56 +0000 (20:14 +0000)]
ARM vmla/vmls assembly parsing for the lane index operand.

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

11 years agoARM vmov assembly parsing for the lane index operand.
Jim Grosbach [Tue, 18 Oct 2011 20:10:47 +0000 (20:10 +0000)]
ARM vmov assembly parsing for the lane index operand.

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

11 years agoThe MCJITMemoryManager takes ownership of the JMM, so don't leak it.
Jim Grosbach [Tue, 18 Oct 2011 19:57:38 +0000 (19:57 +0000)]
The MCJITMemoryManager takes ownership of the JMM, so don't leak it.

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

11 years agoObject/COFF: Remove useless test.
Michael J. Spencer [Tue, 18 Oct 2011 19:51:36 +0000 (19:51 +0000)]
Object/COFF: Remove useless test.

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

11 years agollvm-objdump: Add static symbol table dumping.
Michael J. Spencer [Tue, 18 Oct 2011 19:32:17 +0000 (19:32 +0000)]
llvm-objdump: Add static symbol table dumping.

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