Commit Graph

368 Commits

Author SHA1 Message Date
Evan Cheng 9456dd8b81 Fix comments.
llvm-svn: 31414
2006-11-03 07:31:32 +00:00
Evan Cheng c176f038b9 Added isPredecessor.
llvm-svn: 31409
2006-11-03 03:05:24 +00:00
Chris Lattner cd7b92251d silence warning
llvm-svn: 31397
2006-11-03 01:28:29 +00:00
Reid Spencer de46e48420 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Evan Cheng 415f365e5c Print jumptable index.
llvm-svn: 31340
2006-11-01 04:48:30 +00:00
Evan Cheng c3e695137d Added a new SDNode type: BR_JT for jumptable branch.
llvm-svn: 31292
2006-10-30 07:59:36 +00:00
Evan Cheng 7ab6123c42 VLOAD is not the LoadSDNode opcode.
llvm-svn: 31276
2006-10-29 06:14:47 +00:00
Nick Lewycky dc146a9fb9 Remove spurious case. EXTLOAD is not one of the node opcodes.
llvm-svn: 31275
2006-10-29 02:26:30 +00:00
Jim Laskey eef273a16f Load and stores have not been uniqued properly.
llvm-svn: 31261
2006-10-28 17:25:28 +00:00
Chris Lattner b78eb6c8d1 Fix a serious bug that caused any x86 vector stuff to infinite loop
llvm-svn: 31254
2006-10-28 06:15:26 +00:00
Jim Laskey bd0f088743 Clean up.
llvm-svn: 31243
2006-10-27 23:52:51 +00:00
Jim Laskey f576b42bb2 Switch over from SelectionNodeCSEMap to FoldingSet.
llvm-svn: 31240
2006-10-27 23:46:08 +00:00
Evan Cheng 96d6bf50ae getPreIndexedLoad -> getIndexedLoad.
llvm-svn: 31209
2006-10-26 21:53:40 +00:00
Chris Lattner 78fd0f83ff Trivial patch to speed up legalizing common i64 constants.
llvm-svn: 31020
2006-10-17 21:47:13 +00:00
Evan Cheng 1839d76f69 Reflect MemOpAddrMode change; added a helper to create pre-indexed load.
llvm-svn: 31016
2006-10-17 21:14:32 +00:00
Jim Laskey e7d2c24a7d Make it simplier to dump DAGs while in DAGCombiner. Remove a nasty optimization.
llvm-svn: 31009
2006-10-17 19:33:52 +00:00
Chris Lattner bd9acad805 When SimplifySetCC was moved to the DAGCombiner, it was never removed from
SelectionDAG and it has since bitrotted.  Remove the copy from SelectionDAG.
Next, remove the constant folding piece of DAGCombiner::SimplifySetCC into
a new FoldSetCC method which can be used by getNode() and SimplifySetCC.

This fixes obscure bugs.

llvm-svn: 30952
2006-10-14 00:41:01 +00:00
Chris Lattner 45ffb1eb70 Fix a bug where we incorrectly turned '(X & 0) == 0' into '(X & 0) >> -1',
which is undefined.  "0" isn't a power of 2.

llvm-svn: 30947
2006-10-13 22:46:18 +00:00
Evan Cheng ab51cf2e78 Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Evan Cheng a731cb674a Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.
llvm-svn: 30916
2006-10-12 20:34:05 +00:00
Evan Cheng d35734bd1f Naming consistency.
llvm-svn: 30878
2006-10-11 07:10:22 +00:00
Andrew Lenharth a6bbf33cbf Jimptables working again on alpha.
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.

llvm-svn: 30873
2006-10-11 04:29:42 +00:00
Evan Cheng 2da4671e05 FindModifiedNodeSlot needs to add LoadSDNode ivars to create proper SelectionDAGCSEMap ID.
llvm-svn: 30866
2006-10-11 01:47:58 +00:00
Evan Cheng fe858538c0 SDNode::dump should also print out extension type and VT.
llvm-svn: 30860
2006-10-10 20:05:10 +00:00
Evan Cheng e71fe34d75 Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
llvm-svn: 30844
2006-10-09 20:57:25 +00:00
Evan Cheng af309d29b1 Add getStore() helper function to create ISD::STORE nodes.
llvm-svn: 30758
2006-10-05 22:57:11 +00:00
Evan Cheng 5d9fd977d3 Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
extra operand to LOADX to specify the exact value extension type.

