Commit Graph

22308 Commits

Author SHA1 Message Date
Chris Lattner 1b09c6ba87 cmovle != cmovlt
llvm-svn: 25761
2006-01-29 03:47:30 +00:00
Jeff Cohen 4ab39e43e8 Fix typo.
llvm-svn: 25760
2006-01-29 03:45:35 +00:00
Chris Lattner d3a63de91e Split out code generation from analysis from emission
llvm-svn: 25759
2006-01-29 02:57:39 +00:00
Chris Lattner afe9baeb69 move some code around, no change in the generated code
llvm-svn: 25758
2006-01-29 02:43:35 +00:00
Chris Lattner 5255c6c627 now that we have control over emission of the code, emit the code using nested
"if" statements (indenting it appropriately, of course) instead of using goto's.

This inverts the logic for all of the if statements, which makes things simpler
to understand in addition to making the generated code easier to read.

llvm-svn: 25757
2006-01-28 20:43:52 +00:00
Chris Lattner 4c4da201bf Change PatternCodeEmitter to emit code into a buffer instead of emitting it
directly to the output file.  This makes things simple because the code doesn't
have to worry about indentation or the case when there is no goto.  It also
allows us to indent the code better without touching everything :)

llvm-svn: 25756
2006-01-28 20:31:24 +00:00
Jeff Cohen 8643ea67b1 Flesh out AMD family/models.
llvm-svn: 25755
2006-01-28 20:30:18 +00:00
Jeff Cohen 58ca0be9af Correctly determine CPU vendor.
llvm-svn: 25754
2006-01-28 19:48:34 +00:00
Reid Spencer 4bfd3b40b0 Make long warnings wrap and have less indent so other portions of the page
are not skewed out of view.

llvm-svn: 25753
2006-01-28 19:44:48 +00:00
Chris Lattner a7d6bbff00 Fit to 80 columns, no functionality change
llvm-svn: 25752
2006-01-28 19:06:51 +00:00
Jeff Cohen 71287085a1 Use union instead of reinterpret_cast.
llvm-svn: 25751
2006-01-28 18:47:32 +00:00
Jeff Cohen b5de47cd9a Fix recognition of Intel CPUs.
llvm-svn: 25750
2006-01-28 18:38:20 +00:00
Chris Lattner b3ab2d3a42 Is64Bit reflects the capability of the chip, not an aspect of the target os
llvm-svn: 25749
2006-01-28 18:23:48 +00:00
Chris Lattner be08957dc5 Fix a bunch of JIT failures with the new isel
llvm-svn: 25748
2006-01-28 18:19:37 +00:00
Jeff Cohen e128d5f724 Improve X86 subtarget support for Windows and AMD.
llvm-svn: 25747
2006-01-28 18:09:06 +00:00
Chris Lattner d02b05473c Use the new "UpdateNodeOperands" method to simplify LegalizeDAG and make it
faster.  This cuts about 120 lines of code out of the legalizer (mostly code
checking to see if operands have changed).

It also fixes an ugly performance issue, where the legalizer cloned the entire
graph after any change.  Now the "UpdateNodeOperands" method gives it a chance
to reuse nodes if the operands of a node change but not its opcode or valuetypes.

This speeds up instruction selection time on kimwitu++ by about 8.2% with a
release build.

llvm-svn: 25746
2006-01-28 10:58:55 +00:00
Chris Lattner ccd2a20c4b silence a warning
llvm-svn: 25745
2006-01-28 10:34:47 +00:00
Chris Lattner 580b12ad34 add another method variant
llvm-svn: 25744
2006-01-28 10:09:25 +00:00
Chris Lattner 64f934f07f add another variant
llvm-svn: 25743
2006-01-28 10:08:58 +00:00
Chris Lattner f34156e8cb add some methods for updating nodes
llvm-svn: 25742
2006-01-28 09:32:45 +00:00
Chris Lattner 009c53f688 Add some methods
llvm-svn: 25741
2006-01-28 09:32:01 +00:00
Chris Lattner eb63751499 minor tweaks
llvm-svn: 25740
2006-01-28 08:31:04 +00:00
Chris Lattner 689bdcc9cf move a bunch of code, no other change.
llvm-svn: 25739
2006-01-28 08:25:58 +00:00
Chris Lattner fcfda5a174 remove a couple more now-extraneous legalizeop's
llvm-svn: 25738
2006-01-28 08:22:56 +00:00
Chris Lattner 364b89a784 fix a bug
llvm-svn: 25737
2006-01-28 07:42:08 +00:00
Chris Lattner 9dcce6da8e Several major changes:
1. Pull out the expand cases for BSWAP and CT* into a separate function,
   reducing the size of LegalizeOp.
