oota-llvm.git
13 years agoSwitch ARM to using AltOrders instead of MethodBodies.
Jakob Stoklund Olesen [Sat, 18 Jun 2011 01:14:46 +0000 (01:14 +0000)]
Switch ARM to using AltOrders instead of MethodBodies.

This slightly changes the GPR allocation order on Darwin where R9 is not
a callee-saved register:

Before: %R0 %R1 %R2 %R3 %R12 %R9 %LR %R4 %R5 %R6 %R8 %R10 %R11
After:  %R0 %R1 %R2 %R3 %R9 %R12 %LR %R4 %R5 %R6 %R8 %R10 %R11

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

13 years agoSwitch x86 to using AltOrders instead of MethodBodies.
Jakob Stoklund Olesen [Sat, 18 Jun 2011 01:14:43 +0000 (01:14 +0000)]
Switch x86 to using AltOrders instead of MethodBodies.

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

13 years agoMoved to the right place.
Galina Kistanova [Sat, 18 Jun 2011 00:59:37 +0000 (00:59 +0000)]
Moved to the right place.

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

13 years agoReserve D16-D13 on subtargets that don't support them.
Jakob Stoklund Olesen [Sat, 18 Jun 2011 00:53:27 +0000 (00:53 +0000)]
Reserve D16-D13 on subtargets that don't support them.

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

13 years agoProvide AltOrders for specifying alternative allocation orders.
Jakob Stoklund Olesen [Sat, 18 Jun 2011 00:50:49 +0000 (00:50 +0000)]
Provide AltOrders for specifying alternative allocation orders.

A register class can define AltOrders and AltOrderSelect instead of
defining method protos and bodies. The AltOrders lists can be defined
with set operations, and TableGen can verify that the alternative
allocation orders only contain valid registers.

This is currently an opt-in feature, and it is still possible to
override allocation_order_begin/end. That will not be true for long.

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

13 years ago* Override the "EmitBytes" function, since it can sneak values in that way.
Bill Wendling [Sat, 18 Jun 2011 00:19:35 +0000 (00:19 +0000)]
* Override the "EmitBytes" function, since it can sneak values in that way.
* Make this used only if CFI is used.

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

13 years agoFix UMULO support for 2x register width to allow the full
Eric Christopher [Sat, 18 Jun 2011 00:09:57 +0000 (00:09 +0000)]
Fix UMULO support for 2x register width to allow the full
range without a libcall to a new mulo<mode> libcall
that we'd have to create.

Finishes the rest of rdar://9090077 and rdar://9210061

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

13 years agoRemove false assertion.
Bill Wendling [Fri, 17 Jun 2011 23:42:01 +0000 (23:42 +0000)]
Remove false assertion.

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

13 years agoOnly call TRI::getRawAllocationOrder to resolve a target-dependent hint.
Jakob Stoklund Olesen [Fri, 17 Jun 2011 23:26:52 +0000 (23:26 +0000)]
Only call TRI::getRawAllocationOrder to resolve a target-dependent hint.

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

13 years agoZap the last reference to allocation_order_begin().
Jakob Stoklund Olesen [Fri, 17 Jun 2011 23:17:13 +0000 (23:17 +0000)]
Zap the last reference to allocation_order_begin().

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

13 years agoSI, DI, BP, and SP don't have 8-bit sub-registers in x86 mode.
Jakob Stoklund Olesen [Fri, 17 Jun 2011 23:15:00 +0000 (23:15 +0000)]
SI, DI, BP, and SP don't have 8-bit sub-registers in x86 mode.

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

13 years agoFix comment.
Eric Christopher [Fri, 17 Jun 2011 22:35:59 +0000 (22:35 +0000)]
Fix comment.

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

13 years agoFix -Asserts build
Matt Beaumont-Gay [Fri, 17 Jun 2011 22:21:12 +0000 (22:21 +0000)]
Fix -Asserts build

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

