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

59027 Commits

Author SHA1 Message Date
Chris Lattner
c0d5bcc160 From Kalle Raiskila:
"the bigstack patch for SPU, with testcase. It is essentially the patch committed as 97091, and reverted as 97099, but with the following additions:
-in vararg handling, registers are marked to be live, to not confuse the register scavenger
-function prologue and epilogue are not emitted, if the stack size is 16. 16 means it is empty - there is only the register scavenger emergency spill slot, which is not used as there is no stack."

llvm-svn: 99819
2010-03-29 17:38:47 +00:00
Chris Lattner
f21a1afe81 add support for zero initialized unions, patch by Tim Northover!
llvm-svn: 99818
2010-03-29 17:36:02 +00:00
Devang Patel
cfd24dc84c Refactor code to push DILocation prcessing into DwarfDebug.cpp from AsmPrinter.cpp.
This is same as r99772 (which was reverted) with just one meaningful difference where two source lines exchanged their positions.

llvm-svn: 99816
2010-03-29 17:20:31 +00:00
Chris Lattner
6a8b488d78 add a note.
llvm-svn: 99815
2010-03-29 17:02:02 +00:00
Chris Lattner
01d6e19c75 Switch pattern sorting predicate from stable sort -> sort, it
doesn't need to be stable because the patterns are fully ordered.

Add a first level sort predicate that orders patterns in this
order:  1) scalar integer operations 2) scalar floating point 
3) vector int 4) vector float.  This is a trivial sort on their
top level pattern type so it is nice and transitive.  The
benefit of doing this is that simple integer operations are
much more common than insane vector things and isel was trying
to match the big complex vector patterns before the simple
ones because the complexity of the vector operations was much
higher.  Since they can't both match, it is best (for compile
time) to try the simple integer ones first.

This cuts down the # failed match attempts on real code by
quite a bit, for example, this reduces backtracks on crafty
(as a random example) from 228285 -> 188369.

llvm-svn: 99797
2010-03-29 02:02:45 +00:00
Chris Lattner
6129cf2814 revert 99795, as mentioned, it is disabled anyway.
llvm-svn: 99796
2010-03-29 01:58:15 +00:00
Chris Lattner
8535a74712 Check in a (disabled) failed attempt to improve the ordering of
patterns within the generated matcher.  This works great except
that the sort fails because the relation defined isn't 
transitive.  I have a much simpler solution coming next, but want
to archive the code.

llvm-svn: 99795
2010-03-29 01:56:19 +00:00
Chris Lattner
3bb37074fd print the complexity of the pattern being matched in the
comment in the generated table.

llvm-svn: 99794
2010-03-29 01:40:38 +00:00
Johnny Chen
03c2e8a36c Add NVTBLFrm to represent A8.6.406 VTBL, VTBX Vector Table Lookup Instructions.
These instructions use byte index in a control vector (M:Vm) to lookup byte
values in a table and generate a new vector (D:Vd).  The table is specified via
a list of vectors, which can be:

{Dn}
{Dn D<n+1>}
{Dn D<n+1> D<n+2>}
{Dn D<n+1> D<n+2> D<n+3>}

llvm-svn: 99789
2010-03-29 01:14:22 +00:00
Devang Patel
66e9b05428 Revert 99772.
llvm-svn: 99778
2010-03-28 21:23:37 +00:00
Chris Lattner
24b8a8bebd add a statistic for the # times isel has to backtrack.
llvm-svn: 99774
2010-03-28 19:46:56 +00:00
Devang Patel
bb5063a8cd Refactoring. Push DILocation processing in to DwarfDebug from AsmPrinter.
llvm-svn: 99772
2010-03-28 18:57:09 +00:00
Chris Lattner
87f1ea5d27 zap an extra line that Eli noticed!
llvm-svn: 99770
2010-03-28 18:52:28 +00:00
Anton Korobeynikov
3df01d9637 Properly quote the quotes :) during cmdline construction on Windows.
Otherwise, e.g. in the invocation like clang -DFOO=\"bar\" FOO macro
got the bar value, not "bar".

Patch by Alexander Esilevich!

llvm-svn: 99763
2010-03-28 15:07:02 +00:00
Torok Edwin
801742470e Fix use-of-uninitialized value when RWX memory can't be allocated (PR6701).
SELinux doesn't allow 'execmem', returning MAP_FAILED and 'Permission denied'
for mmap or RWX memory. In this case AllocateRWX was returning a MemoryBlock
with uninitialized fields, which sometimes caused crashes.

