Mikhail Glushenkov
f4c5cfac0d
Trailing whitespace.
...
llvm-svn: 96923
2010-02-23 09:05:01 +00:00
Mikhail Glushenkov
3222d94a28
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
a44e838bcb
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
ebf8fbbb8f
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
Mikhail Glushenkov
e499d576a9
Add a way to enable '-opt=foo' forwarding.
...
llvm-svn: 96916
2010-02-23 09:04:13 +00:00
Daniel Dunbar
6d914f8904
Eliminate llvmgcc_version testing variable.
...
llvm-svn: 96908
2010-02-23 07:56:28 +00:00
Daniel Dunbar
d6a395278b
Kill unused llvmgccmajvers testing variable.
...
llvm-svn: 96906
2010-02-23 07:56:18 +00:00
Chris Lattner
4b9225b41a
add some #if 0'd out code for checking that named values in
...
input/output patterns have the same type. It turns out that
this triggers all the time because we don't infer types
between these boundaries. Until we do, don't turn this on.
llvm-svn: 96905
2010-02-23 07:50:58 +00:00
Chris Lattner
5b0e24902b
Reject patterns that use a name multiple times in the src or result
...
of a pattern and where the uses have different types.
llvm-svn: 96904
2010-02-23 07:22:28 +00:00
Chris Lattner
a7722b6f76
reject patterns that have dead named arguments in the input pattern
...
this is tidier and can find bugs.
llvm-svn: 96900
2010-02-23 06:55:24 +00:00
Chris Lattner
94d3b0a77d
reject patterns that mention a name in the destination pattern
...
but not in the input. Previously, this would trigger an abort
late in the isel logic.
llvm-svn: 96898
2010-02-23 06:35:45 +00:00
Chris Lattner
0c0baa91a4
merge some code.
...
llvm-svn: 96896
2010-02-23 06:16:51 +00:00
Chris Lattner
f66b6aa232
more tidying up
...
llvm-svn: 96891
2010-02-23 05:59:10 +00:00
Chris Lattner
ee820ace06
reduce indentation by eliminating 'else after return'
...
llvm-svn: 96889
2010-02-23 05:51:07 +00:00
Chris Lattner
addbb0290c
really fix an off-by-one error
...
llvm-svn: 96845
2010-02-23 01:07:39 +00:00
Chris Lattner
a7d0e304e9
switch the value# in OPC_CompleteMatch and OPC_EmitNode to use a
...
VBR encoding for the insanity being perpetrated by the spu backend.
llvm-svn: 96843
2010-02-23 00:59:59 +00:00
Chris Lattner
60680ad316
add a new Push2 opcode for targets (like cellspu) which have
...
ridiculously ginormous patterns and need more than one byte
of displacement for encodings. This fixes CellSPU/fdiv.ll.
SPU is still doing something else ridiculous though.
llvm-svn: 96833
2010-02-22 23:55:39 +00:00
Chris Lattner
d0b16bd219
Change ComplexPattern handling to push the node being matched as
...
well as the operands produced when the pattern is matched. This
allows CheckSame to work correctly when matching replicated
names involving ComplexPatterns. This fixes a bunch of MSP430
failures, we're down to 13 failures, two of which are
due to a sched bug.
llvm-svn: 96824
2010-02-22 23:33:44 +00:00
Chris Lattner
bb2afb79c0
add a new CheckMultiOpcode opcode for checking that a node
...
has one of the list of acceptable opcodes for a complex
pattern. This fixes 4 regtest failures.
llvm-svn: 96814
2010-02-22 22:30:37 +00:00
Chris Lattner
a5a298517e
When matching patterns that have a complex pattern as their root, make
...
sure to only run the complex pattern on nodes where the target opts in.
This patch only handles targets with one opcode specified so far, but
fixes 16 failures, only 34 left.
llvm-svn: 96813
2010-02-22 22:18:05 +00:00
Chris Lattner
9fd97c3690
fix most of the failures in the x86 suite by handling multiple
...
result nodes correctly. Note that this includes a horrible hack
in DAGISelHeader which cannot be fixed reasonably without
eliminating (parallel) from input patterns. That, in turn,
can't be done until we support writing multiple result patterns
for the X86and_flag and related multiple-result nodes.
llvm-svn: 96767
2010-02-21 23:54:05 +00:00
Chris Lattner
2bad7b0456
Always emit register class id references as i32 like
...
DAGISelEmitter does. This fixes 11 arm failures (8
left).
llvm-svn: 96757
2010-02-21 20:53:45 +00:00
Chris Lattner
8f40097073
Sort the patterns before adding them to the FA so that we get the
...
least cost matches. This gets us from 195 -> 208 passes on the ppc codegen tests.
llvm-svn: 96747
2010-02-21 19:22:06 +00:00
Chris Lattner
816f638f6b
emit table indexes before each row so that it is debuggable.
...
llvm-svn: 96730
2010-02-21 07:16:41 +00:00
Chris Lattner
eb3c0435b7
fix a table size miscomputation, target opcodes are 2 bytes.
...
With this, the matcher actually works reasonably well, but
crashes on larger examples in the scheduler.
llvm-svn: 96727
2010-02-21 06:44:29 +00:00
Chris Lattner
9f6c24ccd5
emit to the right streams, to avoid emitting the push
...
body before the push.
llvm-svn: 96726
2010-02-21 06:30:04 +00:00
Chris Lattner
55875c10d9
oops don't turn this on for everyone yet.
...
llvm-svn: 96725
2010-02-21 06:03:56 +00:00
Chris Lattner
79eaeb4cfe
implement the last known missing feature: updating uses of results
...
of the matched pattern to use the newly created node results. Onto
the "making it actually work" phase!
llvm-svn: 96724
2010-02-21 06:03:07 +00:00
Chris Lattner
132df652a4
Lots of improvements to the new dagisel emitter. This gets it to
...
the point where it is to the 95% feature complete mark, it just
needs result updating to be done (then testing, optimization
etc).
More specificallly, this adds support for chain and flag handling
on the result nodes, support for sdnodexforms, support for variadic
nodes, memrefs, pinned physreg inputs, and probably lots of other
stuff.
In the old DAGISelEmitter, this deletes the dead code related to
OperatorMap, cleans up a variety of dead stuff handling "implicit
remapping" from things like globaladdr -> targetglobaladdr (which
is no longer used because globaladdr always needs to be legalized),
and some minor formatting fixes.
llvm-svn: 96716
2010-02-21 03:22:59 +00:00
Chris Lattner
b4905cbd12
add emitter support for integer constants and simple physreg references.
...
llvm-svn: 96663
2010-02-19 07:49:56 +00:00
Chris Lattner
23ac248faa
fix this to work more determinstically, patch by Thomas Veith!
...
llvm-svn: 96661
2010-02-19 07:02:20 +00:00
Chris Lattner
dc61962e67
I confused myself, temporaries will be recorded right along with other inputs.
...
llvm-svn: 96639
2010-02-19 00:33:13 +00:00
Chris Lattner
16cd8cdec1
introduce a new ResultVal and start keeping track of temporary values.
...
llvm-svn: 96636
2010-02-19 00:27:40 +00:00
Chris Lattner
42a7ba7a67
add support for referencing registers and immediates,
...
building the tree to represent them but not emitting
table entries for them yet.
llvm-svn: 96617
2010-02-18 22:03:03 +00:00
Chris Lattner
7ed81690ab
start sketching out the structure of code for result emission generation.
...
Nothing real here yet.
llvm-svn: 96575
2010-02-18 06:47:49 +00:00
Chris Lattner
186ad8098e
rename the child field to 'next'. This is not a parent/child
...
relationship, this is a linear list relationship.
llvm-svn: 96561
2010-02-18 02:53:41 +00:00
Chris Lattner
d582a367b5
eliminate the MatcherNodeWithChild class, give the 'child'
...
field to MatcherNode.
llvm-svn: 96560
2010-02-18 02:49:24 +00:00
Chris Lattner
3a74a23c64
fit in 80 cols
...
llvm-svn: 96541
2010-02-18 00:23:27 +00:00
Chris Lattner
afce454d94
redisable this to save people a small amount of build time.
...
llvm-svn: 96497
2010-02-17 19:19:50 +00:00
Chris Lattner
1fa9c2cce4
move isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,
...
and add a sparc implementation that knows about delay slots. Patch by
Nathan Keynes!
llvm-svn: 96492
2010-02-17 18:52:56 +00:00
Chris Lattner
f2d7099b3b
reduce nesting.
...
llvm-svn: 96466
2010-02-17 06:53:36 +00:00
Chris Lattner
f46dba81a8
improve comments, the matcher is now feature complete, on to codegen.
...
llvm-svn: 96464
2010-02-17 06:47:35 +00:00
Chris Lattner
e78bc753fe
sink special case "cannotyetselect" for intrinsics out of the
...
tblgen splatted code into the implementation.
llvm-svn: 96460
2010-02-17 06:28:22 +00:00
Chris Lattner
f8a5bb0f89
Emulate the current isel's "IsChainCompatible" logic for now.
...
I'd like to eventually rip it out, but for now producing the
same selections as the old matcher is more important.
llvm-svn: 96458
2010-02-17 06:23:39 +00:00
Chris Lattner
8ad29342b8
properly record chain inputs to complex patterns,
...
resolving a fixme.
llvm-svn: 96457
2010-02-17 06:08:25 +00:00
Chris Lattner
2392195d61
simplify IsChainCompatible codegen, add comments. no
...
functionality change.
llvm-svn: 96453
2010-02-17 05:35:28 +00:00
Chris Lattner
469cfb9fdf
Prep work to handle input chains of matched patterns and checking for
...
'ischaincompatible' when a pattern has more than one input chain. Need
to do some commenting and cleanup now that I understand how this works.
llvm-svn: 96443
2010-02-17 02:16:19 +00:00
Chris Lattner
022e511f4a
record input chains.
...
llvm-svn: 96437
2010-02-17 01:34:15 +00:00
Chris Lattner
ac27c2e3f3
prefix captured value names with $ so they look like
...
variables. Use the fancy OpNo variable instead of i,
which has the right index including chains.
llvm-svn: 96436
2010-02-17 01:27:29 +00:00
Chris Lattner
f773f03736
improve comments on OPC_Record to say what we're recording a node.
...
llvm-svn: 96433
2010-02-17 01:03:09 +00:00