1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

47684 Commits

Author SHA1 Message Date
Evan Cheng
df9192b200 Add an alternative rev16 pattern. We should figure out a better way to handle these complex rev patterns. rdar://9609108
llvm-svn: 133289
2011-06-17 20:47:21 +00:00
Eric Christopher
25aa04466a 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

llvm-svn: 133288
2011-06-17 20:41:29 +00:00
Bill Wendling
88bb5d74ab 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.

llvm-svn: 133286
2011-06-17 20:35:21 +00:00
Stuart Hastings
03f59f5916 Relocate NUW test to cover all binary ops in a dynamic alloca expr.
Followup to 132926.  rdar://problem/9265821

llvm-svn: 133285
2011-06-17 20:21:52 +00:00
Chris Lattner
dd6d168c92 Drop the "2" suffix on some enums.
llvm-svn: 133274
2011-06-17 18:17:37 +00:00
Chris Lattner
04d8431b16 remove support for a bunch of obsolete instruction encodings
and other backward compatibility hacks.

llvm-svn: 133273
2011-06-17 18:09:11 +00:00
Benjamin Kramer
28b93c078a Remove a useless copy of MCELFStreamer. Patch by Logan Chien!
llvm-svn: 133272
2011-06-17 18:05:30 +00:00
Jakub Staszak
70a2c4bf32 getSuccWeight returns now default 0 if Weights vector is empty.
llvm-svn: 133271
2011-06-17 18:00:21 +00:00
Chris Lattner
ef05689a18 missed a file.
llvm-svn: 133270
2011-06-17 17:56:00 +00:00
Chris Lattner
d59a556c3a Remove some "2" suffixes from the metadata enums now that "1" is gone.
llvm-svn: 133269
2011-06-17 17:50:30 +00:00
Chris Lattner
c7bf0d0128 remove bitcode reader support for LLVM 2.7 metadata encoding.
llvm-svn: 133268
2011-06-17 17:48:53 +00:00
Chris Lattner
989da517f1 remove another old and dead hunk of code.
llvm-svn: 133267
2011-06-17 17:40:18 +00:00
Chris Lattner
2e2fad280a Stop accepting and ignoring attributes in function types. Attributes are applied
to functions and call/invokes, not to types.

llvm-svn: 133266
2011-06-17 17:37:13 +00:00
Jakub Staszak
87288736d2 Allow empty Weights vector.
llvm-svn: 133265
2011-06-17 17:30:10 +00:00
Roman Divacky
6778c94b24 Fix a few places where 32bit instructions/registerset were used on PPC64.
llvm-svn: 133260
2011-06-17 15:21:10 +00:00
Rafael Espindola
f9ff169e9c 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.

llvm-svn: 133255
2011-06-17 13:59:43 +00:00
Jay Foad
b337da0cff Fix typo in comment.
llvm-svn: 133254
2011-06-17 13:36:06 +00:00
Justin Holewinski
c515f1b903 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

llvm-svn: 133253
2011-06-17 12:12:42 +00:00
Nick Lewycky
9bfe06b4d6 When promoting an alloca to registers discard any lifetime intrinsics.
llvm-svn: 133251
2011-06-17 10:09:00 +00:00
Lang Hames
20552cda1a 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.
llvm-svn: 133249
2011-06-17 07:09:01 +00:00
Chris Lattner
0899957b99 make the asmparser reject function and type redefinitions. 'Merging' hasn't been
needed since llvm-gcc 3.4 days.

llvm-svn: 133248
2011-06-17 07:06:44 +00:00
Chris Lattner
385977c252 remove asmparser support for the old getresult instruction, which has been subsumed by extractvalue.
llvm-svn: 133247
2011-06-17 06:57:15 +00:00
Chris Lattner
9e7c036d09 remove parser support for the obsolete "multiple return values" syntax, which
was replaced with return of a "first class aggregate".

llvm-svn: 133245
2011-06-17 06:49:41 +00:00
Chris Lattner
17983fc4ba stop accepting begin/end around function bodies in the .ll parser, this isn't pascal anymore.
llvm-svn: 133244
2011-06-17 06:42:57 +00:00
Chris Lattner
4eb6f76fa6 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.