13 years agoRevert r133285. Causing odd failures on Dragonegg.
Chad Rosier [Fri, 17 Jun 2011 22:08:25 +0000 (22:08 +0000)]
Revert r133285.  Causing odd failures on Dragonegg.

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

13 years agoDisable for another investigation.
Bill Wendling [Fri, 17 Jun 2011 21:44:15 +0000 (21:44 +0000)]
Disable for another investigation.

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

13 years agoSet debug loc for new preheader's terminator.
Devang Patel [Fri, 17 Jun 2011 21:36:44 +0000 (21:36 +0000)]
Set debug loc for new preheader's terminator.

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

13 years agoSupport only DwarfCFI or SjLj exception handling in LSDA decoder.
Bill Wendling [Fri, 17 Jun 2011 21:31:43 +0000 (21:31 +0000)]
Support only DwarfCFI or SjLj exception handling in LSDA decoder.

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

13 years agoSjLj exception handling LSDA decoding support wasn't represented correctly. Use
Bill Wendling [Fri, 17 Jun 2011 21:29:06 +0000 (21:29 +0000)]
SjLj exception handling LSDA decoding support wasn't represented correctly. Use
the correct values, etc. In particular, the exception handling type is SjLj, not
ARM.

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

13 years agoDisable to investigate ARM failure.
Bill Wendling [Fri, 17 Jun 2011 21:09:50 +0000 (21:09 +0000)]
Disable to investigate ARM failure.

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

13 years agoUse the verbose asm flag instead of a new flag for decoding the LSDA.
Bill Wendling [Fri, 17 Jun 2011 20:55:01 +0000 (20:55 +0000)]
Use the verbose asm flag instead of a new flag for decoding the LSDA.

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

13 years agoFix a bug in the type-lowering of integer-promoted elements. Add a check that
Nadav Rotem [Fri, 17 Jun 2011 20:54:12 +0000 (20:54 +0000)]
Fix a bug in the type-lowering of integer-promoted elements. Add a check that
the newly created simple type is valid before checking its legality.
Re-commit the test file.

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

13 years agoAdd an alternative rev16 pattern. We should figure out a better way to handle these...
Evan Cheng [Fri, 17 Jun 2011 20:47:21 +0000 (20:47 +0000)]
Add an alternative rev16 pattern. We should figure out a better way to handle these complex rev patterns. rdar://9609108

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

13 years agoLower multiply with overflow checking to __mulo<mode>
Eric Christopher [Fri, 17 Jun 2011 20:41:29 +0000 (20:41 +0000)]
Lower multiply with overflow checking to __mulo<mode>
calls if we haven't been able to lower them any
other way.

Fixes rdar://9090077 and rdar://9210061

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

13 years agoAdd an option that allows one to "decode" the LSDA.
Bill Wendling [Fri, 17 Jun 2011 20:35:21 +0000 (20:35 +0000)]
Add an option that allows one to "decode" the LSDA.

The LSDA is a bit difficult for the non-initiated to read. Even with comments,
it's not always clear what's going on. This wraps the ASM streamer in a class
that retains the LSDA and then emits a human-readable description of what's
going on in it.

So instead of having to make sense of:

Lexception1:
        .byte   255
        .byte   155
        .byte   168
        .space  1
        .byte   3
        .byte   26
Lset0 = Ltmp7-Leh_func_begin1
      .long     Lset0
Lset1 = Ltmp812-Ltmp7
      .long     Lset1
Lset2 = Ltmp913-Leh_func_begin1
      .long     Lset2
      .byte     3
Lset3 = Ltmp812-Leh_func_begin1
      .long     Lset3
Lset4 = Leh_func_end1-Ltmp812
      .long     Lset4
      .long     0
      .byte     0
      .byte     1
      .byte     0
      .byte     2
      .byte     125
      .long     __ZTIi@GOTPCREL+4
      .long     __ZTIPKc@GOTPCREL+4

you can read this instead:

