1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

41282 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes
92bb02f722 Remove unused target specific node
llvm-svn: 113224
2010-09-07 17:38:55 +00:00
Benjamin Kramer
32f7af702a Don't leak the old operand when transforming "sldt" into "sldtw".
llvm-svn: 113200
2010-09-07 14:40:58 +00:00
Nick Lewycky
9698dae1df Add completely hokey binary-and and binary-or operations to ConstantRange and
teach LazyValueInfo to use them.

llvm-svn: 113196
2010-09-07 05:39:02 +00:00
Nick Lewycky
8c155b346e Fix major bug in thunk detection. Also verify the calling convention.
Switch from isWeakForLinker to mayBeOverridden which is more accurate.

Add more statistics and debugging info. Add comments. Move static function
outside anonymous namespace.

llvm-svn: 113190
2010-09-07 01:42:10 +00:00
Chris Lattner
fd65cfd3eb add missing cmov aliases, this resolves rdar://8208499
llvm-svn: 113189
2010-09-07 00:05:45 +00:00
Chris Lattner
927dc7a5d2 remove duplicated entry
llvm-svn: 113188
2010-09-06 23:57:24 +00:00
Nick Lewycky
ca54f909d8 Add a new isSignWrappedSet() method to ConstantRange.
Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.

llvm-svn: 113187
2010-09-06 23:52:49 +00:00
Chris Lattner
5a696fb3ca "sldt <mem>" is ambiguous in 64-bit mode, but should
always be disambiguated as sldtw.  sldtw and sldtq with
a mem operands have the same effect, but sldtw is more
compact.  Force it to sldtw, resolving rdar://8017530

llvm-svn: 113186
2010-09-06 23:51:44 +00:00
Chris Lattner
3377802111 fix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"
llvm-svn: 113184
2010-09-06 23:40:56 +00:00
Chris Lattner
6ecbbff857 fix the operand constraints of the immediate form of in/out,
allowing unsigned 8-bit operands.  This fixes rdar://8208481

llvm-svn: 113182
2010-09-06 23:29:05 +00:00
Chris Lattner
6bfa0d9988 in the case where an instruction only has one implementation
of a mneumonic, report operand errors with better location
info.  For example, we now report:

t.s:6:14: error: invalid operand for instruction
        cwtl $1
             ^

but we fail for common cases like:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1
   ^

because we don't know if this is supposed to be the reg/imm or imm/reg
form.

llvm-svn: 113178
2010-09-06 22:11:18 +00:00
Chris Lattner
bb5e19cb63 Now that we know if we had a total fail on the instruction mnemonic,
give a more detailed error.  Before:

t.s:11:4: error: unrecognized instruction
   addl $1, $1
   ^
t.s:12:4: error: unrecognized instruction
   f2efqefa $1
   ^

After:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1
   ^
t.s:12:4: error: invalid instruction mnemonic 'f2efqefa'
   f2efqefa $1
   ^

This fixes rdar://8017912 - llvm-mc says "unrecognized instruction" when it means "invalid operands"

llvm-svn: 113176
2010-09-06 21:54:15 +00:00
Chris Lattner
87234fd589 simplify the hacks around jrcxz.
llvm-svn: 113167
2010-09-06 20:10:12 +00:00
Chris Lattner
68f7c5b750 have tblgen detect when an instruction would have matched, but
failed because a subtarget feature was not enabled.  Use this to
remove a bunch of hacks from the X86AsmParser for rejecting things
like popfl in 64-bit mode.  Previously these hacks weren't needed,
but were important to get a message better than "invalid instruction"
when used in the wrong mode.

This also fixes bugs where pushal would not be rejected correctly in
32-bit mode (just pusha).

llvm-svn: 113166
2010-09-06 20:08:02 +00:00
Chris Lattner
22bb9cb511 change MatchInstructionImpl to return an enum instead of bool.
llvm-svn: 113165
2010-09-06 19:22:17 +00:00
Chris Lattner
45a204be76 have AsmMatcherEmitter.cpp produce the hunk of code that gets included
into the middle of the class, and rework how the different sections of
the generated file are conditionally included for simplicity.

llvm-svn: 113163
2010-09-06 19:11:01 +00:00
Roman Divacky
f760edb301 Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.
llvm-svn: 113158
2010-09-06 18:43:14 +00:00
Chris Lattner
3bd0996c77 random cleanups
llvm-svn: 113157
2010-09-06 18:32:06 +00:00
Benjamin Kramer
2447226e73 MCELF: Align symtab, relocation sections and section headers properly. Patch by Krister Wombell.
llvm-svn: 113155
2010-09-06 16:11:52 +00:00
Chris Lattner
7cd17a7a4a compute the HasSSE3 bit correctly, patch by Nikolai Saoukh.
llvm-svn: 113147
2010-09-06 05:19:44 +00:00
Chris Lattner
6e6a535055 fix PR8067, an over-aggressive assertion in LICM.
llvm-svn: 113146
2010-09-06 05:11:24 +00:00
Chris Lattner
cec733bec6 cleanup some of the lifetime/invariant marker stuff, add a big fixme.
llvm-svn: 113144
2010-09-06 03:58:04 +00:00
Chris Lattner
7576ffb974 speed up -gvn 3.4% on the testcase in PR7023
llvm-svn: 113135
2010-09-06 01:26:29 +00:00
Chris Lattner
4100881939 Teach loop rotate to hoist trivially invariant instructions
in the duplicated block instead of duplicating them.  

