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

65780 Commits

Author SHA1 Message Date
Anton Korobeynikov
c425302670 Do not check that the bodies of two defs of same linkonce global are the same.
Such a check does not make any sense in presense of inlining and other compiler-dependent stuff.
This should fix bunch of warnings on mingw32.

llvm-svn: 116113
2010-10-08 21:50:04 +00:00
Jim Grosbach
3075d28c15 Implement a few more binary encoding bits. Still very early stage proof-of-
concept level stuff at this point, but it is generally working for those
instructions that know how to map the operands.

This patch fills in the register operands for add/sub/or/etc instructions
and adds the conditional execution predicate encoding.

llvm-svn: 116112
2010-10-08 21:45:55 +00:00
Jim Grosbach
b328f0ab04 Allow << streaming of MCOperand.
llvm-svn: 116107
2010-10-08 21:36:13 +00:00
Jakob Stoklund Olesen
9d127e625c Classify value numbers into connected components in linear time.
llvm-svn: 116105
2010-10-08 21:19:28 +00:00
Rafael Espindola
bfd3c31acf Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc.

llvm-svn: 116095
2010-10-08 19:37:38 +00:00
Dan Gohman
d64a33ade4 Filter out illegal formulae after updating offsets, not before, so that
formulae which become illegal as a result of the offset updating don't
escape.

This is for rdar://8529692. No testcase yet, because the given cases
hit use-list ordering differences.

llvm-svn: 116093
2010-10-08 19:33:26 +00:00
Cameron Esfahani
664317d6cd Recommit 116056, now with the missing file...
llvm-svn: 116083
2010-10-08 19:24:18 +00:00
Evan Cheng
8833658eb0 Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.
llvm-svn: 116081
2010-10-08 18:59:19 +00:00
Evan Cheng
b6cde7cdf4 Fix operand latency computation in cases where the definition operand is
implicit. e.g.
%D6<def>, %D7<def> = VLD1q16 %R2<kill>, 0, ..., %Q3<imp-def>                                                                                                                                                                              
%Q1<def> = VMULv8i16 %Q1<kill>, %Q3<kill>, ...

The real definition indices are 0,1.

llvm-svn: 116080
2010-10-08 18:42:25 +00:00
Daniel Dunbar
0ee860f6fd CrashRecovery: Fix raise() override to actually send the right signal, *cough*.
llvm-svn: 116072
2010-10-08 18:31:34 +00:00
Jim Grosbach
fb59963159 A few 80 column cleanups
llvm-svn: 116069
2010-10-08 18:13:57 +00:00
Jim Grosbach
507bebdd8a trailing whitespace
llvm-svn: 116068
2010-10-08 18:09:59 +00:00
Jim Grosbach
85b45fcc52 Reapply 116059, this time without the fatfingered pasto at the top.
''const'ify getMachineOpValue() and associated helpers.'

llvm-svn: 116067
2010-10-08 17:45:54 +00:00
Jim Grosbach
674fa65e33 Reverting 116059. Bots are unhappy with it.
llvm-svn: 116064
2010-10-08 17:28:40 +00:00
Andrew Trick
0d8a3d67e0 reverting 116056: win64_params.ll may need to be conditionalized?
llvm-svn: 116063
2010-10-08 17:22:42 +00:00
Devang Patel
3090b0ebf1 Line number 0 indicates there is no source line/file name info available for this construct.
llvm-svn: 116061
2010-10-08 17:18:54 +00:00
Jim Grosbach
8d4bb23650 'const'ify getMachineOpValue() and associated helpers.
llvm-svn: 116059
2010-10-08 16:52:44 +00:00
Kenneth Uildriks
0545afa8fd Start separating out code metrics into code size metrics and code performance metrics. Partial Specialization will apply the former to function specializations, and the latter to all callsites that can use a specialization, in order to decide whether to create a specialization
llvm-svn: 116057
2010-10-08 13:57:31 +00:00
Cameron Esfahani
a9f8bb1356 Small patch to restore home register stack space allocation for the Win64 case. Add test case. This code eventually needs to be tighter, since it's always allocating it, even in leaf routines.
llvm-svn: 116056
2010-10-08 10:31:30 +00:00
Bob Wilson
8689a52c10 Change register allocation order for ARM VFP and NEON registers to put the
callee-saved registers at the end of the lists.  Also prefer to avoid using
the low registers that are in register subclasses required by certain
instructions, so that those registers will more likely be available when needed.
This change makes a huge improvement in spilling in some cases.  Thanks to
Jakob for helping me realize the problem.

Most of this patch is fixing the testsuite.  There are quite a few places
where we're checking for specific registers.  I changed those to wildcards
in places where that doesn't weaken the tests.  The spill-q.ll and
thumb2-spill-q.ll tests stopped spilling with this change, so I added a bunch
of live values to force spills on those tests.

llvm-svn: 116055
2010-10-08 06:15:13 +00:00
Chris Lattner
761f40f7ee testcase that goes with r116053
llvm-svn: 116054
2010-10-08 05:12:30 +00:00
Chris Lattner
244e13f439 fix a subtle bug I introduced in my refactoring, where we stopped preferring
the i8 versions of instructions in some cases.  In test6, we started 
generating:

	cmpq	$0, -8(%rsp)            ## encoding: [0x48,0x81,0x7c,0x24,0xf8,0x00,0x00,0x00,0x00]
                                        ## <MCInst #478 CMP64mi32
                                        ##  <MCOperand Reg:114>
                                        ##  <MCOperand Imm:1>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:-8>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:0>>