## Exception Handling Table: Lexception1
##  @LPStart Encoding: omit
##    @TType Encoding: indirect pcrel sdata4
##        @TType Base: 40 bytes
## @CallSite Encoding: udata4
## @Action Table Size: 26 bytes

## Action 1:
##   A throw between Ltmp7 and Ltmp812 jumps to Ltmp913 on an exception.
##     For type(s):  __ZTIi@GOTPCREL+4 __ZTIPKc@GOTPCREL+4
## Action 2:
##   A throw between Ltmp812 and Leh_func_end1 does not have a landing pad.

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

13 years agoRelocate NUW test to cover all binary ops in a dynamic alloca expr.
Stuart Hastings [Fri, 17 Jun 2011 20:21:52 +0000 (20:21 +0000)]
Relocate NUW test to cover all binary ops in a dynamic alloca expr.
Followup to 132926.  rdar://problem/9265821

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

13 years agoest 2008-06-04-indirectmem.ll is X86-specific. Move to X86 folder.
Galina Kistanova [Fri, 17 Jun 2011 18:26:23 +0000 (18:26 +0000)]
est 2008-06-04-indirectmem.ll is X86-specific. Move to X86 folder.

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

13 years agoDrop the "2" suffix on some enums.
Chris Lattner [Fri, 17 Jun 2011 18:17:37 +0000 (18:17 +0000)]
Drop the "2" suffix on some enums.

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

13 years agoremove support for a bunch of obsolete instruction encodings
Chris Lattner [Fri, 17 Jun 2011 18:09:11 +0000 (18:09 +0000)]
remove support for a bunch of obsolete instruction encodings
and other backward compatibility hacks.

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

13 years agoRemove a useless copy of MCELFStreamer. Patch by Logan Chien!
Benjamin Kramer [Fri, 17 Jun 2011 18:05:30 +0000 (18:05 +0000)]
Remove a useless copy of MCELFStreamer. Patch by Logan Chien!

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

13 years agogetSuccWeight returns now default 0 if Weights vector is empty.
Jakub Staszak [Fri, 17 Jun 2011 18:00:21 +0000 (18:00 +0000)]
getSuccWeight returns now default 0 if Weights vector is empty.

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

13 years agomissed a file.
Chris Lattner [Fri, 17 Jun 2011 17:56:00 +0000 (17:56 +0000)]
missed a file.

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

13 years agoRemove some "2" suffixes from the metadata enums now that "1" is gone.
Chris Lattner [Fri, 17 Jun 2011 17:50:30 +0000 (17:50 +0000)]
Remove some "2" suffixes from the metadata enums now that "1" is gone.

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

13 years agoremove bitcode reader support for LLVM 2.7 metadata encoding.
Chris Lattner [Fri, 17 Jun 2011 17:48:53 +0000 (17:48 +0000)]
remove bitcode reader support for LLVM 2.7 metadata encoding.

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

13 years agoremove another old and dead hunk of code.
Chris Lattner [Fri, 17 Jun 2011 17:40:18 +0000 (17:40 +0000)]
remove another old and dead hunk of code.

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

13 years agoStop accepting and ignoring attributes in function types. Attributes are applied
Chris Lattner [Fri, 17 Jun 2011 17:37:13 +0000 (17:37 +0000)]
Stop accepting and ignoring attributes in function types.  Attributes are applied
to functions and call/invokes, not to types.

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

13 years agoAllow empty Weights vector.
Jakub Staszak [Fri, 17 Jun 2011 17:30:10 +0000 (17:30 +0000)]
Allow empty Weights vector.

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

13 years agoFix a few places where 32bit instructions/registerset were used on PPC64.
Roman Divacky [Fri, 17 Jun 2011 15:21:10 +0000 (15:21 +0000)]
Fix a few places where 32bit instructions/registerset were used on PPC64.

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

13 years agoTest for previous commit.
Rafael Espindola [Fri, 17 Jun 2011 14:16:17 +0000 (14:16 +0000)]
Test for previous commit.

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