llvm-svn: 133242
2011-06-17 06:36:20 +00:00
Rafael Espindola
7adb7e304b Enable early duplication of small blocks. There are still improvements to
be made, but this is already a win.

llvm-svn: 133240
2011-06-17 05:54:50 +00:00
Jakob Stoklund Olesen
626abc2bc3 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.

llvm-svn: 133233
2011-06-17 03:47:30 +00:00
Chris Lattner
0824241aef 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.

llvm-svn: 133229
2011-06-17 03:16:47 +00:00
Cameron Zwarich
681f02ec26 Update an insertion point iterator after replacing a return instruction with a
tail call pseudoinstruction. This fixes <rdar://problem/9624333>.

llvm-svn: 133227
2011-06-17 02:16:43 +00:00
Jakob Stoklund Olesen
f9a3743f76 Explicitly invoke ArrayRef constructor to keep gcc happy.
Patch by Richard Smith!

llvm-svn: 133220
2011-06-17 00:18:25 +00:00
Jakob Stoklund Olesen
c185689b5c 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.

llvm-svn: 133216
2011-06-16 23:31:16 +00:00
Jakob Stoklund Olesen
91874697b3 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>

llvm-svn: 133210
2011-06-16 22:50:38 +00:00
Jakob Stoklund Olesen
36ac2b0ece Teach antidependency breakers to use RegisterClassInfo.
No functional change was intended.

llvm-svn: 133202
2011-06-16 21:56:21 +00:00
Chris Lattner
024b713434 change Type.h to forward declare ArrayRef instead of #including it.
llvm-svn: 133197
2011-06-16 21:37:15 +00:00
Chris Lattner
29d631bcf3 prune #includes.
llvm-svn: 133194
2011-06-16 21:27:52 +00:00
Chris Lattner
b235992acc 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.

llvm-svn: 133192
2011-06-16 21:17:17 +00:00
Chris Lattner
e266e33a4b tidy up some comments, store the 'isvararg' bit for FunctionType in
the SubclassData field, saving a word.

llvm-svn: 133191
2011-06-16 21:08:21 +00:00
Chris Lattner
1c22baaf6c remove Type::getVAArgsPromotedType, which is dead, and tidy up a bit.
llvm-svn: 133190
2011-06-16 21:00:43 +00:00
Dan Gohman
c9b4620575 Fix ARCOpt to insert releases on both successors of an invoke rather
than trying to insert them immediately after the invoke.

llvm-svn: 133188
2011-06-16 20:57:14 +00:00
Jakob Stoklund Olesen
548535e6d7 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.

llvm-svn: 133186
2011-06-16 20:37:45 +00:00
Jakub Staszak
5c7b7d64ba 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.

llvm-svn: 133184
2011-06-16 20:22:37 +00:00
Owen Anderson
c79aec8247 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.

llvm-svn: 133178
2011-06-16 18:17:13 +00:00
Jakob Stoklund Olesen
7e56e59d68 Switch linear scan to using RegisterClassInfo.
This avoids the manual filtering of reserved registers and removes the
dependency on allocation_order_begin().

Palliative care...

llvm-svn: 133177
2011-06-16 18:17:00 +00:00
Bruno Cardoso Lopes
8df123273d Mark ldrexd/strexd w/ volatile memory by default
llvm-svn: 133175
2011-06-16 18:11:32 +00:00
Jakub Staszak
fa3da986fa Test commit.
llvm-svn: 133174
2011-06-16 18:01:17 +00:00
Justin Holewinski
32a7bad9db PTX: Finish new calling convention implementation
llvm-svn: 133172
2011-06-16 17:50:00 +00:00
Justin Holewinski
a8d46115ce PTX: Rename register classes for readability and combine int and fp registers
llvm-svn: 133171
2011-06-16 17:49:58 +00:00
Jakob Stoklund Olesen
3bf75a3861 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.

llvm-svn: 133170
2011-06-16 17:42:25 +00:00
Dan Gohman
4762d28ff9 Add a comment describing why transforming (shl x, 1) to (add x, x) is to be
considered safe enough in this context.

llvm-svn: 133159
2011-06-16 15:55:48 +00:00
Justin Holewinski
94bacb9ece PTX: Fix whitespace errors
llvm-svn: 133158
2011-06-16 15:17:11 +00:00