instead of:

	cmpq	$0, -8(%rsp)            ## encoding: [0x48,0x83,0x7c,0x24,0xf8,0x00]
                                        ## <MCInst #479 CMP64mi8
                                        ##  <MCOperand Reg:114>
                                        ##  <MCOperand Imm:1>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:-8>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:0>>

Fix this and add some comments.

llvm-svn: 116053
2010-10-08 05:12:14 +00:00
Chris Lattner
c77216343c rename test
llvm-svn: 116052
2010-10-08 05:05:06 +00:00
Chris Lattner
c694d80729 merge tests
llvm-svn: 116051
2010-10-08 05:04:58 +00:00
Chris Lattner
79fbe67839 filecheckize.
llvm-svn: 116050
2010-10-08 05:02:29 +00:00
Chris Lattner
82ce325f16 reapply: Use the new TB_NOT_REVERSABLE flag instead of special
reapply: reimplement the second half of the or/add optimization.  We should now

with no changes.  Turns out that one missing "Defs = [EFLAGS]" can upset things
a bit.

llvm-svn: 116040
2010-10-08 03:57:25 +00:00
Chris Lattner
fbdd285dd6 reapply the patch reverted in r116033:
"Reimplement (part of) the or -> add optimization.  Matching 'or' into 'add'"

With a critical fix: the add pseudos clobber EFLAGS.

llvm-svn: 116039
2010-10-08 03:54:52 +00:00
Michael J. Spencer
3725cf3d21 Fix Formatting.
llvm-svn: 116038
2010-10-08 03:17:21 +00:00
Michael J. Spencer
bdf3b8770f MC-COFF: Fix Simple and Complex type. Fixes PR8320.
llvm-svn: 116037
2010-10-08 03:17:11 +00:00
Michael J. Spencer
fc3f9d7c92 Fix Whitespace.
llvm-svn: 116036
2010-10-08 03:16:56 +00:00
Daniel Dunbar
8b2890afae Update CMake.
llvm-svn: 116034
2010-10-08 02:30:03 +00:00
Daniel Dunbar
d3b6b8bf2b Revert "Reimplement (part of) the or -> add optimization. Matching 'or' into
'add'", which seems to have broken just about everything.

llvm-svn: 116033
2010-10-08 02:07:32 +00:00
Daniel Dunbar
59848f6703 Revert "Use the new TB_NOT_REVERSABLE flag instead of special ", which depends
on r116007, which I am about to revert.

llvm-svn: 116032
2010-10-08 02:07:29 +00:00
Daniel Dunbar
983fae5a86 Revert "reimplement the second half of the or/add optimization. We should now",
which depends on r116007, which I am about to revert.

llvm-svn: 116031
2010-10-08 02:07:26 +00:00
Daniel Dunbar
8ac0e27ca6 Fix -Asserts warning.
llvm-svn: 116030
2010-10-08 02:07:22 +00:00
Eric Christopher
45a5ff5ca3 Move to thumb2 loads, fixes a problem with incoming registers
as thumb1.

Fixes lencod.

llvm-svn: 116027
2010-10-08 01:13:17 +00:00
Chris Lattner
7577cb7b49 reimplement the second half of the or/add optimization. We should now
only end up emitting LEA instead of OR.  If we aren't able to promote
something into an LEA, we should never be emitting it as an ADD.

Add some testcases that we emit "or" in cases where we used to produce
an "add".

llvm-svn: 116026
2010-10-08 01:05:10 +00:00
Jim Grosbach
edbbf33203 Add test file for simple ARM binary encodings with MC
llvm-svn: 116024
2010-10-08 00:47:59 +00:00
Jim Grosbach
1214818a3e Enable binary encoding of some simple instructions.
llvm-svn: 116022
2010-10-08 00:39:21 +00:00
Eric Christopher
4d10241635 Try to fix ocaml bindings.
llvm-svn: 116021
2010-10-08 00:36:21 +00:00
Jim Grosbach
df2ff926a6 Make <target>CodeEmitter::getBinaryCodeForInstr() a const method.
llvm-svn: 116018
2010-10-08 00:21:28 +00:00
Chris Lattner
d62e94b465 Use the new TB_NOT_REVERSABLE flag instead of special
casing FsMOVAPDrr/FsMOVAPSrr.

llvm-svn: 116016
2010-10-08 00:03:02 +00:00
Michael J. Spencer
452789b5c0 MC-COFF: Add test for my last commit.
llvm-svn: 116015
2010-10-08 00:00:28 +00:00
Chris Lattner
72e7e84c3f simplify some map operations.
llvm-svn: 116014
2010-10-07 23:57:02 +00:00
Michael J. Spencer
43ccdd557d MC-COFF: Handle relaxation in COFF better. Fixes PR8321.
llvm-svn: 116013
2010-10-07 23:55:40 +00:00
Dan Gohman
27e145fc97 Delete the FormulaSorter class and inline its one method into its
one user. This code will be restructured soon and FormulaSorter
is getting in the way.

llvm-svn: 116012
2010-10-07 23:52:18 +00:00
Dan Gohman
9b55022e83 Fix a spello.
llvm-svn: 116011
2010-10-07 23:43:09 +00:00
Dan Gohman
d8eb76e4e8 Charge a formula for explicit multiplies on scaled registers too,
not just base registers.

llvm-svn: 116010
2010-10-07 23:41:58 +00:00
Dan Gohman
aa2c086eb9 Use size_t for consistency.
llvm-svn: 116009
2010-10-07 23:37:58 +00:00
Dan Gohman
8cc92ffff1 When merging one use into another, transfer the offsets from
the old use to the new one.

llvm-svn: 116008
2010-10-07 23:36:45 +00:00