13 years agoTwo fixes relating to debug value:
Rafael Espindola [Fri, 17 Jun 2011 13:59:43 +0000 (13:59 +0000)]
Two fixes relating to debug value:
* We should change the generated code because of a debug use.
* Avoid creating debug uses of undef, as they become a kill.
Test to follow.

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

13 years agoFix typo in comment.
Jay Foad [Fri, 17 Jun 2011 13:36:06 +0000 (13:36 +0000)]
Fix typo in comment.

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

13 years agoPTX: Adjust rounding modes
Justin Holewinski [Fri, 17 Jun 2011 12:12:42 +0000 (12:12 +0000)]
PTX: Adjust rounding modes

* rounding modes for fp add, mul, sub now use .rn
* float -> int rounding correctly uses .rzi not .rni
* 32bit fdiv for sm13 uses div.rn (instead of div.approx)
* 32bit fdiv for sm10 now uses div (instead of div.approx)

Approx is not IEEE 754 compatible (and should be optionally set by a flag to the backend instead). The .rn rounding modifier is the PTX default anyway, but it's better to be explicit.

All these modifiers should be available by using __fmul_rz functions for example, but support will need to be added for this in the backend.

Patch by Dan Bailey

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

13 years agoDon't force remove config.cache on reconfiguration.
NAKAMURA Takumi [Fri, 17 Jun 2011 11:08:09 +0000 (11:08 +0000)]
Don't force remove config.cache on reconfiguration.

config.cache will be used by the person who specifies '-C' to configure.
config.cache's inconsistency should be responsible to him.

Re-configuration would spend so much on cygming without '-C', esp. cygwin.

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

13 years agoWhen promoting an alloca to registers discard any lifetime intrinsics.
Nick Lewycky [Fri, 17 Jun 2011 10:09:00 +0000 (10:09 +0000)]
When promoting an alloca to registers discard any lifetime intrinsics.

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

13 years agoAdd a hook for PBQP clients to run a custom pre-alloc pass to run prior to PBQP alloc...
Lang Hames [Fri, 17 Jun 2011 07:09:01 +0000 (07:09 +0000)]
Add a hook for PBQP clients to run a custom pre-alloc pass to run prior to PBQP allocation. Patch by Arnaud Allard de Grandmaison.

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

13 years agomake the asmparser reject function and type redefinitions. 'Merging' hasn't been
Chris Lattner [Fri, 17 Jun 2011 07:06:44 +0000 (07:06 +0000)]
make the asmparser reject function and type redefinitions.  'Merging' hasn't been
needed since llvm-gcc 3.4 days.

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

13 years agoremove asmparser support for the old getresult instruction, which has been subsumed...
Chris Lattner [Fri, 17 Jun 2011 06:57:15 +0000 (06:57 +0000)]
remove asmparser support for the old getresult instruction, which has been subsumed by extractvalue.

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

13 years agoremove parser support for the obsolete "multiple return values" syntax, which
Chris Lattner [Fri, 17 Jun 2011 06:49:41 +0000 (06:49 +0000)]
remove parser support for the obsolete "multiple return values" syntax, which
was replaced with return of a "first class aggregate".

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

13 years agostop accepting begin/end around function bodies in the .ll parser, this isn't pascal...
Chris Lattner [Fri, 17 Jun 2011 06:42:57 +0000 (06:42 +0000)]
stop accepting begin/end around function bodies in the .ll parser, this isn't pascal anymore.

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

13 years agoRemove support for using "foo" as symbols instead of %"foo". This is ancient
Chris Lattner [Fri, 17 Jun 2011 06:36:20 +0000 (06:36 +0000)]
Remove support for using "foo" as symbols instead of %"foo".  This is ancient
syntax and has been long obsolete.  As usual, updating the tests is the nasty
part of this.

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

