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

60196 Commits

Author SHA1 Message Date
Anton Korobeynikov
9b724bd446 Implement indirect branches on MSP430
llvm-svn: 102835
2010-05-01 12:04:32 +00:00
Anton Korobeynikov
7a84875b09 Long branch target oparands are not pc-rel.
This should fix PR6603.

llvm-svn: 102834
2010-05-01 12:04:22 +00:00
Owen Anderson
443d813b45 Disable the call-deletion transformation introduced in r86975. Without
halting analysis, it is illegal to delete a call to a read-only function.
The correct solution is almost certainly to add a "must halt" attribute and
only allow deletions in its presence.

XFAIL the relevant testcase for now.

llvm-svn: 102831
2010-05-01 08:34:28 +00:00
Chris Lattner
61a8beaae0 fix PR5009 by making CGSCCPM realize that a call was devirtualized
if an indirect call site was removed and a direct one was added, not
just if an indirect call site was modified to be direct.

llvm-svn: 102830
2010-05-01 06:38:43 +00:00
Chris Lattner
660cc3ac57 rename test
llvm-svn: 102829
2010-05-01 06:34:13 +00:00
Dan Gohman
ada97c52fe Remove the code for special-casing byval for fast-isel. SelectionDAG
handles argument lowering anyway, so there's no need for special
casing here.

llvm-svn: 102828
2010-05-01 02:44:23 +00:00
Dan Gohman
11b3613649 Fix an ancient FIXME.
llvm-svn: 102827
2010-05-01 02:43:10 +00:00
Dan Gohman
fb5d6a5d70 Re-disable kill flags, as there is more trouble.
llvm-svn: 102826
2010-05-01 01:57:56 +00:00
Chris Lattner
66d1a6ad69 rename InlineInfo.DevirtualizedCalls -> InlinedCalls to
reflect that it includes all inlined calls now, not just
devirtualized ones.

llvm-svn: 102824
2010-05-01 01:26:13 +00:00
Chris Lattner
9ee72a47c2 Implement rdar://6295824 and PR6724 with two tiny changes
that can have a big effect :).  The first is to enable the
iterative SCC passmanager juice that kicks in when the
scc passmgr detects that a function pass has devirtualized
a call.  In this case, it will rerun all the passes it 
manages on the SCC, up to the iteration count limit (4). This
is useful because a function pass may devirualize a call, and
we want the inliner to inline it, or pruneeh to infer stuff
about it, etc.

The second patch is to add *all* call sites to the 
DevirtualizedCalls list the inliner uses.  This list is
about to get renamed, but the jist of this is that the 
inliner now reconsiders *all* inlined call sites as candidates
for further inlining.  The intuition is this that in cases 
like this:

f() { g(1); }     g(int x) { h(x); }

We analyze this bottom up, and may decide that it isn't 
profitable to inline H into G.  Next step, we decide that it is
profitable to inline G into F, and do so, which means that F 
now calls H.  Even though the call from G -> H may not have been
profitable to inline, the call from F -> H may be (in this case
because a constant allows folding etc).

In my spot checks, this doesn't have a big impact on code.  For
example, the LLC output for 252.eon grew from 0.02% (from
317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612
to 1520964 bytes).  252.eon never iterated in the SCC Passmgr,
176.gcc iterated at most 1 time.

llvm-svn: 102823
2010-05-01 01:15:56 +00:00
Chris Lattner
b893cedad2 The inliner has traditionally not considered call sites
that appear due to inlining a callee as candidates for
futher inlining, but a recent patch made it do this if
those call sites were indirect and became direct.

Unfortunately, in bizarre cases (see testcase) doing this
can cause us to infinitely inline mutually recursive
functions into callers not in the cycle.  Fix this by
keeping track of the inline history from which callsite
inline candidates got inlined from.

This shouldn't affect any "real world" code, but is required
for a follow on patch that is coming up next.

llvm-svn: 102822
2010-05-01 01:05:10 +00:00
Dan Gohman
5fc96b81ec Re-enable kill flags from SelectionDAGISel, with a fix: don't
try to put a kill flag on a DBG_INFO instruction.

llvm-svn: 102820
2010-05-01 00:50:53 +00:00
Dale Johannesen
c0bf114984 Fix a bug where debug info affected stack slot coloring.
Seen in SingleSrc/Benchmarks/Misc/flops with TEST=optllcdbg.
7929951.