This patch initializes MemoryBlock fields to 0, so that the RWX-failure check
works.
It doesn't fix the SELinux 'execmem' issues though (the JIT will not work when
SELinux is in enforcing mode).

llvm-svn: 99762
2010-03-28 11:07:36 +00:00
Chris Lattner
117eb269f9 improve type checking of SDNode operand count. This rejects all cases
where an incorrect number of operands is provided to an sdnode instead
of just a few cases.

llvm-svn: 99761
2010-03-28 08:48:47 +00:00
Chris Lattner
4de7f7e862 fix a type contradition: XCoreISD::RETSP has one argument, not zero.
llvm-svn: 99760
2010-03-28 08:47:39 +00:00
Chris Lattner
5ad69fe4b6 finally remove the immAllOnesV_bc/immAllZerosV_bc patterns
and those derived from them.  These are obnoxious because
they were written as: PatLeaf<(bitconvert).  Not having an
argument was foiling adding better type checking for operand
count matching up with what was required (in this case,
bitconvert always requires an operand!)

llvm-svn: 99759
2010-03-28 08:43:23 +00:00
Chris Lattner
e522e8f94e remove a pattern with no testcase that doesn't appear to be
matchable: it seems like it would always constant fold.

llvm-svn: 99758
2010-03-28 08:40:48 +00:00
Chris Lattner
7f2800ea6c fix integer negates to use the proper type for the zero vectors,
this also depends on the new "bitconvert dropping" behavior just
added to tblgen.

llvm-svn: 99757
2010-03-28 08:39:10 +00:00
Chris Lattner
e04fb0a1a7 teach tblgen to allow patterns like (add (i32 (bitconvert (i32 GPR))), 4),
transforming it into (add (i32 GPR), 4).  This allows us to write type
generic multi patterns and have tblgen automatically drop the bitconvert
in the case when the types align.  This allows us to fold an extra load
in the changed testcase.

llvm-svn: 99756
2010-03-28 08:38:32 +00:00
Chris Lattner
0530bbf7ea fix a typo, bitconvert from node to itself isn't valid.
llvm-svn: 99755
2010-03-28 08:36:45 +00:00
Chris Lattner
36a0df5c96 fix vnot matching to explicitly specify the type of the
input to be v8i8 or v16i8, which buildvectors get canonicalized to.

This allows the patterns that were previously using a bare 'vnot' to
match, before they couldn't.

llvm-svn: 99754
2010-03-28 08:08:07 +00:00
Chris Lattner
167d09c397 fix up vnot matching, eliminating a dead pattern, correcting a couple of
patterns that would never match because of bitcast, and eliminating use
of vnot_conv.

llvm-svn: 99753
2010-03-28 08:00:23 +00:00
Chris Lattner
1a838000ec add some nounwinds
llvm-svn: 99752
2010-03-28 07:58:37 +00:00
Chris Lattner
de8b42ce67 this takes an insane amount of time to run, disable it for now (PR6727)
llvm-svn: 99751
2010-03-28 07:58:09 +00:00
Chris Lattner
ac16bb9827 stop using vnot_conv
llvm-svn: 99750
2010-03-28 07:48:17 +00:00
Chris Lattner
22c84d79fa revert r99743, this is saying that the repmovs instructinos have an
*input* of other type, which is the VT. 

llvm-svn: 99749
2010-03-28 07:38:39 +00:00
Chris Lattner
59eebcbbde remove a bunch of dead patterns.
llvm-svn: 99748
2010-03-28 07:38:00 +00:00
Chris Lattner
af75e6a61f validate that input sdnodes don't exist in an output pattern.
llvm-svn: 99747
2010-03-28 06:57:56 +00:00
Chris Lattner
5bb82e570e eliminate a bunch of code duplication in ParseTreePattern
by rotating it.

