1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

36345 Commits

Author SHA1 Message Date
Dan Gohman
c97d42a5d5 Fix indentation.
llvm-svn: 97024
2010-02-24 06:46:09 +00:00
Chris Lattner
52a02205d8 Change the scheduler from adding nodes in allnodes order
to adding them in a determinstic order (bottom up from 
the root) based on the structure of the graph itself.

This updates tests for some random changes, interesting
bits: CodeGen/Blackfin/promote-logic.ll no longer crashes.
I have no idea why, but that's good right?

CodeGen/X86/2009-07-16-LoadFoldingBug.ll also fails, but
now compiles to have one fewer constant pool entry, making
the expected load that was being folded disappear.  Since it
is an unreduced mass of gnast, I just removed it.

This fixes PR6370

llvm-svn: 97023
2010-02-24 06:11:37 +00:00
Chandler Carruth
541c3f0bcc Remove an unused variable. Was this intentional?
llvm-svn: 97022
2010-02-24 06:09:03 +00:00
Chris Lattner
b1b5df8a16 add node #'s to debug dumps.
llvm-svn: 97019
2010-02-24 04:24:44 +00:00
Johnny Chen
c31a44dd8b Added for disassembly VST1 (multiple single elements) which stores elements to
memory from three or four registers and VST2 (multiple two-element structures)
which stores to memory from two double-spaced registers.

A8.6.391 & A8.6.393

llvm-svn: 97018
2010-02-24 02:57:20 +00:00
Jim Grosbach
3eacf455a0 handle very large call frames when require SPAdj != 0 for Thumb1
llvm-svn: 97013
2010-02-24 02:15:43 +00:00
Jim Grosbach
6f72657d6e LowerCall() should always do getCopyFromReg() to reference the stack pointer.
Machine instruction selection is much happier when operands are in virtual
registers.

llvm-svn: 97012
2010-02-24 01:43:03 +00:00
Evan Cheng
5787cd9349 Re-apply 96540 and 96556 with fixes.
llvm-svn: 97011
2010-02-24 01:42:31 +00:00
Bob Wilson
437d85dd57 Add an argument to PHITranslateValue to specify the DominatorTree. If this
argument is non-null, pass it along to PHITranslateSubExpr so that it can
prefer using existing values that dominate the PredBB, instead of just
blindly picking the first equivalent value that it finds on a uselist.
Also when the DominatorTree is specified, have PHITranslateValue filter
out any result that does not dominate the PredBB.  This is basically just
refactoring the check that used to be in GetAvailablePHITranslatedSubExpr
and also in GVN.

Despite my initial expectations, this change does not affect the results
of GVN for any testcases that I could find, but it should help compile time.
Before this change, if PHITranslateSubExpr picked a value that does not
dominate, PHITranslateWithInsertion would then insert a new value, which GVN
would later determine to be redundant and would replace.  By picking a good
value to begin with, we save GVN the extra work of inserting and then
replacing a new value.

llvm-svn: 97010
2010-02-24 01:39:00 +00:00
Jakob Stoklund Olesen
a946f9eb7d DIV8r must define %AX since X86DAGToDAGISel::Select() sometimes uses it
instead of %AL/%AH.

llvm-svn: 97006
2010-02-24 00:39:35 +00:00
Chris Lattner
80c14ff96b make selectnodeto set the nodeid to -1. This makes it more akin to
creating a new node then replacing uses.

llvm-svn: 97000
2010-02-23 23:01:35 +00:00
Jakob Stoklund Olesen
3406ec2f57 Remember to handle sub-registers when moving imp-defs to a rematted instruction.
llvm-svn: 96995
2010-02-23 22:44:02 +00:00
Jakob Stoklund Olesen
cf29251712 Keep track of phi join registers explicitly in LiveVariables.
Previously, LiveIntervalAnalysis would infer phi joins by looking for multiply
defined registers. That doesn't work if the phi join is implicitly defined in
all but one of the predecessors.

llvm-svn: 96994
2010-02-23 22:43:58 +00:00
Evan Cheng
d1d1755a44 Fix rev 96389 by restricting the xform to mask that's either signbit or max signed value.
llvm-svn: 96990
2010-02-23 21:51:54 +00:00
Kevin Enderby
69d643ba20 This is the second patch to allow x86 code to be aligned with optimal nops.
With the compiler changed to use EmitCodeAlignment() it does change the
functionality.  But X86 assembly code assembled with llvm-mc does not change
its output.  For that we will eventually change the assembler frontend to
detect a '.align x, 0x90' when used in a section that 'hasInstructions' and use
EmitCodeAlignment, but will wait until we have better target hooks.