13 years agoEnable early duplication of small blocks. There are still improvements to
Rafael Espindola [Fri, 17 Jun 2011 05:54:50 +0000 (05:54 +0000)]
Enable early duplication of small blocks. There are still improvements to
be made, but this is already a win.

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

13 years agoAllocate SystemZ callee-saved registers backwards: R13-R6
Jakob Stoklund Olesen [Fri, 17 Jun 2011 03:47:30 +0000 (03:47 +0000)]
Allocate SystemZ callee-saved registers backwards: R13-R6

The reserved R14-R15 are always saved in the prolog, and using CSRs
starting from R13 allows them to be saved in one instruction.

Thanks to Anton for explaining this.

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

13 years agoRemove old backwards compatibility support from the parser for autoupgrading
Chris Lattner [Fri, 17 Jun 2011 03:16:47 +0000 (03:16 +0000)]
Remove old backwards compatibility support from the parser for autoupgrading
the old malloc/free instructions, and for 'sext' and 'zext' as function
attributes (they are spelled signext/zeroext now), and support for result
value attributes being specified after a function.

Additionally, diagnose invalid attributes on functions with an error message
instead of an abort in the verifier.

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

13 years agomanually upgrade a bunch of tests to modern syntax, and remove some that
Chris Lattner [Fri, 17 Jun 2011 03:14:27 +0000 (03:14 +0000)]
manually upgrade a bunch of tests to modern syntax, and remove some that
are either unreduced or only test old syntax.

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

13 years agoUpdate an insertion point iterator after replacing a return instruction with a
Cameron Zwarich [Fri, 17 Jun 2011 02:16:43 +0000 (02:16 +0000)]
Update an insertion point iterator after replacing a return instruction with a
tail call pseudoinstruction. This fixes <rdar://problem/9624333>.

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

13 years agoExplicitly invoke ArrayRef constructor to keep gcc happy.
Jakob Stoklund Olesen [Fri, 17 Jun 2011 00:18:25 +0000 (00:18 +0000)]
Explicitly invoke ArrayRef constructor to keep gcc happy.

Patch by Richard Smith!

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

13 years agoRename TRI::getAllocationOrder() to getRawAllocationOrder().
Jakob Stoklund Olesen [Thu, 16 Jun 2011 23:31:16 +0000 (23:31 +0000)]
Rename TRI::getAllocationOrder() to getRawAllocationOrder().

Also switch the return type to ArrayRef<unsigned> which works out nicely
for ARM's implementation of this function because of the clever ArrayRef
constructors.

The name change indicates that the returned allocation order may contain
reserved registers as has been the case for a while.

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

13 years agoDon't use register classes larger than TLI->getRegClassFor(VT).
Jakob Stoklund Olesen [Thu, 16 Jun 2011 22:50:38 +0000 (22:50 +0000)]
Don't use register classes larger than TLI->getRegClassFor(VT).

In Thumb mode we cannot handle GPR virtual registers, even though some
instructions can. When isel is lowering a CopyFromReg, it should limit
itself to subclasses of getRegClassFor(VT).

<rdar://problem/9624323>

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

13 years agoRegenerate configure.
Daniel Dunbar [Thu, 16 Jun 2011 22:30:41 +0000 (22:30 +0000)]
Regenerate configure.

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

