Commit Graph

21019 Commits

Author SHA1 Message Date
Duraid Madina fc1d1b2499 add support for loading bools
llvm-svn: 24182
2005-11-04 09:59:06 +00:00
Jim Laskey e682b677c1 Scheduling now uses itinerary data.
llvm-svn: 24180
2005-11-04 04:05:35 +00:00
Jeff Cohen add93a5957 <cassert> no longer required to make VC++ happy.
llvm-svn: 24177
2005-11-04 02:59:16 +00:00
Duraid Madina 3b3f2a92e6 change NULL to 0, unbreaks the ppc target when building on ia64
llvm-svn: 24176
2005-11-04 01:45:04 +00:00
Duraid Madina 7ac646ef95 fun with predicates! (add TRUNC i64->i1, AND i1 i1, fix XOR i1 i1)
llvm-svn: 24175
2005-11-04 00:57:56 +00:00
Jim Laskey d6d3afb05e 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.

llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Chris Lattner 5f48179c85 Fix mac os spelling
llvm-svn: 24171
2005-11-03 22:33:48 +00:00
Chris Lattner e33f18eedc Add more bison versions, thanks to Vladimir
llvm-svn: 24169
2005-11-03 18:32:06 +00:00
Chris Lattner 6b5e263fe4 Per bug 655, give people more options in case 1.35 doesn't build on their
system.

llvm-svn: 24168
2005-11-03 18:28:22 +00:00
Duraid Madina f0f22a55b0 add pattern to load constant 0 into a predicate reg
llvm-svn: 24164
2005-11-03 10:09:32 +00:00
Chris Lattner b3140c3e8a add a hack that fixes:
llvm-gcc main.c -Wl,-native -o a.out -g

This is important because it used by many configure scripts.

John, please pull this onto the 1.6 branch.

llvm-svn: 24163
2005-11-03 07:17:51 +00:00
Chris Lattner 64209fd14b Reject integer literals that are out of range for their type.
llvm-svn: 24162
2005-11-03 05:46:11 +00:00
Chris Lattner 674660ff03 Fix a bug that prevented this pattern from matching
llvm-svn: 24161
2005-11-03 05:45:34 +00:00
Nate Begeman ee065281e8 Fix a crash that Andrew noticed, and add a pair of braces to unfconfuse
XCode's indenting.

llvm-svn: 24159
2005-11-02 18:42:59 +00:00
Andrew Lenharth 662295587d make this 64 bit clean, fixed test30 of /Regression/Transforms/InstCombine/add.ll
llvm-svn: 24158
2005-11-02 18:35:40 +00:00
Andrew Lenharth 8426ee14be This is missed by InstCombine, patch comming
llvm-svn: 24157
2005-11-02 18:34:05 +00:00
Chris Lattner 9b9a839605 Fix a QOI issue noticed by Markus F.X.J. Oberhumer.
This fixes PR641

llvm-svn: 24154
2005-11-02 17:42:58 +00:00
Duraid Madina 955ffafd79 "fix" support for FP constants (this code asserts in the scheduler,
though)

llvm-svn: 24152
2005-11-02 07:32:59 +00:00
Duraid Madina 4480dcdcea add F0 and F1 to the FP register class
llvm-svn: 24151
2005-11-02 07:30:39 +00:00
Chris Lattner b5310bdbe9 This works now
llvm-svn: 24150
2005-11-02 06:49:37 +00:00
Chris Lattner 590176be16 Add support for immediates directly in the pattern, this allows itanium to
define:

def : Pat<(i1 1), (CMPEQ r0, r0)>;

llvm-svn: 24149
2005-11-02 06:49:14 +00:00
Jeff Cohen 95b6fc359b Keep VC++ happy.
llvm-svn: 24148
2005-11-02 04:03:16 +00:00
Duraid Madina 17decbb253 add support for SELECT to TargetSelectionDAG.td, add support for
selecting ints to IA64, and a few other ia64 bits and pieces

llvm-svn: 24147
2005-11-02 02:37:18 +00:00
Duraid Madina 9abf1650ed add support for loading FP constants +0.0 and +1.0 to the dag isel,
stop pretending -0.0 and -1.0 are machine constants

llvm-svn: 24146
2005-11-02 02:35:04 +00:00
Chris Lattner 17df608719 Fix a source of undefined behavior when dealing with 64-bit types. This
may fix PR652.  Thanks to Andrew for tracking down the problem.

llvm-svn: 24145
2005-11-02 01:47:04 +00:00
Misha Brukman 93b8cb17ac * Replace ampersands in section titles with more formal ``and''
* Surround C++ template operators with <tt>
* Add <> after templated operators for consistency

llvm-svn: 24144
2005-11-01 21:12:49 +00:00
Misha Brukman 3c46ccf336 Re-generated to fix copy-paste typo noticed by Marco Matthies.
llvm-svn: 24143
2005-11-01 21:00:49 +00:00
Misha Brukman 2956ea758d Fixed copy-paste typo, patch by Marco Matthies.
llvm-svn: 24142
2005-11-01 20:58:08 +00:00
Jim Laskey 802748cd61 Allow itineraries to be passed through the Target Machine.
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Jeff Cohen 9e1784d738 Keep VC++ happy.
llvm-svn: 24137
2005-11-01 18:04:06 +00:00
Chris Lattner 1deb86dbf4 Let people who run the nightly tester specify paths to external tests, instead
of having to hack the nightly tester script itself.

as an example, I use the following for my machine:

$HOME/llvm/utils/NightlyTest.pl -parallel -release -enable-llcbeta \
     -spec2000path /Volumes/ProjectsDisk/cvs/benchmarks/speccpu2000-llvm/benchspec/ \
     -povraypath /Volumes/ProjectsDisk/cvs/benchmarks/povray31 \
     -namdpath /Volumes/ProjectsDisk/cvs/benchmarks/namd

llvm-svn: 24136
2005-11-01 17:59:42 +00:00
Duraid Madina 5a087ff8c3 heh, scheduling was easy?
need to send chris, jim and sampo a box of fish each

llvm-svn: 24135
2005-11-01 05:49:08 +00:00
Duraid Madina 9b61d3c1e2 FORTRAN!!! :( and other similarly unfortunate things mean that on ia64
one sometimes needs to pass FP args in both FP *and* integer registers.

llvm-svn: 24134
2005-11-01 05:46:16 +00:00
Duraid Madina b81b61330e so tablegen was thinking I might want to convert FPs to predicates.
clever little tablegen!

llvm-svn: 24133
2005-11-01 03:32:15 +00:00
Duraid Madina 6c912bffd6 add support for int->FP and FP->int ops, and add ia64 patterns for these
llvm-svn: 24132
2005-11-01 03:07:25 +00:00
Duraid Madina a284b6636f add zeroextend predicate->integer
llvm-svn: 24131
2005-11-01 01:29:55 +00:00
Chris Lattner 7432ceef5c Add a flag to enable a darwin linker optimization
llvm-svn: 24130
2005-11-01 00:12:36 +00:00
Chris Lattner 6b63e0c6fd Make constant pool entries use private labels. This is important when you're
not compiling a whole program at a time :)