llvm-svn: 96988
2010-02-23 21:41:24 +00:00
Richard Osborne
92fb0be76b Don't mark call instruction as a barrier.
llvm-svn: 96983
2010-02-23 21:08:11 +00:00
Johnny Chen
7e4227c8e1 Added for disassembly VLD1 (multiple single elements) which loads memory into
three or four registers and VLD2 (multiple two-element structures) which loads
memory into two double-spaced registers.

A8.6.307 & A8.6.310

llvm-svn: 96980
2010-02-23 20:51:23 +00:00
Nicolas Geoffray
8b11b7ce2b Use the module's context instead of the global context.
llvm-svn: 96977
2010-02-23 19:42:44 +00:00
Chris Lattner
74715dd299 no need to override IsLegalToFold, the base implementation
disables load folding at -O0.

llvm-svn: 96973
2010-02-23 19:33:11 +00:00
Chris Lattner
f6e9f39042 fix a bug in findNonImmUse (used by IsLegalToFold) where nodes with
no id's would cause early exit allowing IsLegalToFold to return true
instead of false, producing a cyclic dag.

This was striking the new isel because it isn't using SelectNodeTo yet,
which theoretically is just an optimization.

llvm-svn: 96972
2010-02-23 19:32:27 +00:00
Chris Lattner
4d568129c4 Print node ID's in dumps and views if set.
llvm-svn: 96971
2010-02-23 19:31:18 +00:00
Wesley Peck
94cdac52e5 Adding the MicroBlaze backend.
The MicroBlaze is a highly configurable 32-bit soft-microprocessor for
use on Xilinx FPGAs. For more information see:
http://www.xilinx.com/tools/microblaze.htm
http://en.wikipedia.org/wiki/MicroBlaze

The current LLVM MicroBlaze backend generates assembly which can be
compiled using the an appropriate binutils assembler.

llvm-svn: 96969
2010-02-23 19:15:24 +00:00
Chris Lattner
45a2c36ddc use OutStreamer.EmitCodeAlignment for alignment in the text
segment.

llvm-svn: 96967
2010-02-23 18:46:22 +00:00
Chris Lattner
405e4a1d63 genericize MCAsmStreamer::EmitCodeAlignment to support other targets
so that it doesn't break them when the code generator starts using it.

llvm-svn: 96966
2010-02-23 18:44:31 +00:00
Richard Osborne
eb0446c12a ECALLF, ECALLT shouldn't be marked as barriers.
llvm-svn: 96964
2010-02-23 18:29:49 +00:00
Kevin Enderby
c11390f758 This is the first patch to put the needed bits in place to eventually allow code
to be aligned with optimal nops.  This patch does not change any functionality
and when the compiler is changed to use EmitCodeAlignment() it should also not
change the resulting output.  Once the compiler change is made and everything
looks good the next patch with the table of optimal X86 nops will be added to
WriteNopData() changing the output.  There are many FIXMEs in this patch which
will be removed when we have better target hooks (coming soon I hear).

llvm-svn: 96963
2010-02-23 18:26:34 +00:00
Richard Osborne
9abd3b3ca7 Mark unconditional branches as barriers. Found using -verify-machineinstrs
llvm-svn: 96960
2010-02-23 18:13:38 +00:00
David Greene
dad0944642 Speed up cycle checking significantly by caching results.
llvm-svn: 96956
2010-02-23 17:37:50 +00:00
Dan Gohman
b3bf4992c5 Don't do (X != Y) ? X : Y -> X for floating-point values; it doesn't
handle NaN properly.

Do (X une Y) ? X : Y  -> X if one of X and Y is not zero.

llvm-svn: 96955
2010-02-23 17:17:57 +00:00
Jim Grosbach
0525cd8596 Spelling. s/suppor /support /
llvm-svn: 96954
2010-02-23 17:16:27 +00:00
Dan Gohman
5a6b9ad7db Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
getelementptr. Despite only doing so in the case where x is a known
array object and c can be converted to an index within range, this
could still be invalid if c is actually the address of an object
allocated outside of LLVM. Also, SCEVExpander, the original motivation
for this code, has since been improved to avoid inttoptr+ptroint in
more cases.