13 years agobuild/configure: Add support for --with-extra-ld-options flag (to provide extra
Daniel Dunbar [Thu, 16 Jun 2011 22:30:38 +0000 (22:30 +0000)]
build/configure: Add support for --with-extra-ld-options flag (to provide extra
options just to pass to ld).

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

13 years agoAdded LLVM_BUILD_MODE to cmake so that lit supports tests with REQUIRES: {buildmode}.
Andrew Trick [Thu, 16 Jun 2011 22:19:20 +0000 (22:19 +0000)]
Added LLVM_BUILD_MODE to cmake so that lit supports tests with REQUIRES: {buildmode}.

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

13 years agoTeach antidependency breakers to use RegisterClassInfo.
Jakob Stoklund Olesen [Thu, 16 Jun 2011 21:56:21 +0000 (21:56 +0000)]
Teach antidependency breakers to use RegisterClassInfo.

No functional change was intended.

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

13 years agoforward declare GraphTraits in Type.h instead of #includ'ing it.
Chris Lattner [Thu, 16 Jun 2011 21:49:23 +0000 (21:49 +0000)]
forward declare GraphTraits in Type.h instead of #includ'ing it.

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

13 years agocmake may require LIT_TOOLS_DIR.
Andrew Trick [Thu, 16 Jun 2011 21:48:57 +0000 (21:48 +0000)]
cmake may require LIT_TOOLS_DIR.
Reviewed by chapuni. Sorry for breaking.

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

13 years agochange Type.h to forward declare ArrayRef instead of #including it.
Chris Lattner [Thu, 16 Jun 2011 21:37:15 +0000 (21:37 +0000)]
change Type.h to forward declare ArrayRef instead of #including it.

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

13 years agoadd some #includes that will soon be needed.
Chris Lattner [Thu, 16 Jun 2011 21:36:36 +0000 (21:36 +0000)]
add some #includes that will soon be needed.

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

13 years agoprune #includes.
Chris Lattner [Thu, 16 Jun 2011 21:27:52 +0000 (21:27 +0000)]
prune #includes.

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

13 years agomove the address space into the subclass data field, saving a word on PointerType.
Chris Lattner [Thu, 16 Jun 2011 21:17:17 +0000 (21:17 +0000)]
move the address space into the subclass data field, saving a word on PointerType.

This limits the # address spaces to 2^23, which should be good enough.

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

13 years agotidy up some comments, store the 'isvararg' bit for FunctionType in
Chris Lattner [Thu, 16 Jun 2011 21:08:21 +0000 (21:08 +0000)]
tidy up some comments, store the 'isvararg' bit for FunctionType in
the SubclassData field, saving a word.

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

13 years agoremove Type::getVAArgsPromotedType, which is dead, and tidy up a bit.
Chris Lattner [Thu, 16 Jun 2011 21:00:43 +0000 (21:00 +0000)]
remove Type::getVAArgsPromotedType, which is dead, and tidy up a bit.

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

13 years agoThere's no need to be so picky about the particular register.
Nick Lewycky [Thu, 16 Jun 2011 21:00:00 +0000 (21:00 +0000)]
There's no need to be so picky about the particular register.

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

13 years agoFix ARCOpt to insert releases on both successors of an invoke rather
Dan Gohman [Thu, 16 Jun 2011 20:57:14 +0000 (20:57 +0000)]
Fix ARCOpt to insert releases on both successors of an invoke rather
than trying to insert them immediately after the invoke.

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

13 years agoMove PBQP off allocation_order_begin. No functional change intended.
Jakob Stoklund Olesen [Thu, 16 Jun 2011 20:37:45 +0000 (20:37 +0000)]
Move PBQP off allocation_order_begin. No functional change intended.

I think PBQP could use RegisterClassInfo, but it didn't fit neatly with
the external interfaces that PBQP uses, so I'll leave that to Lang.

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

13 years agoIntroduce MachineBranchProbabilityInfo class, which has similar API to
Jakub Staszak [Thu, 16 Jun 2011 20:22:37 +0000 (20:22 +0000)]
Introduce MachineBranchProbabilityInfo class, which has similar API to
BranchProbabilityInfo (expect setEdgeWeight which is not available here).
Branch Weights are kept in MachineBasicBlocks. To turn off this analysis
set -use-mbpi=false.

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

13 years agoChange the REG_SEQUENCE SDNode to take an explict register class ID as its first...
Owen Anderson [Thu, 16 Jun 2011 18:17:13 +0000 (18:17 +0000)]
Change the REG_SEQUENCE SDNode to take an explict register class ID as its first operand.  This operand is lowered away by the time we reach MachineInstrs, so the actual register-allocation handling of them doesn't need to change.
This is intended to support using REG_SEQUENCE SDNode's with type MVT::untyped, and is part of the long road to eliminating some of the hacks we currently use to support register pairs and other strange constraints, particularly on ARM NEON.

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

13 years agoSwitch linear scan to using RegisterClassInfo.
Jakob Stoklund Olesen [Thu, 16 Jun 2011 18:17:00 +0000 (18:17 +0000)]
Switch linear scan to using RegisterClassInfo.

This avoids the manual filtering of reserved registers and removes the
dependency on allocation_order_begin().

Palliative care...

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

13 years agoMove test for appropriate directory.
Galina Kistanova [Thu, 16 Jun 2011 18:13:57 +0000 (18:13 +0000)]
Move test for appropriate directory.

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

13 years agoMark ldrexd/strexd w/ volatile memory by default
Bruno Cardoso Lopes [Thu, 16 Jun 2011 18:11:32 +0000 (18:11 +0000)]
Mark ldrexd/strexd w/ volatile memory by default

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

13 years agoTest commit.
Jakub Staszak [Thu, 16 Jun 2011 18:01:17 +0000 (18:01 +0000)]
Test commit.

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

13 years agoPTX: Finish new calling convention implementation
Justin Holewinski [Thu, 16 Jun 2011 17:50:00 +0000 (17:50 +0000)]
PTX: Finish new calling convention implementation

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

13 years agoPTX: Rename register classes for readability and combine int and fp registers
Justin Holewinski [Thu, 16 Jun 2011 17:49:58 +0000 (17:49 +0000)]
PTX: Rename register classes for readability and combine int and fp registers

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

13 years agoAdd TargetRegisterInfo::getRawAllocationOrder().
Jakob Stoklund Olesen [Thu, 16 Jun 2011 17:42:25 +0000 (17:42 +0000)]
Add TargetRegisterInfo::getRawAllocationOrder().

This virtual function will replace allocation_order_begin/end as the one
to override when implementing custom allocation orders. It is simpler to
have one function return an ArrayRef than having two virtual functions
computing different ends of the same array.

Use getRawAllocationOrder() in place of allocation_order_begin() where
it makes sense, but leave some clients that look like they really want
the filtered allocation orders from RegisterClassInfo.

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

13 years agoAdd testcase for r133050 which added support for printing and parsing escaped
Nick Lewycky [Thu, 16 Jun 2011 17:14:38 +0000 (17:14 +0000)]
Add testcase for r133050 which added support for printing and parsing escaped
names for named metadata nodes.

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

13 years agoFix formatting.
Owen Anderson [Thu, 16 Jun 2011 16:52:24 +0000 (16:52 +0000)]
Fix formatting.

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

13 years agoDocument nonlazybind.
Dan Gohman [Thu, 16 Jun 2011 16:03:13 +0000 (16:03 +0000)]
Document nonlazybind.

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

13 years agoAdd a comment describing why transforming (shl x, 1) to (add x, x) is to be
Dan Gohman [Thu, 16 Jun 2011 15:55:48 +0000 (15:55 +0000)]
Add a comment describing why transforming (shl x, 1) to (add x, x) is to be
considered safe enough in this context.

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

13 years agoPTX: Fix whitespace errors
Justin Holewinski [Thu, 16 Jun 2011 15:17:11 +0000 (15:17 +0000)]
PTX: Fix whitespace errors

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

13 years agoAdd AVX suport for fpextend.
Bruno Cardoso Lopes [Thu, 16 Jun 2011 07:03:21 +0000 (07:03 +0000)]
Add AVX suport for fpextend.

Original patch by Syoyo Fujita with more comments by me.

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

13 years agoPrempt some obnoxious compiler from complaing about signed/unsigned
Jakob Stoklund Olesen [Thu, 16 Jun 2011 03:07:40 +0000 (03:07 +0000)]
Prempt some obnoxious compiler from complaing about signed/unsigned
compares.

2^30 is actually the limit on the number of physical registers per
TargetRegisterInfo.h.

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

13 years agoMake sure to pass an unsigned to a printf format that is always %u.
Jakob Stoklund Olesen [Thu, 16 Jun 2011 02:55:56 +0000 (02:55 +0000)]
Make sure to pass an unsigned to a printf format that is always %u.

This should unbreak the native ARM testers.

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

13 years agoFileCheck-ize test, and make it work on EABI hosts, like clang-native-arm-cortex-a9.
Eli Friedman [Thu, 16 Jun 2011 02:36:32 +0000 (02:36 +0000)]
FileCheck-ize test, and make it work on EABI hosts, like clang-native-arm-cortex-a9.

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

13 years agoForce a triple here so this test doesn't fail on EABI hosts (like clang-native-arm...
Eli Friedman [Thu, 16 Jun 2011 01:49:31 +0000 (01:49 +0000)]
Force a triple here so this test doesn't fail on EABI hosts (like clang-native-arm-cortex-a9).

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

13 years agoCommit the right set of tests for r133124. Sorry 'bout that!
Nick Lewycky [Thu, 16 Jun 2011 01:35:45 +0000 (01:35 +0000)]
Commit the right set of tests for r133124. Sorry 'bout that!

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

13 years agoReenabling this test with REQUIRES: Asserts
Andrew Trick [Thu, 16 Jun 2011 01:34:41 +0000 (01:34 +0000)]
Reenabling this test with REQUIRES: Asserts

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

13 years agoAdd support to lit for build mode requirements. e.g.
Andrew Trick [Thu, 16 Jun 2011 01:33:35 +0000 (01:33 +0000)]
Add support to lit for build mode requirements. e.g.
REQUIRES: Asserts
REQUIRES: Debug

This required chaining test configuration properties. It seems like a
generally good thing to do.

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

13 years agoTypos.
Chad Rosier [Thu, 16 Jun 2011 01:24:24 +0000 (01:24 +0000)]
Typos.

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

13 years agoRevision r128665 added an optimization to make use of NEON multiplier
Chad Rosier [Thu, 16 Jun 2011 01:21:54 +0000 (01:21 +0000)]
Revision r128665 added an optimization to make use of NEON multiplier
accumulator forwarding.  Specifically (from SVN log entry):

Distribute (A + B) * C to (A * C) + (B * C) to make use of NEON multiplier
accumulator forwarding:
vadd d3, d0, d1
vmul d3, d3, d2
=>
vmul d3, d0, d2
vmla d3, d1, d2

Make sure it catches cases where operand 1 is add/fadd/sub/fsub, which was
intended in the original revision.

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

13 years agoAdd a DAGCombine for (ext (binop (load x), cst)).
Nick Lewycky [Thu, 16 Jun 2011 01:15:49 +0000 (01:15 +0000)]
Add a DAGCombine for (ext (binop (load x), cst)).

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

13 years agoSilence warnings in non assert builds. Patch by David Blaikie
Bruno Cardoso Lopes [Thu, 16 Jun 2011 00:40:02 +0000 (00:40 +0000)]
Silence warnings in non assert builds. Patch by David Blaikie

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

13 years agoRename the test. Thanks Cameron! Use shorter/generic names.
Anna Zaks [Thu, 16 Jun 2011 00:34:10 +0000 (00:34 +0000)]
Rename the test. Thanks Cameron! Use shorter/generic names.

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

13 years agoFunction::getNumBlockIDs() should be used instead of Function::size() to set the...
Anna Zaks [Thu, 16 Jun 2011 00:03:21 +0000 (00:03 +0000)]
Function::getNumBlockIDs() should be used instead of Function::size() to set the upper limit on the block IDs since basic blocks might get removed (simplified away) after being initially numbered. Plus the test case, in which SelectionDAGBuilder::visitBr() calls llvm::MachineFunction::removeFromMBBNumbering(), which introduces the hole in numbering leading to an assert in llc (prior to the fix).

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