2. Fix a bug where expand(bswap i64) was wrong when i64 is legal.
3. Changed LegalizeOp/PromoteOp so that the legalizer never needs to be
   iterative.  It now operates in a single pass over the nodes.
4. Simplify a LOT of code, with a net reduction of ~280 lines.

llvm-svn: 25736
2006-01-28 07:39:30 +00:00
Chris Lattner 30432e07f0 Fix a bug in my elimination of ISD::CALL this morning. PPC now has to
provide the expansion for i64 calls itself

llvm-svn: 25735
2006-01-28 07:33:03 +00:00
Chris Lattner dc8bbb6527 make this work on non-native hosts
llvm-svn: 25734
2006-01-28 06:05:41 +00:00
Chris Lattner 0c7b4666a3 add a note about how we should implement this FIXME from the legalizer:
// FIXME: revisit this when we have some kind of mechanism by which targets
    // can decided legality of vector constants, of which there may be very
    // many.

llvm-svn: 25733
2006-01-28 05:40:47 +00:00
Chris Lattner fd4a7f76a9 Eliminate the need for ExpandOp to set 'needsanotheriteration', as it already
relegalizes the stuff it returns.

Add the ability to custom expand ADD/SUB, so that targets don't need to deal
with ADD_PARTS/SUB_PARTS if they don't want.

Fix some obscure potential bugs and simplify code.

llvm-svn: 25732
2006-01-28 05:07:51 +00:00
Chris Lattner 10f677508f Instead of making callers of ExpandLibCall legalize the result, make
ExpandLibCall do it itself.

llvm-svn: 25731
2006-01-28 04:28:26 +00:00
Chris Lattner a593acfe66 Eliminate the need to do another iteration of the legalizer after inserting
a libcall.

llvm-svn: 25730
2006-01-28 04:23:12 +00:00
Chris Lattner b256104073 remove this method I just added, now is not the time.
llvm-svn: 25729
2006-01-28 03:43:33 +00:00
Chris Lattner 98ed05c81d remove method I just added
llvm-svn: 25728
2006-01-28 03:43:09 +00:00
Chris Lattner 43b867dd3b add a new callback
llvm-svn: 25727
2006-01-28 03:37:03 +00:00
Nate Begeman 595ec734fc Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha).

llvm-svn: 25726
2006-01-28 03:14:31 +00:00
Nate Begeman 6c82262289 Add a couple more things to the readme.
llvm-svn: 25724
2006-01-28 01:22:10 +00:00
Nate Begeman af397cec0b Add a missing case to the dag combiner.
llvm-svn: 25723
2006-01-28 01:06:30 +00:00
Chris Lattner fb16a62fba Remove the ISD::CALL and ISD::TAILCALL nodes
llvm-svn: 25721
2006-01-28 00:18:58 +00:00
Chris Lattner b95594b2f0 The 'target-independent' ISD::CALL isn't. Nuke it, making way for Nate's
future work.

llvm-svn: 25720
2006-01-28 00:18:27 +00:00
Chris Lattner b292de6703 Remove some dead code
llvm-svn: 25719
2006-01-28 00:02:51 +00:00
Chris Lattner 2c00db82bd Switch to AlphaISD::CALL instead of ISD::CALL
llvm-svn: 25718
2006-01-27 23:39:00 +00:00
Chris Lattner f424a66524 Use PPCISD::CALL instead of ISD::CALL
llvm-svn: 25717
2006-01-27 23:34:02 +00:00
Chris Lattner a9382ca59e Use V8ISD::CALL instead of ISD::CALL
llvm-svn: 25716
2006-01-27 23:30:03 +00:00
Evan Cheng 18243826fd A bit of wisdom from Chris on the last entry.
llvm-svn: 25715
2006-01-27 22:54:32 +00:00
Evan Cheng 63045d221b AT&T assembly convention: registers are in lower case.
llvm-svn: 25714
2006-01-27 22:53:29 +00:00
Evan Cheng 6a92822173 Use Intel assembly syntax to look for ST
llvm-svn: 25713
2006-01-27 22:51:51 +00:00
Chris Lattner a502b93fae initialize member vars
llvm-svn: 25712
2006-01-27 22:38:36 +00:00
Chris Lattner dbfc299915 initialize all instance vars
llvm-svn: 25711
2006-01-27 22:37:09 +00:00
Chris Lattner 4d967a4cbb Make llvm.frame/returnaddr not crash on ppc
llvm-svn: 25710
2006-01-27 22:25:06 +00:00