llvm-svn: 24129
2005-10-31 22:12:06 +00:00
Andrew Lenharth d44a8f546d Updated alpha known problems.
llvm-svn: 24126
2005-10-31 19:07:29 +00:00
Chris Lattner b7147f6027 Apparently these do pass on some alphas
llvm-svn: 24125
2005-10-31 19:06:13 +00:00
Chris Lattner 71d73eb411 Fix an iterator invalidation problem in code used by the -strip pass
llvm-svn: 24124
2005-10-31 18:42:37 +00:00
Chris Lattner 09efd4e5b6 Limit the search depth of MaskedValueIsZero to 6 instructions, to avoid
bad cases.  This fixes Markus's second testcase in PR639, and should
seal it for good.

llvm-svn: 24123
2005-10-31 18:35:52 +00:00
Jim Laskey 0433df136f Emit itinerary class in instruction info.
llvm-svn: 24122
2005-10-31 17:16:46 +00:00
Jim Laskey 3763a50d82 Generate cpu to itinerary map.
llvm-svn: 24121
2005-10-31 17:16:01 +00:00
Chris Lattner 14ada0fd4e these tests fail on alpha for some reason
llvm-svn: 24120
2005-10-31 16:15:49 +00:00
Jim Laskey 5ce0538253 1. Embed and not inherit vector for NodeGroup.
2. Iterate operands and not uses (performance.)

3. Some long pending comment changes.

llvm-svn: 24119
2005-10-31 12:49:09 +00:00
Duraid Madina 88fc69f627 add FP compares and implicit register defs to the dag isel
llvm-svn: 24118
2005-10-31 01:42:11 +00:00
Jeff Cohen 94d1562071 Update Getting Started for Visual Studio page.
llvm-svn: 24117
2005-10-30 21:00:24 +00:00
Chris Lattner 6871b23d02 Significantly simplify this code and make it more aggressive. Instead of having
a special case hack for X86, make the hack more general: if an incoming argument
register is not used in any block other than the entry block, don't copy it to
a vreg.  This helps us compile code like this:

%struct.foo = type { int, int, [0 x ubyte] }
int %test(%struct.foo* %X) {
        %tmp1 = getelementptr %struct.foo* %X, int 0, uint 2, int 100
        %tmp = load ubyte* %tmp1                ; <ubyte> [#uses=1]
        %tmp2 = cast ubyte %tmp to int          ; <int> [#uses=1]
        ret int %tmp2
}

to:

_test:
        lbz r3, 108(r3)
        blr

instead of:

_test:
        lbz r2, 108(r3)
        or r3, r2, r2
        blr

The (dead) copy emitted to copy r3 into a vreg for extra-block uses was
increasing the live range of r3 past the load, preventing the coallescing.

This implements CodeGen/PowerPC/reg-coallesce-simple.ll

llvm-svn: 24115
2005-10-30 19:42:35 +00:00
Chris Lattner 6beef90324 new testcase
llvm-svn: 24112
2005-10-30 19:42:18 +00:00
Chris Lattner dd5663dfa0 Reduce the number of copies emitted as machine instructions by
generating results in vregs that will need them.  In the case of something
like this:  CopyToReg((add X, Y), reg1024), we no longer emit code like
this:

   reg1025 = add X, Y
   reg1024 = reg 1025

Instead, we emit:

   reg1024 = add X, Y

Whoa! :)

llvm-svn: 24111
2005-10-30 18:54:27 +00:00
Chris Lattner 5c7d731832 If the module has no t-t and the host is an alpha, default to using the Alpha BE
llvm-svn: 24110
2005-10-30 16:44:01 +00:00
Duraid Madina 57b7ee9da8 fix some broken comparisons, this affected the Pattern isel too.
llvm-svn: 24109
2005-10-30 10:14:19 +00:00
Chris Lattner 48131a8254 The pass was removed, but the spirit lives on
llvm-svn: 24108
2005-10-30 07:22:15 +00:00
Chris Lattner e507a15184 This is implemented
llvm-svn: 24107
2005-10-30 06:42:12 +00:00
Chris Lattner a70878d4fb Codegen mul by negative power of two with a shift and negate.
This implements test/Regression/CodeGen/PowerPC/mul-neg-power-2.ll,
producing:

_foo:
        slwi r2, r3, 1
        subfic r3, r2, 63
        blr

instead of:

_foo:
        mulli r2, r3, -2
        addi r3, r2, 63
        blr

llvm-svn: 24106
2005-10-30 06:41:49 +00:00
Chris Lattner 9cc9f0fca1 new testcase
llvm-svn: 24103
2005-10-30 06:37:33 +00:00
Chris Lattner f0b77f9acc Fix a problem that Nate noticed with LSR:
When inserting code for an addrec expression with a non-unit stride, be
more careful where we insert the multiply.  In particular, insert the multiply
in the outermost loop we can, instead of the requested insertion point.

This allows LSR to notice the mul in the right loop, reducing it when it gets
to it.  This allows it to reduce the multiply, where before it missed it.

This happens quite a bit in the test suite, for example, eliminating 2
multiplies in art, 3 in ammp, 4 in apsi, reducing from 1050 multiplies to
910 muls in galgel (!), from 877 to 859 in applu, and 36 to 30 in bzip2.

This speeds up galgel from 16.45s to 16.01s, applu from 14.21 to 13.94s and
fourinarow from 66.67s to 63.48s.

This implements Transforms/LoopStrengthReduce/nested-reduce.ll

llvm-svn: 24102
2005-10-30 06:24:33 +00:00
Chris Lattner 67315dc888 new testcase
llvm-svn: 24099
2005-10-30 05:14:02 +00:00
Chris Lattner af6b34ff44 Revert an accidental commit.
llvm-svn: 24098
2005-10-29 17:01:41 +00:00
Jeff Cohen 99a71ef891 More files deleted.
llvm-svn: 24097
2005-10-29 16:51:48 +00:00
Chris Lattner 85b184b292 Make -time-passes output prettier
llvm-svn: 24096
2005-10-29 16:45:02 +00:00
Chris Lattner d91df9d941 Make negative immediates in patterns work correctly, silence some warnings
building the itanium backend.

llvm-svn: 24095
2005-10-29 16:39:40 +00:00
Duraid Madina 7abaf906e2 add some FP stuff, some mix.* stuff, and constant pool support to the
DAG instruction selector, which should be destroyed one day (in the pattern
isel also) since ia64 can pack any constant in the instruction stream

llvm-svn: 24094
2005-10-29 16:08:30 +00:00
Chris Lattner 42f905691e Fix <> in html
llvm-svn: 24093
2005-10-29 07:08:19 +00:00
Chris Lattner a69595ee0d First hack-and-slash on the release notes. Comments and improvements welcome
llvm-svn: 24092
2005-10-29 07:07:09 +00:00
Chris Lattner d66c42facb Remove the lowerconstantexprs pass
llvm-svn: 24091
2005-10-29 05:34:40 +00:00
Chris Lattner 27d351f159 This pass is now obsolete since all targets have moved to the SelectionDAG
infrastructure and the simple isels have been removed.

llvm-svn: 24090
2005-10-29 05:33:46 +00:00
Chris Lattner de63fba075 Remove the LowerConstantExpressionsPass pass
llvm-svn: 24089
2005-10-29 05:32:20 +00:00
Chris Lattner dcceae104e remove reference to this pass
llvm-svn: 24088
2005-10-29 05:28:34 +00:00
Chris Lattner 8ad30360cf Basic updates
llvm-svn: 24087
2005-10-29 05:14:01 +00:00
Chris Lattner c86bd2b1cd Buh bye Expression.(cpp|h)
llvm-svn: 24086
2005-10-29 04:55:57 +00:00
Chris Lattner 21193ac3c0 remove a dead file
llvm-svn: 24085
2005-10-29 04:43:38 +00:00
Chris Lattner 29b04e1021 remove a dead header
llvm-svn: 24084
2005-10-29 04:43:10 +00:00
Chris Lattner 752717d4ec Remove dead #include
llvm-svn: 24083
2005-10-29 04:41:30 +00:00
Chris Lattner ceb9d5adaa Now that instcombine does this xform, remove it from the -raise pass
llvm-svn: 24082
2005-10-29 04:40:23 +00:00
Chris Lattner 8f663e8bbc Pull some code out into a function, give it the ability to see through +.
This allows us to turn code like malloc(4*x+4) -> malloc int, (x+1)

llvm-svn: 24081
2005-10-29 04:36:15 +00:00
Duraid Madina c252f33fdb add shladd
llvm-svn: 24080
2005-10-29 04:13:40 +00:00
Duraid Madina e71426f581 test for the formation of shladd
llvm-svn: 24077
2005-10-29 04:06:49 +00:00
Chris Lattner 8270c33606 Remove a special case, allowing the general case to handle it. No functionality
change.

llvm-svn: 24076
2005-10-29 03:19:53 +00:00
Nate Begeman 00cea9b2e0 New case to handle someday
llvm-svn: 24075
2005-10-28 23:26:57 +00:00
Chris Lattner 742606ad30 Switch more code over to using getValueAsListOfDefs. Look at all the -'s. :)
llvm-svn: 24074
2005-10-28 22:59:53 +00:00
Chris Lattner 7ca53a5783 Don't emit "32" for unordered comparison
llvm-svn: 24073
2005-10-28 22:58:07 +00:00
Chris Lattner 7ad0bed89f Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accurately
reflect what it is.
Convert some more code over to use it.

llvm-svn: 24072
2005-10-28 22:49:02 +00:00
Chris Lattner 802bd8d94f Use the new interface Jim added
llvm-svn: 24071
2005-10-28 22:43:25 +00:00
Jim Laskey dffe5978a3 Removed Mr. Smith from the code.
llvm-svn: 24070
2005-10-28 21:47:29 +00:00
Jim Laskey b04feb633f Added method to return a vector of records for a ListInit of Def field. This
simplifies using list of records.

llvm-svn: 24069
2005-10-28 21:46:31 +00:00
Chris Lattner f8899a6877 add a hack to get code with ordered comparisons working. This hack is
tracked as PR642

llvm-svn: 24068
2005-10-28 20:49:47 +00:00
Chris Lattner 5d6cb604de add support for branch on ordered/unordered.
llvm-svn: 24067
2005-10-28 20:32:44 +00:00
Chris Lattner e2fb63ea95 add the xfail lines
llvm-svn: 24066
2005-10-28 19:57:55 +00:00
Chris Lattner 225022e4b0 New testcase. Probably many targets don't support this, so they should probably
add themselves as xfails until they do (at least for the release).

llvm-svn: 24065
2005-10-28 19:52:02 +00:00
Chris Lattner 97d72c80e4 Do not globalize internal symbols
llvm-svn: 24064
2005-10-28 18:44:07 +00:00
Chris Lattner 12fca42062 These are autogenerated
llvm-svn: 24063
2005-10-28 18:26:52 +00:00
Duraid Madina f221c261f3 DAG->DAG instruction selection for ia64! "hello world" works, not much else.
use -enable-ia64-dag-isel to turn this on

TODO: delete lowering stuff from the pattern isel
    : get operations on predicate bits working
    : get other bits of pseudocode going
    : use sampo's mulh/mull-using divide-by-constant magic
    : *so* many patterns ("extr", "tbit" and "dep" will be fun :)
    : add FP
    : add a JIT!
    : get it working 100%

in short: this'll be happier in a couple of weeks, but it's here now so
the tester can make me feel guilty sooner.

OTHER: there are a couple of fixes to the pattern isel, in particular
making the linker happy with big blobs of fun like pypy.

llvm-svn: 24058
2005-10-28 17:46:35 +00:00
Chris Lattner db53c998de The nightly tester report doesn't report JIT code size anymore, remove it
from the olden graph.

llvm-svn: 24057
2005-10-28 16:35:18 +00:00
Chris Lattner b9d3ca5c3c Fix a bit of backwards logic that broke exptree and smg2000
llvm-svn: 24056
2005-10-28 16:27:35 +00:00
Jim Laskey 1959575208 Add some commentary.
llvm-svn: 24055
2005-10-28 15:20:43 +00:00
Chris Lattner 529169cab2 remove dead stuff
llvm-svn: 24054
2005-10-28 04:58:24 +00:00
Chris Lattner e68a807025 Eliminate getClass, it is not needed
llvm-svn: 24053
2005-10-28 04:57:11 +00:00
Jeff Cohen b0aa47b043 Keep Visual Studio happy.
llvm-svn: 24052
2005-10-28 01:43:09 +00:00
Chris Lattner a0dfc67ae6 a bad case for bitfield insert
llvm-svn: 24051
2005-10-28 00:20:45 +00:00
Jim Laskey 86f002cc32 Now generating instruction itineraries for scheduling. Not my best work, but...
llvm-svn: 24050
2005-10-27 19:47:21 +00:00
Jim Laskey 5946b90266 Structures used to hold scheduling information.
llvm-svn: 24049
2005-10-27 18:18:05 +00:00
Chris Lattner 26682519c9 update project file
llvm-svn: 24048
2005-10-27 17:39:48 +00:00
Chris Lattner c4f67e67d2 Do not sink any instruction with side effects, including vaarg. This fixes
PR640

llvm-svn: 24046
2005-10-27 17:13:11 +00:00
Chris Lattner 479911f971 Fix #include order
llvm-svn: 24044
2005-10-27 16:34:00 +00:00
Chris Lattner 525b923a8a unbreak the build again
llvm-svn: 24041
2005-10-27 16:30:44 +00:00
John Criswell 970af11af8 Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes.

llvm-svn: 24038
2005-10-27 16:00:10 +00:00
John Criswell fe5f33b120 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.

llvm-svn: 24036
2005-10-27 15:54:34 +00:00
Chris Lattner 4b6d583d7a Fix DSE to not nuke dead stores unless they redundant store is the same
VT as the killing one.  Fix fixes PR491

llvm-svn: 24034
2005-10-27 07:10:34 +00:00
Chris Lattner c6372cca78 Fix typo
llvm-svn: 24033
2005-10-27 06:26:26 +00:00
Chris Lattner 0fe7551bc0 Teach instcombine to promote stuff like (cast (malloc sbyte, 8*X) to int*)
into: malloc int, (2*X)

llvm-svn: 24032
2005-10-27 06:24:46 +00:00
Chris Lattner b3ecf96900 Promote cases like cast (malloc sbyte, 100) to int* into
(malloc [25 x int]) directly without having to convert to
(malloc [100 x sbyte]) first.

llvm-svn: 24031
2005-10-27 06:12:00 +00:00
Chris Lattner bb17180a23 Minor change to this file to support obscure cases with constant array amounts
llvm-svn: 24030
2005-10-27 05:53:56 +00:00
Chris Lattner d8c5c066a1 Add a simple xform that is useful for bitfield operations.
llvm-svn: 24029
2005-10-27 05:06:38 +00:00
Jeff Cohen 97cbaf5c89 Fine tune Visual Studio's use of bison/flex.
llvm-svn: 24025
2005-10-27 01:10:36 +00:00
Chris Lattner 6d92ce7be7 Make sure to build things in the right order, build with the .o file, not the
.a file to unbreak the build after john's change

llvm-svn: 24024
2005-10-27 00:53:16 +00:00
John Criswell 94b7bea733 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.

llvm-svn: 24023
2005-10-26 20:35:13 +00:00
Andrew Lenharth 381cab36ed int comparison patterns
llvm-svn: 24020
2005-10-26 18:44:45 +00:00
Chris Lattner 3c7974aade Fix some spello's pointed out by Gabor Greif
llvm-svn: 24019
2005-10-26 18:41:41 +00:00
Jim Laskey 75eab3ca63 Typo made worse x 2 - take 2.
llvm-svn: 24018
2005-10-26 18:07:50 +00:00
Chris Lattner f718a9e17b Fix an assert compiling MallocBench/gs
llvm-svn: 24017
2005-10-26 18:01:11 +00:00
Jim Laskey b1f2cedbaa Typo x 2
llvm-svn: 24016
2005-10-26 17:50:22 +00:00
Jim Laskey 777a26efc3 Simplify.
llvm-svn: 24015
2005-10-26 17:49:21 +00:00
Andrew Lenharth 7ac194560e Simplify instinfo, set random bits on more fp insts, and fix 1 opcode
llvm-svn: 24014
2005-10-26 17:41:46 +00:00
Jim Laskey a2b5235fac Give full control of subtarget features over to table generated code.
llvm-svn: 24013
2005-10-26 17:30:34 +00:00
Jim Laskey 53ad110490 Add attribute name and type to SubtargetFeatures.
llvm-svn: 24012
2005-10-26 17:28:23 +00:00
Chris Lattner 38a1b00a0f fold nested and's early to avoid inefficiencies in MaskedValueIsZero. This
fixes a very slow compile in PR639.

llvm-svn: 24011
2005-10-26 17:18:16 +00:00
Chris Lattner f277ac7caa Condcodes are in the ISD namespace
llvm-svn: 24010
2005-10-26 17:02:02 +00:00
Chris Lattner ce9580fce4 Add nodes for CondCodeSDNode and setcc, and add a bunch of pattern fragments
to make it easy to use them.  This lets you write patterns like:

(set PRRC:$rd, (setne GPRC:$rS, imm:$SH))

and stuff.

llvm-svn: 24009
2005-10-26 17:00:25 +00:00
Chris Lattner 611b0c634c Add support for CondCode's
llvm-svn: 24008
2005-10-26 16:59:37 +00:00
Jeff Cohen 821694ada9 Fix comment.
llvm-svn: 24004
2005-10-26 15:02:21 +00:00
Jeff Cohen 9e4c9cdc16 Eliminate use of sed in Visual Studio builds.
llvm-svn: 24003
2005-10-26 14:48:53 +00:00
Jeff Cohen 81560caccf Eliminate need for bison/flex in Visual Studio builds.
llvm-svn: 23999
2005-10-26 05:37:34 +00:00
Jeff Cohen 2b8cbf319c Update Visual Studio projects to reflect moved file.
llvm-svn: 23998
2005-10-26 05:36:51 +00:00
Nate Begeman b2f9801555 Add a regression test for the recent fix for FP_TO_UINT lowering in the ppc
backend.

llvm-svn: 23995
2005-10-25 23:53:21 +00:00
Nate Begeman ff1796534f Add a note about some bitfield stuff we could be doing better.
llvm-svn: 23994
2005-10-25 23:50:02 +00:00
Nate Begeman 762bf809b5 Correctly Expand or Promote FP_TO_UINT based on the capabilities of the
machine.  This allows us to generate great code for i32 FP_TO_UINT now on
targets with 64 bit extensions.

llvm-svn: 23993
2005-10-25 23:48:36 +00:00
Nate Begeman d8f2a1a0f3 Allow custom lowered FP_TO_SINT ops in the check for whether a larger
FP_TO_SINT is preferred to a larger FP_TO_UINT.  This seems to be begging
for a TLI.isOperationCustom() helper function.

llvm-svn: 23992
2005-10-25 23:47:25 +00:00
Chris Lattner 81ff73ec46 autogen undef
llvm-svn: 23991
2005-10-25 21:03:41 +00:00
Chris Lattner 3a4b141e8c Add undef
llvm-svn: 23990
2005-10-25 21:03:14 +00:00
Chris Lattner c967838d79 Add a method
llvm-svn: 23989
2005-10-25 21:02:21 +00:00
Chris Lattner b439dad538 Allow pseudos to have patterns, no functionality change
llvm-svn: 23988
2005-10-25 20:58:43 +00:00
Chris Lattner 261009a4df Autogen fsel
llvm-svn: 23987
2005-10-25 20:55:47 +00:00
Chris Lattner 65845a2f7c Expose the fextend on the DAG instead of doing it in the matcher
llvm-svn: 23986
2005-10-25 20:54:57 +00:00
Chris Lattner cd7f101c9a Autogen a few new ppc-specific nodes
llvm-svn: 23985
2005-10-25 20:41:46 +00:00
Chris Lattner 26ee5953f7 The dag isel generator generates this now
llvm-svn: 23984
2005-10-25 20:36:10 +00:00
Chris Lattner d980c46f52 Emit some boilerplate for targets
llvm-svn: 23983
2005-10-25 20:35:14 +00:00
Chris Lattner c0a201c318 Be a bit more paranoid about calling SelectNodeTo
llvm-svn: 23982
2005-10-25 20:26:41 +00:00
Chris Lattner e1fd05ebde Fix a couple of minor bugs. The first fixes povray, the second fixes things
if the dag combiner isn't run

llvm-svn: 23981
2005-10-25 19:32:37 +00:00
Chris Lattner 3b409a85eb Clear a bit in this file that was causing a miscompilation of 178.galgel.
llvm-svn: 23980
2005-10-25 18:57:30 +00:00
Chris Lattner 64b830bc0c Remove some dead argument names which irritates GCC at certain warning levels.
llvm-svn: 23979
2005-10-25 17:59:28 +00:00
Chris Lattner d22a788d69 Add a missing Module::setTargetTriple method.
Remove Function::aiterator and Module::giterator typedefs (and const versions)
as they should have been removed when abegin/gbegin were removed.  Thanks to
alkis for bringing this to my attn.

llvm-svn: 23978
2005-10-25 17:58:00 +00:00
Chris Lattner 768e272abd analyses after transformations
llvm-svn: 23977
2005-10-25 17:54:19 +00:00
Chris Lattner aad5452c2e transforms before analyses
llvm-svn: 23976
2005-10-25 17:10:30 +00:00
Jim Laskey 1b7369b1ae Refactored to make room for more stuff (scheduling info.)
llvm-svn: 23975
2005-10-25 15:16:36 +00:00
Jim Laskey db4621a5f5 Preparation of supporting scheduling info. Need to find info based on selected
CPU.

llvm-svn: 23974
2005-10-25 15:15:28 +00:00
Alkis Evlogimenos cb67b650b5 Stop using deprecated types
llvm-svn: 23973
2005-10-25 11:18:06 +00:00
John Criswell f23e971627 Updated bytecode version numbers.
llvm-svn: 23972
2005-10-24 17:10:57 +00:00
Jeff Cohen dd24d7c477 Fix spelling of 'separate'.
llvm-svn: 23971
2005-10-24 16:54:55 +00:00
John Criswell 84800c0246 Fixed spelling.
llvm-svn: 23970
2005-10-24 16:47:40 +00:00
John Criswell 6140e5d03c Added a note to remove CVS directories when copying the sample project to
a new project.
Kudos to Rob for suggesting that I add this important step.

llvm-svn: 23969
2005-10-24 16:43:08 +00:00
John Criswell 93c7fff611 Attempt to make terminology more consistent.
llvm-svn: 23968
2005-10-24 16:37:24 +00:00
Chris Lattner 0e18bdff07 Andrew says that alpha basically works
llvm-svn: 23967
2005-10-24 16:36:36 +00:00
John Criswell 2bbe711c88 Fixed a grammar issue.
llvm-svn: 23966
2005-10-24 16:20:10 +00:00
John Criswell 4c0cf7f205 Grammar and punctuation fixes.
llvm-svn: 23965
2005-10-24 16:17:18 +00:00
Jeff Cohen 2448381eb6 Keep Visual Studio up to date.
llvm-svn: 23964
2005-10-24 15:21:58 +00:00
Chris Lattner fc9f5773d0 Fix an incompatibility with GCC 4.1, thanks to Vladimir Merzliakov
for pointing this out!

llvm-svn: 23963
2005-10-24 15:04:15 +00:00
Chris Lattner 76b12c4d95 do not wrap this whole file in namespace llvm
llvm-svn: 23962
2005-10-24 06:38:35 +00:00
Chris Lattner 46705b2f2d Handle allocations that, even after removing dead uses, still have more than
one use (but one is a cast).  This handles the very common case of:

 X = alloc [n x byte]
 Y = cast X to somethingbetter
 seteq X, null

In order to avoid infinite looping when there are multiple casts, we only
allow this if the xform is strictly increasing the alignment of the
allocation.

llvm-svn: 23961
2005-10-24 06:35:18 +00:00
Chris Lattner 355ecc09f8 Fix a bug where we would 'promote' an allocation from one type to another
where the second has less alignment required.  If we had explicit alignment
support in the IR, we could handle this case, but we can't until we do.

llvm-svn: 23960
2005-10-24 06:26:18 +00:00
Chris Lattner ac87beb03a Before promoting a malloc type, remove dead uses. This makes instcombine
more effective at promoting these allocations, catching them earlier in the
compile process.

llvm-svn: 23959
2005-10-24 06:22:12 +00:00
Chris Lattner 216be91817 Pull some code out into a function, no functionality change
llvm-svn: 23958
2005-10-24 06:03:58 +00:00
Chris Lattner e175996c9a Move the END_WITH_NULL marker. Vladimir suggests that this works better with
GCC 4.1.  I tried it with 4.0 and 3.3 and it seems fine.

llvm-svn: 23957
2005-10-24 05:03:46 +00:00
Chris Lattner 2a65d7b633 Make this build with GCC 4.1, patch contributed by Vladimir A. Merzliakov!
llvm-svn: 23956
2005-10-24 04:51:35 +00:00
Chris Lattner b8709e3c25 This pass is gone
llvm-svn: 23955
2005-10-24 04:18:05 +00:00
Chris Lattner 629481c8e0 this pass is gone
llvm-svn: 23954
2005-10-24 04:17:31 +00:00
Chris Lattner 62534530f6 This RA no longer exists
llvm-svn: 23953
2005-10-24 04:15:09 +00:00
Chris Lattner 476b8ddd55 Alkis agrees that that iterative scan allocator isn't going to be worked on
in the future, remove it.

llvm-svn: 23952
2005-10-24 04:14:30 +00:00
Chris Lattner 5cf068a5b7 Remove a prototype
llvm-svn: 23951
2005-10-24 04:13:21 +00:00
Jeff Cohen 68e320ccd6 Update Visual Studio projects to account for recent changes.
llvm-svn: 23950
2005-10-24 02:57:24 +00:00
Chris Lattner 90b0c99066 Remove this pass, it is not useful
llvm-svn: 23949
2005-10-24 02:35:43 +00:00
Chris Lattner 43143d9fe8 This pass is very old and quite useless, remove it.
llvm-svn: 23946
2005-10-24 02:35:24 +00:00
Chris Lattner 7f37ab41ee Three of these have been removed, as warned
llvm-svn: 23945
2005-10-24 02:33:44 +00:00
Chris Lattner b37336978f Remove some beta code that no longer has an owner.
llvm-svn: 23944
2005-10-24 02:32:41 +00:00
Chris Lattner f9998d9704 Do not build the ProfilePaths directory anymore
llvm-svn: 23943
2005-10-24 02:31:49 +00:00
Chris Lattner 788318cb69 Remove a now-unneeded library
llvm-svn: 23942
2005-10-24 02:31:05 +00:00
Chris Lattner 496a666266 Don't link these three passes in anymore
llvm-svn: 23941
2005-10-24 02:30:25 +00:00
Chris Lattner bde3845548 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Chris Lattner 1b91cbd627 Now that all libraries are built in either .o or .a form, make BUILD_ARCHIVE
default to turning off building of relinked objects.

llvm-svn: 23939
2005-10-24 02:21:45 +00:00
Chris Lattner df88d79c08 only build .a version of this library
llvm-svn: 23938
2005-10-24 02:14:49 +00:00
Chris Lattner f07e354d8c Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.

llvm-svn: 23937
2005-10-24 02:11:51 +00:00
Chris Lattner 437b6116c9 There is no need to build an archive version of this library
llvm-svn: 23936
2005-10-24 02:09:03 +00:00
Chris Lattner 87d4e1c130 This file is hopelessly out of date
llvm-svn: 23935
2005-10-24 02:07:08 +00:00
Chris Lattner 1e050bd88b Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.

llvm-svn: 23934
2005-10-24 02:05:35 +00:00
Chris Lattner 8c087e962c Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.

llvm-svn: 23933
2005-10-24 01:59:48 +00:00
Chris Lattner c64f3de8d5 use archives when possible
llvm-svn: 23932
2005-10-24 01:52:15 +00:00
Chris Lattner bd77fac034 Make sure that anything using the ADCE pass pulls in the UnifyFunctionExitNodes
code

llvm-svn: 23931
2005-10-24 01:40:23 +00:00
Chris Lattner 8788942988 pull in the .a version of scalaropts lib to reduce the size of programs
using the JIT

llvm-svn: 23930
2005-10-24 01:15:14 +00:00
Chris Lattner 2a5442f365 pull in the archive version of this lib to reduce exe size
llvm-svn: 23929
2005-10-24 01:13:21 +00:00
Chris Lattner f4d2a4b3bf Pull in the archive versions of these libs to reduce executable size
llvm-svn: 23928
2005-10-24 01:12:14 +00:00
Chris Lattner 8df7c01299 don't bother building the archive version of this library
llvm-svn: 23927
2005-10-24 01:08:20 +00:00
Chris Lattner 1f001771b2 Link in datastructure as a relinked o file
llvm-svn: 23926
2005-10-24 01:07:56 +00:00
Chris Lattner 652ce549ec Link to archive versions of libraries instead of the relinked ones
llvm-svn: 23925
2005-10-24 01:05:53 +00:00
Chris Lattner ca014adf8e expose a ctor
llvm-svn: 23924
2005-10-24 01:00:45 +00:00
Chris Lattner 71a15b5b83 add a proto
llvm-svn: 23923
2005-10-24 01:00:32 +00:00
Chris Lattner 8f16bb6c3c Use the new LinkAllAnalyses.h header instead of forcing passes to be
in relinked object files

llvm-svn: 23922
2005-10-24 01:00:13 +00:00
Chris Lattner 1c5b428ff8 new header
llvm-svn: 23921
2005-10-24 00:59:49 +00:00
Chris Lattner 75d4f6fbcb implement some prototypes
llvm-svn: 23920
2005-10-24 00:38:38 +00:00
Chris Lattner 2a40d3aa90 add some prototypes
llvm-svn: 23919
2005-10-24 00:38:25 +00:00
Chris Lattner b45e57c2dd move this to the analyze tool
llvm-svn: 23918
2005-10-24 00:27:36 +00:00
Chris Lattner edfdf36c69 Don't invade the system namespace
llvm-svn: 23917
2005-10-24 00:16:03 +00:00
Chris Lattner 672471fbed Use archive versions of these libraries, using the LinkAllPasses header.
llvm-svn: 23916
2005-10-24 00:12:20 +00:00
Chris Lattner 63e504ff43 There is no need for this to be VC++ only
llvm-svn: 23915
2005-10-24 00:08:51 +00:00
Chris Lattner a551033ea8 Fix a nasty bug that was causing miscompilation of global variables
on big endian 32-bit targets in some cases (e.g. PPC).  This fixes several
PPC JIT failures.

llvm-svn: 23914
2005-10-23 23:54:56 +00:00
Chris Lattner ac23014355 Shrinkify to match llc
llvm-svn: 23912
2005-10-23 22:39:01 +00:00
Chris Lattner 41548484f4 Shrinkify to make --help output look better
llvm-svn: 23911
2005-10-23 22:37:13 +00:00
Chris Lattner 0b2bf4c255 shrinkify the option name a bit
llvm-svn: 23910
2005-10-23 22:35:42 +00:00
Chris Lattner d36c34822e Simplify this, matching changes in the tblgen emitter
llvm-svn: 23909
2005-10-23 22:34:25 +00:00
Chris Lattner 03bf3a1763 Simplify this due to changes in the tblgen side
llvm-svn: 23908
2005-10-23 22:33:22 +00:00
Chris Lattner 4f48e67c6c Add the needed #include, emit enums with the sizes of tables, remove
definitions from the LLVM namespace, since they are all static.

llvm-svn: 23907
2005-10-23 22:33:08 +00:00
Chris Lattner abcce5c4b3 mark this as beta
llvm-svn: 23906
2005-10-23 22:23:45 +00:00
Chris Lattner 8ff9df29a9 If a user requests help, give them help on both features and processors
llvm-svn: 23905
2005-10-23 22:23:13 +00:00
Chris Lattner 766361e8f4 Autogen subtarget information from .td files.
llvm-svn: 23904
2005-10-23 22:15:34 +00:00
Chris Lattner 4b5921d4d8 Add subtarget feature/processor defns to the .td file
llvm-svn: 23903
2005-10-23 22:08:45 +00:00
Chris Lattner a389f0d8fa rearrange things a bit so that instructions can use subtarget features in the
future.

llvm-svn: 23902
2005-10-23 22:08:13 +00:00
Chris Lattner 437fd559d7 add a marker
llvm-svn: 23901
2005-10-23 22:07:20 +00:00
Chris Lattner b54070745e add a note that Nate mentioned last week
llvm-svn: 23898
2005-10-23 21:44:59 +00:00
Chris Lattner 2e81fba9cd Put some of my random notes somewhere public
llvm-svn: 23897
2005-10-23 19:52:42 +00:00
Jeff Cohen b92e9c57d5 Work around GCC's dislike of attributes on function definitions.
llvm-svn: 23896
2005-10-23 15:22:50 +00:00
Jeff Cohen c55b4cd773 Remove deleted files from Visual Studio.
llvm-svn: 23895
2005-10-23 15:21:52 +00:00
Chris Lattner 49f7b69997 Remove the obsolete instr selector emitter
llvm-svn: 23894
2005-10-23 05:47:52 +00:00
Chris Lattner f64f8407c2 Improve help output.
llvm-svn: 23893
2005-10-23 05:33:39 +00:00
Chris Lattner 0d4923b975 improve -help output
llvm-svn: 23892
2005-10-23 05:28:51 +00:00
Chris Lattner 18a70c35b8 Move static functions from .h file, reduce #includes, pass strings by const&,
use LowercaseString from StringExtras.h, remove extraneous space from help
output.

llvm-svn: 23891
2005-10-23 05:26:26 +00:00
Chris Lattner e70c297044 Move static functions to .cpp file, reduce #includes, pass strings by
const&.

llvm-svn: 23890
2005-10-23 05:25:19 +00:00
Jeff Cohen 8b7b47ca88 Remove redundant flag.
llvm-svn: 23889
2005-10-23 04:51:22 +00:00
Jeff Cohen 11e26b52b2 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Andrew Lenharth c6072af580 Add several things.
loads
branches
setcc
working calls
Global address
External addresses

now I can manage malloc calls.

llvm-svn: 23887
2005-10-23 03:43:48 +00:00
Andrew Lenharth 4b3932aa89 add TargetExternalSymbol
llvm-svn: 23886
2005-10-23 03:40:17 +00:00
Jeff Cohen 5ec46cdf5c Add new files to Visual Studio.
llvm-svn: 23885
2005-10-23 01:22:33 +00:00
Andrew Lenharth 5a990417f8 Well, the Constant matching pattern works. Can't say much about calls or globals yet.
llvm-svn: 23884
2005-10-22 22:06:58 +00:00
Chris Lattner 711a5fe009 document this as experimental
llvm-svn: 23883
2005-10-22 22:00:45 +00:00
Chris Lattner 42b3a5d596 This file is entirely ifdef'd out
llvm-svn: 23882
2005-10-22 19:37:08 +00:00
Chris Lattner 9faa5b7a9a BuildSDIV and BuildUDIV only work for i32/i64, but they don't check that
the input is that type, this caused a failure on gs on X86 last night.
Move the hard checks into Build[US]Div since that is where decisions like
this should be made.

llvm-svn: 23881
2005-10-22 18:50:15 +00:00
Jim Laskey 13a19453d2 Add g3 back to the mix and reorder to irritate them anal folk. Actually, it's
to group appropriately and provide cues to maintainers that the lists don't
need to be ordered.

llvm-svn: 23880
2005-10-22 08:04:24 +00:00
Jim Laskey a1beea6c7d Sort the features and processor lists for the sake of search (and maintainers.)
llvm-svn: 23879
2005-10-22 07:59:56 +00:00
Chris Lattner c5d511c4d9 64-bit reg support should not be enabled by default, as support isn't complete.
llvm-svn: 23878
2005-10-21 22:15:43 +00:00
Chris Lattner 75ea5b10bf add a case missing from the dag combiner that exposed the failure on
2005-10-21-longlonggtu.ll.

llvm-svn: 23875
2005-10-21 21:23:25 +00:00
Chris Lattner e296949fbe Instead of aborting if not a case we can handle specially, break out and
let the generic code handle it.  This fixes CodeGen/Generic/2005-10-21-longlonggtu.ll on ppc.

also, reindent this code

llvm-svn: 23874
2005-10-21 21:17:10 +00:00
Chris Lattner 68b61a8c8f New testcase that crashes the ppc backend
llvm-svn: 23871
2005-10-21 21:09:13 +00:00
Jim Laskey 9ed9032e22 Plugin new subtarget backend into the build.
llvm-svn: 23870
2005-10-21 19:05:19 +00:00
Jim Laskey cfda85ad91 New TableGen backends for subtarget information. Only command line stuff
active now.  Scheduling itinerary next.

llvm-svn: 23869
2005-10-21 19:00:04 +00:00
Chris Lattner 229878b7bc silence a release mode warning
llvm-svn: 23868
2005-10-21 16:01:26 +00:00
Chris Lattner c82a034580 add missing prototype
llvm-svn: 23867
2005-10-21 15:49:28 +00:00
Chris Lattner e95b5745c0 Make the coallescer a bit smarter, allowing it to join more live ranges.
For example, we can now join things like [0-30:0)[31-40:1)[52-59:2)
with [40:60:0) if the 52-59 range is defined by a copy from the 40-60 range.
The resultant range ends up being [0-30:0)[31-60:1).

This fires a lot through-out the test suite (e.g. shrinking bc from
19492 -> 18509 machineinstrs) though most gains are smaller (e.g. about
50 copies eliminated from crafty).

llvm-svn: 23866
2005-10-21 06:49:50 +00:00
Chris Lattner 76c97afbbc Fix LiveInterval::getOverlapingRanges to take things in the right order
(an unused method).

Fix the merger so that it can merge ranges like this  [10:12)[16:40) with
[12:38) into [10:40) instead of bogus ranges.  This sort of input will be
possible for the merger coming shortly

llvm-svn: 23865
2005-10-21 06:41:30 +00:00
Nate Begeman fd0d55ec69 Match rotate. This does actually match the rotates in an rc5 cipher, but I
haven't seen it fire on our testsuite.

llvm-svn: 23863
2005-10-21 06:36:18 +00:00
Chris Lattner 5df0e36e98 My previous patch was too conservative. Reject FP and void types, but do
allow pointer types.

llvm-svn: 23859
2005-10-21 05:45:41 +00:00
Nate Begeman ae5d9bd65b Don't generate operations that aren't yet supported
llvm-svn: 23858
2005-10-21 01:52:45 +00:00
Nate Begeman 62e9e5462c Kill some now-dead code.
llvm-svn: 23857
2005-10-21 01:52:20 +00:00
Nate Begeman 8f62cd32ad Fix a typo in the dag combiner, so that this can work on i64 targets
llvm-svn: 23856
2005-10-21 01:51:45 +00:00
Andrew Lenharth a099c0131e byte zap not immediate goodness
llvm-svn: 23855
2005-10-21 01:24:05 +00:00
Chris Lattner 8bda5afd91 Make tblgen emit:
tblgen: In ZAPNOTi: Cannot use 'IZAPX' in an input pattern!
for a bad pattern, instead of an ugly assertion.

llvm-svn: 23854
2005-10-21 01:19:59 +00:00
Nate Begeman 4dd383120f Invert the TargetLowering flag that controls divide by consant expansion.
Add a new flag to TargetLowering indicating if the target has really cheap
  signed division by powers of two, make ppc use it.  This will probably go
  away in the future.
Implement some more ISD::SDIV folds in the dag combiner
Remove now dead code in the x86 backend.

llvm-svn: 23853
2005-10-21 00:02:42 +00:00
Andrew Lenharth a6a23b5874 Inst cleanup. As a bonus, operands are in the correct order for cmovs. Expect new stuff to pass in the JIT tonight
llvm-svn: 23852
2005-10-20 23:58:36 +00:00
Chris Lattner a553780e98 Use a literal to define ineg instead of immzero
llvm-svn: 23851
2005-10-20 23:30:37 +00:00
Chris Lattner b7b75e1b68 Fix a conditional so we don't access past the end of the range. Thanks to
Andrew for bringing this to my attn.

llvm-svn: 23850
2005-10-20 22:50:10 +00:00
Andrew Lenharth d4c0ed74e4 added a few 1 operand form stuff. Seems to break regalloc on alpha. sigh
llvm-svn: 23849
2005-10-20 19:39:24 +00:00
Andrew Lenharth 7e0e8234f6 add cttz and ctpop
llvm-svn: 23848
2005-10-20 19:38:11 +00:00
Nate Begeman 7efe53d90b Fix a couple bugs in the const div stuff where we'd generate MULHS/MULHU
for types that aren't legal, and fail a divisor is less than zero
comparison, which would cause us to drop a subtract.

llvm-svn: 23846
2005-10-20 17:45:03 +00:00
Chris Lattner a6efeb01f9 don't use llabs with apparently VC++ doesn't have
llvm-svn: 23845
2005-10-20 17:01:00 +00:00
Chris Lattner 35852fc391 Fix order of eval problem from when I refactored this into a function.
llvm-svn: 23844
2005-10-20 16:56:40 +00:00
Andrew Lenharth eb0ad1863b Sounds good, finish the intop conversion.
llvm-svn: 23843
2005-10-20 14:42:48 +00:00
Nate Begeman 60bbe2d1e5 Add some more patterns for i64 on ppc
llvm-svn: 23842
2005-10-20 07:51:08 +00:00
Chris Lattner 3cf40798ab add a new method, play around with some code.
Fix a *bug* in the extendIntervalEndTo method.  In particular, if adding
[2:10) to an interval containing [0:2),[10:30), we produced [0:10),[10,30).
Which is not the most smart thing to do.  Now produce [0:30).

llvm-svn: 23841
2005-10-20 07:39:25 +00:00
Chris Lattner 6380f3c96d add a new method
llvm-svn: 23840
2005-10-20 07:37:59 +00:00
Chris Lattner 8816353040 Refactor some code, pulling it out into a function. No functionality change.
llvm-svn: 23839
2005-10-20 06:06:30 +00:00
Chris Lattner 0c0b38bb4c Do NOT touch FP ops with LSR. This fixes a testcase Nate sent me from an
inner loop like this:

LBB_RateConvertMono8AltiVec_2:  ; no_exit
        lis r2, ha16(.CPI_RateConvertMono8AltiVec_0)
        lfs f3, lo16(.CPI_RateConvertMono8AltiVec_0)(r2)
        fmr f3, f3
        fadd f0, f2, f0
        fadd f3, f0, f3
        fcmpu cr0, f3, f1
        bge cr0, LBB_RateConvertMono8AltiVec_2  ; no_exit

to an inner loop like this:

LBB_RateConvertMono8AltiVec_1:  ; no_exit
        fsub f2, f2, f1
        fcmpu cr0, f2, f1
        fmr f0, f2
        bge cr0, LBB_RateConvertMono8AltiVec_1  ; no_exit

Doh! good catch!

llvm-svn: 23838
2005-10-20 04:47:10 +00:00
Chris Lattner fd07fcda67 Add some pattern fragments to simplify the repetitive parts of the patterns
for some common ops and use them for a few examples.  Andrew, if you like
this, feel free to convert the rest over, if you hate it, feel free to
revert.

llvm-svn: 23837
2005-10-20 04:21:06 +00:00
Chris Lattner cd4be8798f simplify this a bit by using immediates
llvm-svn: 23836
2005-10-20 03:57:03 +00:00
Nate Begeman c6f067a8c4 Move the target constant divide optimization up into the dag combiner, so
that the nodes can be folded with other nodes, and we can not duplicate
code in every backend.  Alpha will probably want this too.

llvm-svn: 23835
2005-10-20 02:15:44 +00:00
Nate Begeman 5765717aad Enable targets to say that integer divide is expensive, which will trigger
an upcoming optimization in the DAG Combiner.

llvm-svn: 23834
2005-10-20 02:14:14 +00:00
Andrew Lenharth 794f15868a forgot this one
llvm-svn: 23833
2005-10-20 00:29:02 +00:00
Andrew Lenharth 7b69867052 ret 0; works, not much else
still lots of uglyness.
Maybe calls will come soon.
Fixing the return value of things will be necessary to make alpha work.

llvm-svn: 23832
2005-10-20 00:28:31 +00:00
John Criswell 196e8c1f58 This fixes PR638:
Regression/CodeGen/Generic/2004-02-08-UnwindSupport.llx

llvm-svn: 23831
2005-10-19 20:07:15 +00:00
Jim Laskey 74ab9960f2 Added InstrSchedClass to each of the PowerPC Instructions.
Note that when adding new instructions that you should refer to the table at the
bottom of PPCSchedule.td.

llvm-svn: 23830
2005-10-19 19:51:16 +00:00
John Criswell b2544ff7a7 Moved to Regression/Codegen/Generic.
llvm-svn: 23829
2005-10-19 18:52:52 +00:00
John Criswell 14582b1a73 This is a generic test for all code generators. It originally came from
Regression/Codegen/X86.

llvm-svn: 23826
2005-10-19 18:51:07 +00:00
Nate Begeman 9f3c26c4ea Write patterns for the various shl and srl patterns that don't involve
doing something clever.

llvm-svn: 23824
2005-10-19 18:42:01 +00:00
John Criswell 6b7df0ef4e Force i386 code generation for an i386 specific test.
llvm-svn: 23821
2005-10-19 18:30:39 +00:00
Jim Laskey 9761100055 Push processor descriptions to the top of target and add command line info.
llvm-svn: 23820
2005-10-19 13:34:52 +00:00
Chris Lattner c9ad735e78 add support for literal immediates in patterns to match, allowing us to
write things like this:

def : Pat<(add GPRC:$in, 12),
          (ADD12 GPRC:$in)>;

Andrew: if this isn't enough or doesn't work for you, please lemme know.
llvm-svn: 23819
2005-10-19 04:41:05 +00:00
Chris Lattner c16b0c387f now that tblgen is smarter, use integers directly. This should help Andrew too
llvm-svn: 23818
2005-10-19 04:32:04 +00:00
Chris Lattner 7f6f565846 Add basic support for integer constants in pattern results.
llvm-svn: 23817
2005-10-19 04:30:56 +00:00
Chris Lattner 2ae2f99326 Fix some checking that was causing duraid to get a perplexing assertion
instead of a happy error message

llvm-svn: 23816
2005-10-19 04:12:14 +00:00
Chris Lattner b8014e10ae Add support for patterns that have physical registers in them. Testcase:
def : Pat<(trunc G8RC:$in),
          (OR8To4 G8RC:$in, X0)>;

Even though this doesn't make any sense on PPC :)

llvm-svn: 23815
2005-10-19 02:07:26 +00:00
Chris Lattner c8f899f98d Asserting here is to violent
llvm-svn: 23814
2005-10-19 01:55:23 +00:00
Chris Lattner 5f37623218 teach ppc backend these are copies
llvm-svn: 23813
2005-10-19 01:50:36 +00:00
Chris Lattner 62041778e6 Make this work with the internalize change
llvm-svn: 23812
2005-10-19 01:41:47 +00:00