Evan Cheng
afa00d14db
Dan pointed out checking whether a node is dead by comparing its opcode to ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead.
...
llvm-svn: 93031
2010-01-09 00:21:08 +00:00
Evan Cheng
f96a9ec02b
ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
...
llvm-svn: 92988
2010-01-08 02:36:12 +00:00
Chris Lattner
e0199dff81
Fix rdar://7517201, a regression introduced by r92849.
...
When folding a and(any_ext(load)) both the any_ext and the
load have to have only a single use.
This removes the anyext-uses.ll testcase which started failing
because it is unreduced and unclear what it is testing.
llvm-svn: 92950
2010-01-07 21:59:23 +00:00
Chris Lattner
f68e328a99
factor this code better and reduce nesting at the same
...
time, no functionality change.
llvm-svn: 92948
2010-01-07 21:53:27 +00:00
Evan Cheng
4523041394
APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
...
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
Benjamin Kramer
bbaf8cac38
Simplify code. No intended functionality/performance change.
...
llvm-svn: 92938
2010-01-07 19:46:15 +00:00
Benjamin Kramer
badb9914d2
Kill dead store.
...
llvm-svn: 92920
2010-01-07 17:50:57 +00:00
Benjamin Kramer
a97aab4995
Remove dead variable.
...
llvm-svn: 92919
2010-01-07 17:29:08 +00:00
Benjamin Kramer
22ec2524fd
Use pop_back_val instead of back()+pop_back.
...
llvm-svn: 92918
2010-01-07 17:27:56 +00:00
Jakob Stoklund Olesen
b90023e707
Allow double defs after tail duplication.
...
llvm-svn: 92874
2010-01-06 23:52:46 +00:00
Jakob Stoklund Olesen
a63aa4e54b
Add Target hook to duplicate machine instructions.
...
Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.
llvm-svn: 92873
2010-01-06 23:47:07 +00:00
Jim Grosbach
0beaad246d
Anti-dependency breaking needs to be careful regarding instructions with
...
multiple register definitions.
llvm-svn: 92864
2010-01-06 22:21:25 +00:00
Evan Cheng
f9dade0634
Comment.
...
llvm-svn: 92850
2010-01-06 19:43:21 +00:00
Evan Cheng
25dcf9b830
Teach dag combine to fold the following transformation more aggressively:
...
(OP (trunc x), (trunc y)) -> (trunc (OP x, y))
Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel.
This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places.
llvm-svn: 92849
2010-01-06 19:38:29 +00:00
Jim Grosbach
2101815d36
80 column and whitespace cleanup
...
llvm-svn: 92837
2010-01-06 16:48:02 +00:00
Lang Hames
3e8519b563
Fixed malformed -*- lines in PBQP headers.
...
llvm-svn: 92830
2010-01-06 08:53:34 +00:00
Jakob Stoklund Olesen
03dea01d94
Add <imp-def> and <imp-kill> operands when replacing virtual sub-register defs and kills.
...
An instruction like this:
%reg1097:1<def> = VMOVSR %R3<kill>, 14, %reg0
Must be replaced with this when substituting physical registers:
%S0<def> = VMOVSR %R3<kill>, 14, %reg0, %D0<imp-def>
llvm-svn: 92812
2010-01-06 00:29:28 +00:00
Bill Wendling
b4f0d6e3b6
The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.
...
llvm-svn: 92810
2010-01-06 00:23:35 +00:00
Bill Wendling
41e18c3512
Only check the ordering if there is an ordering for each nodes.
...
llvm-svn: 92807
2010-01-06 00:09:23 +00:00
Bill Wendling
b7d6746476
Add a semi-primitive form of scheduling via the "SDNode ordering" to the
...
bottom-up scheduler. We prefer the lower order number.
llvm-svn: 92806
2010-01-05 23:48:12 +00:00
Bill Wendling
7e9607ab56
Don't assign the shift the same type as the variable being shifted. This could
...
result in illegal types for the SHL operator.
llvm-svn: 92797
2010-01-05 22:39:10 +00:00
Dan Gohman
9ef9e2c758
Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
...
uses several kinds of opcode values which are not declared within
that enum. This fixes PR5946.
llvm-svn: 92794
2010-01-05 22:26:32 +00:00
Dan Gohman
b4e120e7a7
Restore dump() methods to Loop and MachineLoop.
...
llvm-svn: 92772
2010-01-05 21:08:02 +00:00
Benjamin Kramer
0ba7479f2c
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Jakob Stoklund Olesen
0277c4cd0b
Remove livein checks from machine code verifier.
...
A phi operand that is implicitly defined in a predecessor becomes an undefined
register after phi elimination. This causes a lot of false positives when the
verifier is checking if live-in registers are live-out from all predecessors.
Removing the verifier checks seems like a better solution than insisting on
IMPLICIT_DEF instructions in predecessor blocks.
llvm-svn: 92769
2010-01-05 20:59:36 +00:00
Devang Patel
eb75073664
If a scope has only one instruction then first instruction is also the last instruction.
...
llvm-svn: 92736
2010-01-05 16:59:17 +00:00
Benjamin Kramer
e90a3c66c4
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
Devang Patel
9c02d20409
Delete renaming use of dead dbg intrinsics.
...
Intrinsic::dbg_stoppoint
Intrinsic::dbg_region_start
Intrinsic::dbg_region_end
Intrinsic::dbg_func_start
llvm-svn: 92672
2010-01-05 01:47:06 +00:00
Devang Patel
e6e1c93fb9
Use StringRef.startswith().
...
llvm-svn: 92671
2010-01-05 01:46:14 +00:00
David Greene
e5bee4794b
Change errs() to dbgs().
...
llvm-svn: 92597
2010-01-05 01:26:11 +00:00
David Greene
9fab20f5d2
Change errs() to dbgs().
...
llvm-svn: 92596
2010-01-05 01:26:09 +00:00
David Greene
9564dbcc2a
Change errs() to dbgs().
...
llvm-svn: 92595
2010-01-05 01:26:05 +00:00
David Greene
e121e605f7
Change errs() to dbgs().
...
llvm-svn: 92594
2010-01-05 01:26:01 +00:00
David Greene
51c811205c
Change errs() to dbgs().
...
llvm-svn: 92593
2010-01-05 01:26:00 +00:00
David Greene
727e700d3d
Change errs() to dbgs().
...
llvm-svn: 92592
2010-01-05 01:25:58 +00:00
David Greene
71f44c85e8
Change errs() to dbgs().
...
llvm-svn: 92591
2010-01-05 01:25:55 +00:00
David Greene
6000f59a50
Change errs() to dbgs().
...
llvm-svn: 92590
2010-01-05 01:25:52 +00:00
David Greene
879bc8bffa
Change errs() to dbgs().
...
llvm-svn: 92589
2010-01-05 01:25:50 +00:00
David Greene
39454e8cb5
Change errs() to dbgs().
...
llvm-svn: 92588
2010-01-05 01:25:47 +00:00
David Greene
99517775a2
Change errs() to dbgs().
...
llvm-svn: 92587
2010-01-05 01:25:45 +00:00
David Greene
ecb5255809
Change errs() to dbgs().
...
llvm-svn: 92586
2010-01-05 01:25:43 +00:00
David Greene
ce47312026
Change errs() to dbgs().
...
llvm-svn: 92585
2010-01-05 01:25:41 +00:00
David Greene
5857f38bbe
Change errs() to dbgs().
...
llvm-svn: 92584
2010-01-05 01:25:39 +00:00
David Greene
8e4443c9ae
Change errs() to dbgs().
...
llvm-svn: 92583
2010-01-05 01:25:20 +00:00
David Greene
9f18bb0e40
Change errs() to dbgs().
...
llvm-svn: 92582
2010-01-05 01:25:15 +00:00
David Greene
b1764ac8cb
Change errs() to dbgs().
...
llvm-svn: 92581
2010-01-05 01:25:11 +00:00
David Greene
54706ebebb
Change errs() to dbgs().
...
llvm-svn: 92580
2010-01-05 01:25:09 +00:00
David Greene
4f5be2f621
Change errs() to dbgs().
...
llvm-svn: 92579
2010-01-05 01:25:04 +00:00
David Greene
bf6025f893
Change errs() to dbgs().
...
llvm-svn: 92578
2010-01-05 01:25:00 +00:00
David Greene
2c9dbf7b18
Change errs() to dbgs().
...
llvm-svn: 92577
2010-01-05 01:24:57 +00:00