llvm-svn: 99746
2010-03-28 06:50:34 +00:00
Chris Lattner
34f0260096 add some node definitions.
llvm-svn: 99745
2010-03-28 06:16:41 +00:00
Chris Lattner
7c35e259aa SDTCisVT<0, isVoid> is not valid, reject it.
llvm-svn: 99744
2010-03-28 06:04:39 +00:00
Chris Lattner
941ab0b2d5 claiming to return other is pointless.
llvm-svn: 99743
2010-03-28 05:57:36 +00:00
Chris Lattner
78dc3c322f comply with the wishes of a fixme.
llvm-svn: 99742
2010-03-28 05:55:17 +00:00
Chris Lattner
918dd19018 now that (parallel) is gone and a variety of bugs in targets
are cleaned up, we can remove an old fixme.

llvm-svn: 99741
2010-03-28 05:54:03 +00:00
Chris Lattner
3f060e3216 add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
1, 1 cases which are by-far the most frequent.  This shrinks the X86
isel table from 77014 -> 74657 bytes.

llvm-svn: 99740
2010-03-28 05:50:16 +00:00
Chris Lattner
bacf4edba3 don't add nodes to the now-dead nodes list multiple times, this
can cause a crash on crazy situations in msp430 when morph-node-to
is disabled.

llvm-svn: 99739
2010-03-28 05:28:31 +00:00
Chris Lattner
4a35b78926 Improve systemz to model cmp and ucmp nodes as returning
their flags correctly.

llvm-svn: 99738
2010-03-28 05:21:52 +00:00
Chris Lattner
99fafcf87e the FPCmp node returns an i32.
llvm-svn: 99737
2010-03-28 05:12:57 +00:00
Chris Lattner
c5499723d5 fix some modelling problems exposed by a patch I'm working on. bsr/bsf/ptest
nodes all have an EFLAGS result when made by isel lowering.

llvm-svn: 99736
2010-03-28 05:07:17 +00:00
Chris Lattner
bb65543f01 don't add flag nodes with chain results to the NowDeadNodes
list multiple times when MorphNodeTo can't be applied.

llvm-svn: 99735
2010-03-28 04:54:33 +00:00
Jeffrey Yasskin
727548a580 Oops, r98447 dropped the reference to ForwardType in the wrong place in
Type::destroy(), so it got skipped for FunctionTypes, StructTypes, and
UnionTypes.  This fixes the resulting leaks in test/Feature/opaquetypes.ll and
test/Integer/opaquetypes_bt.ll.

llvm-svn: 99732
2010-03-28 01:03:47 +00:00
Chris Lattner
70189ff5ab fix a long standing fixme, which required fixing a bunch of other
issues to get here.  We now trim the result type list of the
CompleteMatch or MorphNodeTo operation to be the same size as the
thing we're matching.  this means that if you match (add GPR, GPR)
with an instruction that produces a normal result and a flag that
we now trim the result in tblgen instead of having to do it 
dynamically.  This exposed a bunch of inconsistencies in result
counting that happened to be getting lucky since the days of the
old isel.

llvm-svn: 99728
2010-03-27 20:45:15 +00:00
Chris Lattner
d6afc9e48d fix CodeGenTarget::getRegisterVTs to not return the
same vt multiple times for a register.  For example,
ECX is in 5 different i32 reg classes, just return 
1 i32 instead of 5.

llvm-svn: 99727
2010-03-27 20:32:26 +00:00
Chris Lattner
2ec88c02da hoist some funky logic into CodeGenInstruction
from two places in CodeGenDAGPatterns.cpp, and
use it in DAGISelMatcherGen.cpp instead of using
an incorrect predicate that happened to get lucky
on our current targets.

llvm-svn: 99726
2010-03-27 20:09:24 +00:00
Chris Lattner
ad983d7a8a continue pushing tblgen's support for nodes with multiple
results forward.  We can now handle an instruction that 
produces one implicit def and one result instead of one or
the other when not at the root of the pattern.

llvm-svn: 99725
2010-03-27 19:15:02 +00:00
Chris Lattner
85756c913d improve -debug-only=isel comments for cases when we don't enter a
scope due to obviously false predicate.

llvm-svn: 99723
2010-03-27 18:54:50 +00:00
Chris Lattner
30f1286d4c fix a bug in my recent patch that increased opcode size to 2 bytes:
the index comments nested under OPC_SwitchOpcode were off by one.
This fixes the comments.

llvm-svn: 99722
2010-03-27 18:49:33 +00:00
Chris Lattner
64d472ae54 revert r99719 which is breaking the botz.
llvm-svn: 99721
2010-03-27 18:01:10 +00:00