llvm-svn: 102819
2010-05-01 00:41:15 +00:00
Dan Gohman
1a6c7dfb3e Fix whitespace.
llvm-svn: 102817
2010-05-01 00:33:28 +00:00
Dan Gohman
37fe41a8c0 Don't pass SDValues by non-const reference unless they may be
modified.

llvm-svn: 102816
2010-05-01 00:33:16 +00:00
Evan Cheng
8bd004b033 Add a pseudo instruction REG_SEQUENCE that takes a list of registers and
sub-register indices and outputs a single super register which is formed from
a consecutive sequence of registers.

This is used as register allocation / coalescing aid and it is useful to
represent instructions that output register pairs / quads. For example,
v1024, v1025 = vload <address>
where v1024 and v1025 forms a register pair.

This really should be modelled as
v1024<3>, v1025<4> = vload <address>
but it would violate SSA property before register allocation is done.

Currently we use insert_subreg to form the super register:
v1026 = implicit_def
v1027 - insert_subreg v1026, v1024, 3
v1028 = insert_subreg v1027, v1025, 4
...
      = use v1024
      = use v1028

But this adds pseudo live interval overlap between v1024 and v1025.

We can now modeled it as
v1024, v1025 = vload <address>
v1026 = REG_SEQUENCE v1024, 3, v1025, 4
...
      = use v1024
      = use v1026

After coalescing, it will be
v1026<3>, v1025<4> = vload <address>
...
      = use v1026<3>
      = use v1026

llvm-svn: 102815
2010-05-01 00:28:44 +00:00
Dan Gohman
0561bd78d0 Reorgnaize more switch code lowering to clean up some tricky
code, and to eliminate the need for the SelectionDAGBuilder
state to be live during CodeGenAndEmitDAG calls.

Call SDB->clear() before CodeGenAndEmitDAG calls instead of
before it, and move the CurDAG->clear() out of SelectionDAGBuilder,
which doesn't own the DAG, and into CodeGenAndEmitDAG.

llvm-svn: 102814
2010-05-01 00:25:44 +00:00
Bill Wendling
7b6527b94b Test failing too much on too many platforms.
llvm-svn: 102812
2010-05-01 00:12:33 +00:00
Dan Gohman
d59de31ce2 Delete the EdgeMapping variable itself.
llvm-svn: 102810
2010-05-01 00:02:20 +00:00
Dan Gohman
68f04d06c8 Get rid of the EdgeMapping map. Instead, just check for BasicBlock
changes before doing phi lowering for switches.

llvm-svn: 102809
2010-05-01 00:01:06 +00:00
Daniel Dunbar
deb67461c0 Update for CIndex rename.
llvm-svn: 102803
2010-04-30 23:36:47 +00:00
Bill Wendling
a348ff69b8 Maybe it needs sse2?
llvm-svn: 102802
2010-04-30 23:19:29 +00:00
Bill Wendling
d1c5f11f72 Force 64-bit.
llvm-svn: 102800
2010-04-30 22:45:20 +00:00
Dan Gohman
9281e7be3e Fix a typo.
llvm-svn: 102799
2010-04-30 22:38:11 +00:00
Chris Lattner
3eb6a9f076 Dan recently disabled recursive inlining within a function, but we
were still inlining self-recursive functions into other functions.

Inlining a recursive function into itself has the potential to
reduce recursion depth by a factor of 2, inlining a recursive
function into something else reduces recursion depth by exactly 
1.  Since inlining a recursive function into something else is a
weird form of loop peeling, turn this off.

The deleted testcase was added by Dale in r62107, since then
we're leaning towards not inlining recursive stuff ever.  In any
case, if we like inlining recursive stuff, it should be done 
within the recursive function itself to get the algorithm 
recursion depth win.

llvm-svn: 102798
2010-04-30 22:37:22 +00:00
Bill Wendling
95a4929ac7 EXTRACT_VECTOR_ELT of an INSERT_VECTOR_ELT may have the same index, but the
indexes could be of a different value type. Or not even using the same SDNode
for the constant (weird, I know). Compare the actual values instead of the
pointers.

llvm-svn: 102791
2010-04-30 22:19:17 +00:00
Daniel Dunbar
8427c19fe2 Don't use 'else ifdef', I guess this is a 3.81 feature?
llvm-svn: 102781
2010-04-30 22:00:17 +00:00
Dan Gohman
e980525516 Remove this debug output. The MachineFunction will be printed once all of
instruction selection is done; it's confusing to see parts of it printed,
while other parts are omitted, along the way.

