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
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
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
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
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
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
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
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
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
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
Evan Cheng
9303b11e47
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.
...
llvm-svn: 102683
2010-04-30 01:12:32 +00:00
Dan Gohman
140e0899ad
Temporarily disable SelectionDAG kill flags, which are causing trouble.
...
llvm-svn: 102680
2010-04-30 00:32:51 +00:00
Jeffrey Yasskin
db377e2f86
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.
llvm-svn: 102679
2010-04-30 00:16:10 +00:00
Dan Gohman
1534ad2d28
Set register kill flags on the SelectionDAG path, at least in the
...
easy cases.
llvm-svn: 102678
2010-04-30 00:08:21 +00:00
Jakob Stoklund Olesen
01254ea96d
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.
llvm-svn: 102672
2010-04-29 23:47:46 +00:00
Dan Gohman
0a6811070b
Don't leave Base.FrameIndex uninitialized, so that it doesn't
...
print randomly in debug output.
llvm-svn: 102668
2010-04-29 23:30:41 +00:00
Dan Gohman
b8cdd4037b
Fix typos in assertion strings.
...
llvm-svn: 102666
2010-04-29 23:25:34 +00:00
Jakob Stoklund Olesen
1fea22bc70
Slightly verboser debug spew from coalescer
...
llvm-svn: 102663
2010-04-29 22:21:48 +00:00
Devang Patel
bdfc01f418
Refactor.
...
llvm-svn: 102661
2010-04-29 20:40:36 +00:00
Dale Johannesen
a4fd142987
Make naked functions work on PPC.
...
llvm-svn: 102657
2010-04-29 19:32:19 +00:00
Devang Patel
c34efcfee7
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
llvm-svn: 102655
2010-04-29 18:52:10 +00:00
Evan Cheng
8ea213f823
Remove DBG_VALUE which reference dead stack slots.
...
llvm-svn: 102654
2010-04-29 18:51:00 +00:00
Devang Patel
1e28f36308
DO not push DBG_VALUE machine instructions for inlined fuction arguments in entry block.
...
llvm-svn: 102653
2010-04-29 18:50:36 +00:00
Duncan Sands
36cfc45cf3
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.
llvm-svn: 102620
2010-04-29 16:10:30 +00:00
Evan Cheng
b9fe4fd40c
Add comment.
...
llvm-svn: 102606
2010-04-29 06:58:53 +00:00
Evan Cheng
ba7dcad569
Re-enable 102565 with fixes.
...
llvm-svn: 102602
2010-04-29 06:33:38 +00:00
Evan Cheng
da89f22f3d
Load folding tail call should not use ebp / rbp after it's popped. PEI
...
should use esp / rsp to reference frame instead.
llvm-svn: 102596
2010-04-29 05:08:22 +00:00
Mon P Wang
bfebbd889a
Add support for assemblers that don't support periods in a name
...
llvm-svn: 102594
2010-04-29 04:00:56 +00:00
Evan Cheng
3e9545cfb4
Temporarily disable my changes to unbreak the build.
...
llvm-svn: 102590
2010-04-29 03:34:19 +00:00
Evan Cheng
053000f3f5
Do not generate duplicate dbg_value instructions for function arguments.
...
llvm-svn: 102585
2010-04-29 01:40:30 +00:00
Dan Gohman
ec9e1d8a88
Fix missing #include.
...
llvm-svn: 102584
2010-04-29 01:39:13 +00:00
Evan Cheng
801b8e5530
Avoid emitting a dbg_value machineinstr that's not going to be inserted into entry block.
...
llvm-svn: 102581
2010-04-29 01:23:55 +00:00
Evan Cheng
6764226f8c
Frame index can be negative.
...
llvm-svn: 102577
2010-04-29 01:13:30 +00:00
Evan Cheng
d08e8f2b24
Check Reg against zero.
...
llvm-svn: 102573
2010-04-29 00:59:34 +00:00
Evan Cheng
4137a14e18
- 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.
llvm-svn: 102565
2010-04-28 23:52:26 +00:00
Devang Patel
84e3ddd87c
tidy up.
...
llvm-svn: 102558
2010-04-28 23:24:13 +00:00
Kevin Enderby
58bed5a913
Fixed the word sized Bit Scan Forward/Reverse instructions, they needed the
...
Operand size override prefix to be part of their records.
llvm-svn: 102556
2010-04-28 23:20:40 +00:00
Evan Cheng
a02c9072fc
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.
...
llvm-svn: 102554
2010-04-28 23:08:54 +00:00
Jim Grosbach
c9b8d992e1
Add sizes non-floating point versions for the eh sjlj intrinsic expansions.
...
rdar://7895451
llvm-svn: 102526
2010-04-28 20:33:09 +00:00