llvm-svn: 96950
2010-02-23 16:35:41 +00:00
Richard Osborne
ff660d72eb Remove unused lowering function LowerJumpTable
llvm-svn: 96943
2010-02-23 14:17:20 +00:00
Richard Osborne
7387249531 Lower BR_JT on the XCore to a jump into a series of jump instructions.
llvm-svn: 96942
2010-02-23 13:25:07 +00:00
Mikhail Glushenkov
3cd3e0df5f Input files with empty suffixes must be passed to linker.
llvm-svn: 96927
2010-02-23 09:05:21 +00:00
Mikhail Glushenkov
ce7b3292dd Temporary disable response files.
They are giving us problems on Mac.

llvm-svn: 96925
2010-02-23 09:05:10 +00:00
Mikhail Glushenkov
c47f951a86 Implement order-preserving option forwarding.
Needed to correctly handle things like 'llvmc -framework Foo foo.o -framework
Bar bar.o' - before this commit all '-framework' options would've been grouped
together in the beginning.

Due to our dependence on CommandLine this turned out to be a giant hack; we will
migrate away from CommandLine eventually.

llvm-svn: 96922
2010-02-23 09:04:57 +00:00
Mikhail Glushenkov
232ae779ee Correct option forwarding: initial implementation.
Does not work, but the infrastructure changes are in place.

llvm-svn: 96920
2010-02-23 09:04:44 +00:00
Mikhail Glushenkov
d030cced3d New experimental/undocumented feature: 'works_on_empty'.
For now, just enough support to make -filelist work.

llvm-svn: 96918
2010-02-23 09:04:28 +00:00
Chris Lattner
e7f90b31ad disable two patterns that are using non-sensical result pattern types.
llvm-svn: 96903
2010-02-23 07:21:15 +00:00
Chris Lattner
684559d2ef remove a confused pattern that is trying to match an address
then use it as an MMX register (!?).

llvm-svn: 96901
2010-02-23 07:16:12 +00:00
Chris Lattner
03b5f3e853 remove a bunch of dead named arguments in input patterns,
though some look dubious afaict, these are all ok.

llvm-svn: 96899
2010-02-23 06:54:29 +00:00
Chris Lattner
4fb7a4c1c2 fix a type mismatch in this pattern, where we were using an i64 imm in a
place where an i32 imm was required, the old isel just got lucky.

This fixes CodeGen/X86/x86-64-and-mask.ll

llvm-svn: 96894
2010-02-23 06:09:57 +00:00
Bob Wilson
b3640f8018 Update memdep when load PRE inserts a new load, and add some debug output.
I don't have a small testcase for this.

llvm-svn: 96890
2010-02-23 05:55:00 +00:00
Chris Lattner
8a5eea0929 reapply my cellspu changes with a fix to not break the old isel.
llvm-svn: 96885
2010-02-23 05:30:43 +00:00
Dan Gohman
f1ac231d17 Revert 96854, 96852, and 96849, unbreaking test/CodeGen/CellSPU/i64ops.ll.
llvm-svn: 96871
2010-02-23 02:33:29 +00:00
Chris Lattner
42f0bd1d2c X86InstrInfoSSE.td declares PINSRW as having type v8i16,
don't alis it in the MMX .td file with a different width,
split into two X86ISD opcodes.  This fixes an x86 testcase.

llvm-svn: 96859
2010-02-23 02:07:48 +00:00
Johnny Chen
9077a6f901 Added versions of VCGE, VCGT, VCLE, and VCLT NEON instructions which compare to
(immediate #0) for disassembly only.

A8.6.283, A8.6.285, A8.6.287, A8.6.290

llvm-svn: 96856
2010-02-23 01:42:58 +00:00
Chris Lattner
cffb96542a fix hte last cellspu failure.
llvm-svn: 96854
2010-02-23 01:37:39 +00:00
Chris Lattner
0872bdfb41 hack around more crimes in instruction selection.
llvm-svn: 96852
2010-02-23 01:33:17 +00:00
Chris Lattner
c175e45976 the cell backend is making all sorts of unsafe and incorrect assumptions
about ownership and update policies.  It isn't clear why it is doing all
this lowering at isel time instead of in legalize.  This fixes fcmp64.ll

llvm-svn: 96849
2010-02-23 01:20:00 +00:00