llvm-svn: 30714
2006-10-04 00:56:09 +00:00
Andrew Lenharth c19ef92403 Comments on JumpTableness
llvm-svn: 30615
2006-09-26 20:02:30 +00:00
Chris Lattner 5a42ebcff3 Fold extract_element(cst) to cst
llvm-svn: 30478
2006-09-19 05:02:39 +00:00
Chris Lattner 4c059f4962 Minor speedup for legalize by avoiding some malloc traffic
llvm-svn: 30477
2006-09-19 04:51:23 +00:00
Evan Cheng 45fe3bc72c Added support for machine specific constantpool values. These are useful for
representing expressions that can only be resolved at link time, etc.

llvm-svn: 30278
2006-09-12 21:00:35 +00:00
Chris Lattner f0359b343a Implement the fpowi now by lowering to a libcall
llvm-svn: 30225
2006-09-09 06:03:30 +00:00
Evan Cheng e5570a4c3f Move isCommutativeBinOp from SelectionDAG.cpp and DAGCombiner.cpp out. Make it a static method of SelectionDAG.
llvm-svn: 29951
2006-08-29 06:42:35 +00:00
Evan Cheng 849f4bf8dd Eliminate SelectNodeTo() and getTargetNode() variants which take more than
3 SDOperand operands. They are replaced by versions which take an array
of SDOperand and the number of operands.

llvm-svn: 29905
2006-08-27 08:08:54 +00:00
Evan Cheng 34b70eea5c SelectNodeTo now returns a SDNode*.
llvm-svn: 29901
2006-08-26 08:00:10 +00:00
Chris Lattner 65879caf07 minor changes.
llvm-svn: 29740
2006-08-16 22:57:46 +00:00
Chris Lattner a4f3625c23 Use the appropriate typedef
llvm-svn: 29730
2006-08-16 20:59:32 +00:00
Chris Lattner a5a3eafbd0 Start using SDVTList more consistently
llvm-svn: 29711
2006-08-15 19:11:05 +00:00
Chris Lattner f98411a220 add a new SDVTList type and new SelectionDAG::getVTList methods to streamline
the creation of canonical VTLists.

llvm-svn: 29709
2006-08-15 17:46:01 +00:00
Chris Lattner 3bf4be453f Add a new getNode() method that takes a pointer to an already-intern'd list
of value-type nodes.  This avoids having to do mallocs for std::vectors of
valuetypes when a node returns more than one type.

llvm-svn: 29685
2006-08-14 23:31:51 +00:00
Chris Lattner e93a39f2d7 remove SelectionDAG::InsertISelMapEntry, it is dead
llvm-svn: 29677
2006-08-14 22:24:39 +00:00
Chris Lattner 63268f0672 Add code to resize the CSEMap hash table. This doesn't speedup codegen of
kimwitu, but seems like a good idea from a "avoid performance cliffs" standpoint :)

llvm-svn: 29675
2006-08-14 22:19:25 +00:00
Chris Lattner 8e37283d8b Add the actual constant to the hash for ConstantPool nodes. Thanks to
Rafael Espindola for pointing this out.

llvm-svn: 29669
2006-08-14 20:12:44 +00:00
Chris Lattner 0c2e5412bb Remove 8 more std::map's.
llvm-svn: 29631
2006-08-11 21:55:30 +00:00
Chris Lattner 3f16b201e2 Move the BBNodes, GlobalValues, TargetGlobalValues, Constants, TargetConstants,
RegNodes, and ValueNodes maps into the CSEMap.

llvm-svn: 29626
2006-08-11 21:01:22 +00:00
Chris Lattner fcb16470ec eliminate the NullaryOps map, use CSEMap instead.
llvm-svn: 29621
2006-08-11 18:38:11 +00:00
Chris Lattner a2f4086828 Change one ReplaceAllUsesWith method to take an array of operands to replace
instead of a vector of operands.

llvm-svn: 29616
2006-08-11 17:46:28 +00:00
Chris Lattner c24a1d3093 Start eliminating temporary vectors used to create DAG nodes. Instead, pass
in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.

I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.

We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.

It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.

llvm-svn: 29566
2006-08-08 02:23:42 +00:00
Chris Lattner 97af9d5d3a Eliminate some malloc traffic by allocating vectors on the stack. Change some
method that took std::vector<SDOperand> to take a pointer to a first operand
and #operands.

This speeds up isel on kc++ by about 3%.

llvm-svn: 29561
2006-08-08 01:09:31 +00:00
Chris Lattner 1ee75ce65d Revamp the "CSEMap" datastructure used in the SelectionDAG class. This
eliminates a bunch of std::map's in the SelectionDAG, replacing them with a
home-grown hashtable.

This is still a work in progress: not all the maps have been moved over and the
hashtable never resizes.  That said, this still speeds up llc 20% on kimwitu++
with -fast -regalloc=local using a release build.

llvm-svn: 29550
2006-08-07 23:03:03 +00:00