llvm-svn: 102771
2010-04-30 21:21:21 +00:00
Jakob Stoklund Olesen
fac584ed9e The local register allocator has to spill dirty callee saved registers before a
call that might throw. The landing pad assumes that all registers are in stack
slots.

We used to spill those dirty CSRs after the call, and the stack slots would be
wrong when arriving at the landing pad.

llvm-svn: 102770
2010-04-30 21:19:29 +00:00
Dan Gohman
73722062f7 Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
and fix a bug in BitVector's reference proxy class which this exposed.

llvm-svn: 102768
2010-04-30 20:50:28 +00:00
Daniel Dunbar
22881d531a Fix TOOLALIAS to not make dependency against $(PROJ_bindir), this is unnecessary
(and wrong).

llvm-svn: 102763
2010-04-30 20:47:09 +00:00
Devang Patel
8146cb492f Preserve debug info attached with call instruction while eliminating dead argument.
Radar 7927803

llvm-svn: 102760
2010-04-30 20:23:54 +00:00
Dan Gohman
a78e35e7d9 Make this code less confusing. Instead of reassigning BB, just operate
on the original variables, so it's easier to see what is being done
to which blocks.

llvm-svn: 102759
2010-04-30 20:14:26 +00:00
Daniel Dunbar
7ed4688b9e Add new NO_INSTALL_ARCHIVES make variable, to suppress install of .a files.
llvm-svn: 102752
2010-04-30 20:04:53 +00:00
Daniel Dunbar
81745b2e67 Add an install-clang-c top-level target, which does a Clang C API install.
llvm-svn: 102751
2010-04-30 20:04:45 +00:00
Devang Patel
9832115581 New test.
llvm-svn: 102746
2010-04-30 19:39:29 +00:00
Devang Patel
52c2d4d378 Attach AT_APPLE_optimized attribute to optimized function's debug info.
llvm-svn: 102743
2010-04-30 19:38:23 +00:00
Dan Gohman
066b8d3640 EmitDbgValue doesn't need its EdgeMapping argument.
llvm-svn: 102742
2010-04-30 19:35:33 +00:00
David Chisnall
8bcbd32d28 Fixed @ctor / @dtor the wrong way around in last commit.
llvm-svn: 102741
2010-04-30 19:27:35 +00:00
David Chisnall
976f45eac9 Added a brief explanation of @llvm.global_{c,d}tors.
llvm-svn: 102740
2010-04-30 19:23:49 +00:00
Dan Gohman
116829ede7 Set isSigned to true when creating an all-ones integer constant, even
for unsigned purposes, so >64-bit integer values get a full all-ones
value.

llvm-svn: 102739
2010-04-30 19:22:39 +00:00
Dan Gohman
3c454a3df0 Silence compiler warnings.
llvm-svn: 102734
2010-04-30 19:21:13 +00:00
Dan Gohman
6944fae2f6 Add lint checks for invalid uses of memory.
llvm-svn: 102733
2010-04-30 19:05:00 +00:00
Dan Gohman
cfd0d9393a Add some comments.
llvm-svn: 102731
2010-04-30 18:33:41 +00:00
Dan Gohman
c283eda8ab Remove the -disable-16bit command-line option, which is now obsolete.
llvm-svn: 102730
2010-04-30 18:30:26 +00:00
Jakob Stoklund Olesen
1fb8dbce5a Don't use floating point in SimpleRegisterCoalescing.
Rounding differences causes tests to fail on Linux.

llvm-svn: 102729
2010-04-30 18:28:11 +00:00
Dan Gohman
a5ef1ab165 Properly escape edge source and destination labels.
llvm-svn: 102728
2010-04-30 18:27:57 +00:00
Dan Gohman
f6e1477a55 Add -o /dev/null to some tests which don't care about their output.
llvm-svn: 102722
2010-04-30 17:42:30 +00:00
Dan Gohman
e9ff394082 Apply a patch from Jan Sjodin to fix a compiler abort on vector
comparisons sign-extended to a different bitwidth than the
comparison operands.

llvm-svn: 102721
2010-04-30 17:19:19 +00:00
Daniel Dunbar
309dd836c0 Regenerate.
llvm-svn: 102720
2010-04-30 17:12:26 +00:00