Duplicating them into the end of the loop and the preheader 
means that we got a phi node in the header of the loop, 
which prevented LICM from hoisting them.  GVN would
usually come around later and merge the duplicated 
instructions so we'd get reasonable output... except that
anything dependent on the shoulda-been-hoisted value can't
be hoisted.  In PR5319 (which this fixes), a memory value
didn't get promoted.

llvm-svn: 113134
2010-09-06 01:10:22 +00:00
Chris Lattner
818045f208 pull a simple method out of LICM into a new
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.

No functionality change.

llvm-svn: 113133
2010-09-06 01:05:37 +00:00
Chris Lattner
c0e5368884 remove some dead code. t2addrmode_imm8s4 is never used in a
pattern, so there is no need to define a matching function.

llvm-svn: 113122
2010-09-05 22:51:11 +00:00
Chris Lattner
bd47c48735 cleanups.
llvm-svn: 113119
2010-09-05 21:18:45 +00:00
Chris Lattner
6c08c3b321 add a comment about where this should eventually move.
llvm-svn: 113117
2010-09-05 20:33:40 +00:00
Chris Lattner
908d8e9de2 update this.
llvm-svn: 113116
2010-09-05 20:22:09 +00:00
Chris Lattner
e54b9e2332 more cleanups
llvm-svn: 113115
2010-09-05 20:13:07 +00:00
Chris Lattner
41d0913a1d Change lower atomic pass to use IntrinsicInst to simplify it a bit.
llvm-svn: 113114
2010-09-05 20:10:47 +00:00
Chris Lattner
fc6bf7cb34 eliminate some non-obvious casts. UndefValue isa Constant.
llvm-svn: 113113
2010-09-05 20:03:09 +00:00
Chris Lattner
4dccd368f3 fix PR8063, a crash in globalopt in the malloc analysis code.
llvm-svn: 113109
2010-09-05 17:20:46 +00:00
Lang Hames
af037cded6 Added initialisers for reduction rule counters.
llvm-svn: 113108
2010-09-05 13:42:32 +00:00
Nick Lewycky
d48f0c5718 Fix warning reported by MSVC++ builder.
llvm-svn: 113106
2010-09-05 09:11:38 +00:00
Nick Lewycky
97d03432c5 Switch FnSet to containing the ComparableFunction instead of a pointer to one.
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.

llvm-svn: 113105
2010-09-05 09:00:32 +00:00
Nick Lewycky
b505af7ec4 Fix many bugs when merging weak-strong and weak-weak pairs. We now merge all
strong functions first to make sure they're the canonical definitions and then
do a second pass looking only for weak functions.

llvm-svn: 113104
2010-09-05 08:22:49 +00:00
Chris Lattner
684ae57b8e implement rdar://6653118 - fastisel should fold loads where possible.
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	addl	%edx, %esi
	movl	(%rsp), %edx
	addl	%esi, %edx
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Now we produce:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	addl	4(%rsp), %edx    ## Folded load
	addl	(%rsp), %edx     ## Folded load
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Fewer instructions and less register use = faster compiles.

llvm-svn: 113102
2010-09-05 02:18:34 +00:00
Jakob Stoklund Olesen
14f6dc4465 Remove dead code.
Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

llvm-svn: 113084
2010-09-04 21:09:33 +00:00
Chris Lattner
238e7c2fbe dead method.
llvm-svn: 113077
2010-09-04 18:19:16 +00:00
Chris Lattner
8df3ffd7ac zap dead code.
llvm-svn: 113073
2010-09-04 18:12:00 +00:00
Chris Lattner
b5f94883b0 remove dead code, mblaze uses SelectAddrRegImm/SelectAddrRegReg,
not SelectAddr

llvm-svn: 113072
2010-09-04 18:02:47 +00:00
Bruno Cardoso Lopes
8d76bbe31c Remove the last bit of isShuffleMaskLegal checks and improve the comment regarding mmx shuffles
llvm-svn: 113059
2010-09-04 02:58:56 +00:00
Bruno Cardoso Lopes
fccf00be8c make explicit that we not handle several mmx shuffles
llvm-svn: 113058
2010-09-04 02:50:13 +00:00
Dan Gohman
e1ad0ebbcc Fix LoopSimplify to notify ScalarEvolution when splitting a loop backedge
into an inner loop, as the new loop iteration may differ substantially.
This fixes PR8078.

llvm-svn: 113057
2010-09-04 02:42:48 +00:00
Bruno Cardoso Lopes
0562140ec3 Emit target specific nodes to handle palignr. Do not touch it for MMX versions yet.
llvm-svn: 113056
2010-09-04 02:36:07 +00:00
Bruno Cardoso Lopes
73651844b2 Emit target specific nodes to handle splats starting at zero indicies
llvm-svn: 113055
2010-09-04 02:02:14 +00:00
Bruno Cardoso Lopes
483bb7eed2 Emit target specific nodes for isPSHUFHWMask and isPSHUFLWMask
llvm-svn: 113050
2010-09-04 01:36:45 +00:00
Bruno Cardoso Lopes
742030b3db Emit target specific nodes for isSHUFPMask
llvm-svn: 113048
2010-09-04 01:22:57 +00:00
Bruno Cardoso Lopes
3e3169873e Previous isMOVLMask matching already emits targets nodes, remove check
llvm-svn: 113047
2010-09-04 00:50:08 +00:00