oota-llvm.git
13 years agoDisable the call-deletion transformation introduced in r86975. Without
Owen Anderson [Sat, 1 May 2010 08:34:28 +0000 (08:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102831 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agofix PR5009 by making CGSCCPM realize that a call was devirtualized
Chris Lattner [Sat, 1 May 2010 06:38:43 +0000 (06:38 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102830 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agorename test
Chris Lattner [Sat, 1 May 2010 06:34:13 +0000 (06:34 +0000)]
rename test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102829 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove the code for special-casing byval for fast-isel. SelectionDAG
Dan Gohman [Sat, 1 May 2010 02:44:23 +0000 (02:44 +0000)]
Remove the code for special-casing byval for fast-isel. SelectionDAG
handles argument lowering anyway, so there's no need for special
casing here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102828 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix an ancient FIXME.
Dan Gohman [Sat, 1 May 2010 02:43:10 +0000 (02:43 +0000)]
Fix an ancient FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102827 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRe-disable kill flags, as there is more trouble.
Dan Gohman [Sat, 1 May 2010 01:57:56 +0000 (01:57 +0000)]
Re-disable kill flags, as there is more trouble.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102826 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename InlineInfo.DevirtualizedCalls -> InlinedCalls to
Chris Lattner [Sat, 1 May 2010 01:26:13 +0000 (01:26 +0000)]
rename InlineInfo.DevirtualizedCalls -> InlinedCalls to
reflect that it includes all inlined calls now, not just
devirtualized ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102824 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement rdar://6295824 and PR6724 with two tiny changes
Chris Lattner [Sat, 1 May 2010 01:15:56 +0000 (01:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102823 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe inliner has traditionally not considered call sites
Chris Lattner [Sat, 1 May 2010 01:05:10 +0000 (01:05 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102822 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-enable kill flags from SelectionDAGISel, with a fix: don't
Dan Gohman [Sat, 1 May 2010 00:50:53 +0000 (00:50 +0000)]
Re-enable kill flags from SelectionDAGISel, with a fix: don't
try to put a kill flag on a DBG_INFO instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102820 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a bug where debug info affected stack slot coloring.
Dale Johannesen [Sat, 1 May 2010 00:41:15 +0000 (00:41 +0000)]
Fix a bug where debug info affected stack slot coloring.
Seen in SingleSrc/Benchmarks/Misc/flops with TEST=optllcdbg.
7929951.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102819 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix whitespace.
Dan Gohman [Sat, 1 May 2010 00:33:28 +0000 (00:33 +0000)]
Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102817 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't pass SDValues by non-const reference unless they may be
Dan Gohman [Sat, 1 May 2010 00:33:16 +0000 (00:33 +0000)]
Don't pass SDValues by non-const reference unless they may be
modified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102816 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a pseudo instruction REG_SEQUENCE that takes a list of registers and
Evan Cheng [Sat, 1 May 2010 00:28:44 +0000 (00:28 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102815 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReorgnaize more switch code lowering to clean up some tricky
Dan Gohman [Sat, 1 May 2010 00:25:44 +0000 (00:25 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102814 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest failing too much on too many platforms.
Bill Wendling [Sat, 1 May 2010 00:12:33 +0000 (00:12 +0000)]
Test failing too much on too many platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102812 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete the EdgeMapping variable itself.
Dan Gohman [Sat, 1 May 2010 00:02:20 +0000 (00:02 +0000)]
Delete the EdgeMapping variable itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102810 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGet rid of the EdgeMapping map. Instead, just check for BasicBlock
Dan Gohman [Sat, 1 May 2010 00:01:06 +0000 (00:01 +0000)]
Get rid of the EdgeMapping map. Instead, just check for BasicBlock
changes before doing phi lowering for switches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102809 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate for CIndex rename.
Daniel Dunbar [Fri, 30 Apr 2010 23:36:47 +0000 (23:36 +0000)]
Update for CIndex rename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102803 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMaybe it needs sse2?
Bill Wendling [Fri, 30 Apr 2010 23:19:29 +0000 (23:19 +0000)]
Maybe it needs sse2?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102802 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoForce 64-bit.
Bill Wendling [Fri, 30 Apr 2010 22:45:20 +0000 (22:45 +0000)]
Force 64-bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102800 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a typo.
Dan Gohman [Fri, 30 Apr 2010 22:38:11 +0000 (22:38 +0000)]
Fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102799 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDan recently disabled recursive inlining within a function, but we
Chris Lattner [Fri, 30 Apr 2010 22:37:22 +0000 (22:37 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102798 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEXTRACT_VECTOR_ELT of an INSERT_VECTOR_ELT may have the same index, but the
Bill Wendling [Fri, 30 Apr 2010 22:19:17 +0000 (22:19 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102791 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't use 'else ifdef', I guess this is a 3.81 feature?
Daniel Dunbar [Fri, 30 Apr 2010 22:00:17 +0000 (22:00 +0000)]
Don't use 'else ifdef', I guess this is a 3.81 feature?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102781 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove this debug output. The MachineFunction will be printed once all of
Dan Gohman [Fri, 30 Apr 2010 21:21:21 +0000 (21:21 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102771 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe local register allocator has to spill dirty callee saved registers before a
Jakob Stoklund Olesen [Fri, 30 Apr 2010 21:19:29 +0000 (21:19 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102770 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
Dan Gohman [Fri, 30 Apr 2010 20:50:28 +0000 (20:50 +0000)]
Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
and fix a bug in BitVector's reference proxy class which this exposed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102768 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix TOOLALIAS to not make dependency against $(PROJ_bindir), this is unnecessary
Daniel Dunbar [Fri, 30 Apr 2010 20:47:09 +0000 (20:47 +0000)]
Fix TOOLALIAS to not make dependency against $(PROJ_bindir), this is unnecessary
(and wrong).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102763 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPreserve debug info attached with call instruction while eliminating dead argument.
Devang Patel [Fri, 30 Apr 2010 20:23:54 +0000 (20:23 +0000)]
Preserve debug info attached with call instruction while eliminating dead argument.
Radar 7927803

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102760 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake this code less confusing. Instead of reassigning BB, just operate
Dan Gohman [Fri, 30 Apr 2010 20:14:26 +0000 (20:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102759 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd new NO_INSTALL_ARCHIVES make variable, to suppress install of .a files.
Daniel Dunbar [Fri, 30 Apr 2010 20:04:53 +0000 (20:04 +0000)]
Add new NO_INSTALL_ARCHIVES make variable, to suppress install of .a files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102752 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an install-clang-c top-level target, which does a Clang C API install.
Daniel Dunbar [Fri, 30 Apr 2010 20:04:45 +0000 (20:04 +0000)]
Add an install-clang-c top-level target, which does a Clang C API install.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102751 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNew test.
Devang Patel [Fri, 30 Apr 2010 19:39:29 +0000 (19:39 +0000)]
New test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102746 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAttach AT_APPLE_optimized attribute to optimized function's debug info.
Devang Patel [Fri, 30 Apr 2010 19:38:23 +0000 (19:38 +0000)]
Attach AT_APPLE_optimized attribute to optimized function's debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102743 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEmitDbgValue doesn't need its EdgeMapping argument.
Dan Gohman [Fri, 30 Apr 2010 19:35:33 +0000 (19:35 +0000)]
EmitDbgValue doesn't need its EdgeMapping argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102742 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed @ctor / @dtor the wrong way around in last commit.
David Chisnall [Fri, 30 Apr 2010 19:27:35 +0000 (19:27 +0000)]
Fixed @ctor / @dtor the wrong way around in last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102741 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded a brief explanation of @llvm.global_{c,d}tors.
David Chisnall [Fri, 30 Apr 2010 19:23:49 +0000 (19:23 +0000)]
Added a brief explanation of @llvm.global_{c,d}tors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102740 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSet isSigned to true when creating an all-ones integer constant, even
Dan Gohman [Fri, 30 Apr 2010 19:22:39 +0000 (19:22 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102739 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSilence compiler warnings.
Dan Gohman [Fri, 30 Apr 2010 19:21:13 +0000 (19:21 +0000)]
Silence compiler warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102734 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd lint checks for invalid uses of memory.
Dan Gohman [Fri, 30 Apr 2010 19:05:00 +0000 (19:05 +0000)]
Add lint checks for invalid uses of memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102733 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd some comments.
Dan Gohman [Fri, 30 Apr 2010 18:33:41 +0000 (18:33 +0000)]
Add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102731 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove the -disable-16bit command-line option, which is now obsolete.
Dan Gohman [Fri, 30 Apr 2010 18:30:26 +0000 (18:30 +0000)]
Remove the -disable-16bit command-line option, which is now obsolete.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102730 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't use floating point in SimpleRegisterCoalescing.
Jakob Stoklund Olesen [Fri, 30 Apr 2010 18:28:11 +0000 (18:28 +0000)]
Don't use floating point in SimpleRegisterCoalescing.

Rounding differences causes tests to fail on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102729 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProperly escape edge source and destination labels.
Dan Gohman [Fri, 30 Apr 2010 18:27:57 +0000 (18:27 +0000)]
Properly escape edge source and destination labels.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102728 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd -o /dev/null to some tests which don't care about their output.
Dan Gohman [Fri, 30 Apr 2010 17:42:30 +0000 (17:42 +0000)]
Add -o /dev/null to some tests which don't care about their output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102722 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoApply a patch from Jan Sjodin to fix a compiler abort on vector
Dan Gohman [Fri, 30 Apr 2010 17:19:19 +0000 (17:19 +0000)]
Apply a patch from Jan Sjodin to fix a compiler abort on vector
comparisons sign-extended to a different bitwidth than the
comparison operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102721 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegenerate.
Daniel Dunbar [Fri, 30 Apr 2010 17:12:26 +0000 (17:12 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102720 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDefault OPTIMIZE_OPTION to -O2 on FreeBSD, at the request of the Clang/FreeBSD
Daniel Dunbar [Fri, 30 Apr 2010 17:12:23 +0000 (17:12 +0000)]
Default OPTIMIZE_OPTION to -O2 on FreeBSD, at the request of the Clang/FreeBSD
folks. LLVM/Clang is miscompiled by the standard GCC at -O3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102719 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSmallBitVector: Rework find_first/find_next and tweak test to test them (at least...
Benjamin Kramer [Fri, 30 Apr 2010 13:40:27 +0000 (13:40 +0000)]
SmallBitVector: Rework find_first/find_next and tweak test to test them (at least on 64 bit platforms).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102712 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement a read/write operator[] for SmallBitVector with a proxy class.
Benjamin Kramer [Fri, 30 Apr 2010 12:29:39 +0000 (12:29 +0000)]
Implement a read/write operator[] for SmallBitVector with a proxy class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102709 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake sure SmallBitVector actually uses the small case and fix latent bugs.
Benjamin Kramer [Fri, 30 Apr 2010 11:34:01 +0000 (11:34 +0000)]
Make sure SmallBitVector actually uses the small case and fix latent bugs.

- We can't use PointerIntPair here since we require the discrimination bit to be in the LSB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102707 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix test.
Evan Cheng [Fri, 30 Apr 2010 06:00:56 +0000 (06:00 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102694 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAnother sibcall bug. If caller and callee calling conventions differ, then it's only...
Evan Cheng [Fri, 30 Apr 2010 01:12:32 +0000 (01:12 +0000)]
Another sibcall bug. If caller and callee calling conventions differ, then it's only safe to do a tail call if the results are returned in the same way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102683 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTemporarily disable SelectionDAG kill flags, which are causing trouble.
Dan Gohman [Fri, 30 Apr 2010 00:32:51 +0000 (00:32 +0000)]
Temporarily disable SelectionDAG kill flags, which are causing trouble.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102680 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the OProfileJITEventListener build after r101844 removed
Jeffrey Yasskin [Fri, 30 Apr 2010 00:16:10 +0000 (00:16 +0000)]
Fix the OProfileJITEventListener build after r101844 removed
MachineFunction::DefaultDebugLoc.  We now use the same technique as
DwarfDebug::beginFunction to find the starting line number for a
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102679 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSet register kill flags on the SelectionDAG path, at least in the
Dan Gohman [Fri, 30 Apr 2010 00:08:21 +0000 (00:08 +0000)]
Set register kill flags on the SelectionDAG path, at least in the
easy cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102678 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReject really weird coalescer case when trying to merge identical subregisters
Jakob Stoklund Olesen [Thu, 29 Apr 2010 23:47:46 +0000 (23:47 +0000)]
Reject really weird coalescer case when trying to merge identical subregisters
of different register classes. e.g.

  %reg1048:3<def> = EXTRACT_SUBREG %RAX<kill>, 3

Where %reg1048 is a GR32 register. This is not impossible to handle, but it is
pretty hard and very rare.

This should unbreak the dragonegg builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102672 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe llc -f flag was removed.
Nick Lewycky [Thu, 29 Apr 2010 23:37:44 +0000 (23:37 +0000)]
The llc -f flag was removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102670 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't leave Base.FrameIndex uninitialized, so that it doesn't
Dan Gohman [Thu, 29 Apr 2010 23:30:41 +0000 (23:30 +0000)]
Don't leave Base.FrameIndex uninitialized, so that it doesn't
print randomly in debug output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102668 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some more (void)'s to prototypes for PR6961
Chris Lattner [Thu, 29 Apr 2010 23:27:32 +0000 (23:27 +0000)]
add some more (void)'s to prototypes for PR6961

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102667 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typos in assertion strings.
Dan Gohman [Thu, 29 Apr 2010 23:25:34 +0000 (23:25 +0000)]
Fix typos in assertion strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102666 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSlightly verboser debug spew from coalescer
Jakob Stoklund Olesen [Thu, 29 Apr 2010 22:21:48 +0000 (22:21 +0000)]
Slightly verboser debug spew from coalescer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102663 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMissed earlier. This is part of previous check-in. (r102661 - refactor.)
Devang Patel [Thu, 29 Apr 2010 20:48:12 +0000 (20:48 +0000)]
Missed earlier. This is part of previous check-in. (r102661 - refactor.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102662 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor.
Devang Patel [Thu, 29 Apr 2010 20:40:36 +0000 (20:40 +0000)]
Refactor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102661 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake naked functions work on PPC.
Dale Johannesen [Thu, 29 Apr 2010 19:32:19 +0000 (19:32 +0000)]
Make naked functions work on PPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102657 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrint variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.
Devang Patel [Thu, 29 Apr 2010 18:52:10 +0000 (18:52 +0000)]
Print variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.
##DEBUG_VALUE: runOnMachineFunction:this <- RDI+0
##DEBUG_VALUE: runOnMachineFunction:fn <- RSI+0
##DEBUG_VALUE: DeadDefs <- undef ## SimpleRegisterCoalescing.cpp:2706
##DEBUG_VALUE: getRegInfo:this <- [%rsp+$56]+$0
##DEBUG_VALUE: getTarget:this <- [%rsp+$56]+$0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102655 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove DBG_VALUE which reference dead stack slots.
Evan Cheng [Thu, 29 Apr 2010 18:51:00 +0000 (18:51 +0000)]
Remove DBG_VALUE which reference dead stack slots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102654 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDO not push DBG_VALUE machine instructions for inlined fuction arguments in entry...
Devang Patel [Thu, 29 Apr 2010 18:50:36 +0000 (18:50 +0000)]
DO not push DBG_VALUE machine instructions for inlined fuction arguments in entry block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102653 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd DenseMapInfo for int.
Evan Cheng [Thu, 29 Apr 2010 18:50:35 +0000 (18:50 +0000)]
Add DenseMapInfo for int.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102652 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agollc no longer requires the -f option to overwrite files.
Dan Gohman [Thu, 29 Apr 2010 18:46:52 +0000 (18:46 +0000)]
llc no longer requires the -f option to overwrite files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102651 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't remove libLTO.dylib if it's not being installed in Developer/usr/lib;
Bob Wilson [Thu, 29 Apr 2010 18:04:29 +0000 (18:04 +0000)]
Don't remove libLTO.dylib if it's not being installed in Developer/usr/lib;
just leave it in Developer/usr/local/lib.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102646 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoElaborate on a comment.
Dan Gohman [Thu, 29 Apr 2010 16:57:54 +0000 (16:57 +0000)]
Elaborate on a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102637 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead option.
Daniel Dunbar [Thu, 29 Apr 2010 16:29:02 +0000 (16:29 +0000)]
Remove dead option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102621 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVerify metadata harder. In particular, check that module
Duncan Sands [Thu, 29 Apr 2010 16:10:30 +0000 (16:10 +0000)]
Verify metadata harder.  In particular, check that module
level metadata does not have any function local operands.
This would have caught the problem found in PR6112.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102620 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix comment typo.
Duncan Sands [Thu, 29 Apr 2010 12:32:45 +0000 (12:32 +0000)]
Fix comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102612 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comment.
Evan Cheng [Thu, 29 Apr 2010 06:58:53 +0000 (06:58 +0000)]
Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102606 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR6910.
Torok Edwin [Thu, 29 Apr 2010 06:43:12 +0000 (06:43 +0000)]
Fix PR6910.

Limit alignment in SmallVector 8, otherwise GCC assumes 16 byte alignment.
opetaror new, and malloc only return 8-byte aligned memory on 32-bit Linux,
which cause a crash if code is compiled with -O3 (or -ftree-vectorize) and some
SmallVector code is vectorized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102604 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-enable 102565 with fixes.
Evan Cheng [Thu, 29 Apr 2010 06:33:38 +0000 (06:33 +0000)]
Re-enable 102565 with fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102602 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typo.
Nick Lewycky [Thu, 29 Apr 2010 05:54:29 +0000 (05:54 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102599 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLoad folding tail call should not use ebp / rbp after it's popped. PEI
Evan Cheng [Thu, 29 Apr 2010 05:08:22 +0000 (05:08 +0000)]
Load folding tail call should not use ebp / rbp after it's popped. PEI
should use esp / rsp to reference frame instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102596 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd support for assemblers that don't support periods in a name
Mon P Wang [Thu, 29 Apr 2010 04:00:56 +0000 (04:00 +0000)]
Add support for assemblers that don't support periods in a name

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102594 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTemporarily disable my changes to unbreak the build.
Evan Cheng [Thu, 29 Apr 2010 03:34:19 +0000 (03:34 +0000)]
Temporarily disable my changes to unbreak the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102590 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDo not generate duplicate dbg_value instructions for function arguments.
Evan Cheng [Thu, 29 Apr 2010 01:40:30 +0000 (01:40 +0000)]
Do not generate duplicate dbg_value instructions for function arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102585 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix missing #include.
Dan Gohman [Thu, 29 Apr 2010 01:39:13 +0000 (01:39 +0000)]
Fix missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102584 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid emitting a dbg_value machineinstr that's not going to be inserted into entry...
Evan Cheng [Thu, 29 Apr 2010 01:23:55 +0000 (01:23 +0000)]
Avoid emitting a dbg_value machineinstr that's not going to be inserted into entry block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102581 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFrame index can be negative.
Evan Cheng [Thu, 29 Apr 2010 01:13:30 +0000 (01:13 +0000)]
Frame index can be negative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102577 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheck Reg against zero.
Evan Cheng [Thu, 29 Apr 2010 00:59:34 +0000 (00:59 +0000)]
Check Reg against zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102573 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago- Really preserve dbg_value instructions when the register is spilled.
Evan Cheng [Wed, 28 Apr 2010 23:52:26 +0000 (23:52 +0000)]
- Really preserve dbg_value instructions when the register is spilled.
- Also, update dbg_value is the value is being re-matted from a frame slot, e.g. fixed slots for arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102565 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up.
Devang Patel [Wed, 28 Apr 2010 23:24:13 +0000 (23:24 +0000)]
tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102558 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed the word sized Bit Scan Forward/Reverse instructions, they needed the
Kevin Enderby [Wed, 28 Apr 2010 23:20:40 +0000 (23:20 +0000)]
Fixed the word sized Bit Scan Forward/Reverse instructions, they needed the
Operand size override prefix to be part of their records.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102556 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReplace r102368 with code that's less fragile. This creates DBG_VALUE instructions...
Evan Cheng [Wed, 28 Apr 2010 23:08:54 +0000 (23:08 +0000)]
Replace r102368 with code that's less fragile. This creates DBG_VALUE instructions for function arguments early and insert them after instruction selection is done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102554 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix this to work with objdir != srcdir
Chris Lattner [Wed, 28 Apr 2010 22:34:35 +0000 (22:34 +0000)]
fix this to work with objdir != srcdir

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102547 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix comment.
Dale Johannesen [Wed, 28 Apr 2010 22:23:46 +0000 (22:23 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102545 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest for llvm-gcc checkin 102543.
Dale Johannesen [Wed, 28 Apr 2010 22:17:33 +0000 (22:17 +0000)]
Test for llvm-gcc checkin 102543.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102544 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an option to the Apple-style build to control whether libLTO.dylib should
Bob Wilson [Wed, 28 Apr 2010 21:08:01 +0000 (21:08 +0000)]
Add an option to the Apple-style build to control whether libLTO.dylib should
be installed.  Disable it by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102531 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd sizes non-floating point versions for the eh sjlj intrinsic expansions.
Jim Grosbach [Wed, 28 Apr 2010 20:33:09 +0000 (20:33 +0000)]
Add sizes non-floating point versions for the eh sjlj intrinsic expansions.

rdar://7895451

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102526 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate tests. Now DBG_VALUE instruction is created only if alloca corresponding to...
Devang Patel [Wed, 28 Apr 2010 20:27:48 +0000 (20:27 +0000)]
Update tests. Now DBG_VALUE instruction is created only if alloca corresponding to llvm.dbg.declare is missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102524 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodeclare targets with (void) instead of () since this is a C header.
Chris Lattner [Wed, 28 Apr 2010 20:24:45 +0000 (20:24 +0000)]
declare targets with (void) instead of () since this is a C header.
Patch by Lars R in PR6961.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102523 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix PR6112 - When globalopt (or any other pass) does RAUW(@G, %G),
Chris Lattner [Wed, 28 Apr 2010 20:16:12 +0000 (20:16 +0000)]
fix PR6112 - When globalopt (or any other pass) does RAUW(@G, %G),
metadata references in non-function-local MDNodes should drop to
null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102519 91177308-0d34-0410-b5e6-96231b3b80d8