Nate Begeman
69742e6ea1
Make 64bit args and float args work correct with calls. Thanks to Chris
...
for explaining EXTRACT_ELEMENT to me.
llvm-svn: 20847
2005-03-26 02:17:46 +00:00
Nate Begeman
f821401825
Change interface to LowerCallTo to take a boolean isVarArg argument.
...
llvm-svn: 20842
2005-03-26 01:29:23 +00:00
Nate Begeman
d3b5925b38
Next round of pattern isel changes, mostly dealing with calls.
...
llvm-svn: 20841
2005-03-26 01:28:53 +00:00
Nate Begeman
4106e81966
Correct a documention link
...
llvm-svn: 20840
2005-03-26 01:28:05 +00:00
Nate Begeman
ba1cd37734
Support global addresses and fix call returns. Varargs still aren't
...
handled correctly for floating point arguments, or more than 8 arguemnts.
This does however, allow hello world to run.
llvm-svn: 20832
2005-03-25 08:34:25 +00:00
Nate Begeman
6b11098886
Implement next round of Pattern ISel fixes
...
1. void returns
2. multiplies
3. calls
llvm-svn: 20822
2005-03-24 23:35:30 +00:00
Nate Begeman
613e54d5f0
Fix an incorrect argument being passed to BuildMI for indirect calls.
...
llvm-svn: 20821
2005-03-24 23:34:38 +00:00
Nate Begeman
4584ca0554
Commit Gabor Greif's patch to use iterators in lowering intrinsics.
...
llvm-svn: 20816
2005-03-24 20:07:16 +00:00
Chris Lattner
ad07b1bc54
eliminate dead variables, patch contributed by Gabor Greif!
...
llvm-svn: 20812
2005-03-24 17:32:20 +00:00
Nate Begeman
833c1d0994
Implement more of the PPC32 Pattern ISel:
...
1) dynamic stack alloc
2) loads
3) shifts
4) subtract
5) immediate form of add, and, or, xor
6) change flag from -pattern-isel to -enable-ppc-pattern-isel
Remove dead arguments from getGlobalBaseReg in the simple ISel
llvm-svn: 20810
2005-03-24 06:28:42 +00:00
Chris Lattner
a42c4a0874
Fix silly "no newline at end of file" warning
...
llvm-svn: 20809
2005-03-24 06:16:18 +00:00
Chris Lattner
56f3525a1d
Fix compilation errors, patch contributed by the fabulous Bill Wendling!
...
llvm-svn: 20808
2005-03-24 05:13:53 +00:00
Chris Lattner
2e2035aa72
fix a compilation error, patch contributed by Bill Wendling!
...
llvm-svn: 20807
2005-03-24 05:12:48 +00:00
Nate Begeman
0e77845b7e
Addition of the PPC32 Pattern ISel. While it is far from complete, it will
...
be brought up to parity with the current simple ISel in the coming days.
Currently, -pattern-isel is required to trigger it.
llvm-svn: 20805
2005-03-24 04:41:43 +00:00
Nate Begeman
175a9f1cc6
Remove comments that are now meaningless from the pattern ISels, at Chris's
...
request.
llvm-svn: 20804
2005-03-24 04:39:54 +00:00
Andrew Lenharth
b1bd2e2900
don't lie to the register allocator
...
llvm-svn: 20784
2005-03-23 15:20:01 +00:00
Tanya Lattner
d7b8fb8263
Added alias analysis.
...
Fixed many many bugs.
This now works on almost all Singlesource , and most of MultiSource.
llvm-svn: 20780
2005-03-23 01:47:20 +00:00
Andrew Lenharth
61312ca088
hum, it is good to use real instructions
...
llvm-svn: 20769
2005-03-22 16:42:52 +00:00
Andrew Lenharth
5bd65ee784
two things: 1)evilness reduction patch, reduces the number of instructions hiding in the small jump CC moving code. 2)implement div of small data types by FP DIV (also reduces evilness and should speed things up)
...
llvm-svn: 20756
2005-03-22 00:24:07 +00:00
Misha Brukman
04d6d0666d
We may be adding functions to the Module during initialization, so
...
conservatively, it's modified
llvm-svn: 20735
2005-03-21 19:22:14 +00:00
Tanya Lattner
156e5a6897
Make this method non-const. Making it const causes the const version of
...
getIGroup to be called instead of the non-const one. These two methods
have (??) different behavior, so this change fixes bugs.
llvm-svn: 20724
2005-03-21 06:07:43 +00:00
Chris Lattner
f53c9e2578
Fix the 3 regressions last night, due to my buggy patch from yesterday.
...
llvm-svn: 20689
2005-03-19 17:35:11 +00:00
Alkis Evlogimenos
d8f23f17f0
Stop using deprecated interface.
...
llvm-svn: 20679
2005-03-19 09:22:17 +00:00
Chris Lattner
35084f46a3
remove use of getPrev() and getNext() on ilist nodes.
...
llvm-svn: 20673
2005-03-18 16:12:37 +00:00
Duraid Madina
ad26d89f4a
typo/denial
...
llvm-svn: 20663
2005-03-17 20:23:27 +00:00
Duraid Madina
341917d75b
clean up warnings when building in release mode
...
llvm-svn: 20658
2005-03-17 19:00:40 +00:00
Duraid Madina
0b84eec44b
OK, IA64 is statically linked into llc
...
llvm-svn: 20655
2005-03-17 18:37:05 +00:00
Duraid Madina
08bd58412a
build the IA64 target as a .so for now
...
llvm-svn: 20654
2005-03-17 18:29:04 +00:00
Duraid Madina
79022e1b87
and so it begins...
...
PHASE 1: write instruction selector
PHASE 2: ???
PHASE 3: profit!
llvm-svn: 20652
2005-03-17 18:17:03 +00:00
Chris Lattner
79ba9d58fd
Don't emit two comparisons when comparing a FP value against zero!
...
llvm-svn: 20651
2005-03-17 16:29:26 +00:00
Chris Lattner
c9a3ea81bf
Fix the missing symbols problem Bill was hitting. Patch contributed by
...
Bill Wendling!!
llvm-svn: 20649
2005-03-17 15:38:16 +00:00
Andrew Lenharth
fbcfef1558
sure, I can set a flag, but if I never check it, why bother setting it? Should fix 20 programs :)
...
llvm-svn: 20623
2005-03-15 19:51:19 +00:00
Chris Lattner
7a9186cb47
stop using arg_front
...
llvm-svn: 20599
2005-03-15 05:03:36 +00:00
Chris Lattner
33f53a1f4f
stop using arg_back
...
llvm-svn: 20598
2005-03-15 04:59:17 +00:00
Chris Lattner
4b688a1c70
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Andrew Lenharth
e367587fbb
FP 0.0 setcc optimization, and generate short branch sequence for setcc(FP) rather than stack usage
...
llvm-svn: 20589
2005-03-14 19:23:45 +00:00
Chris Lattner
112de16cf5
add a StructLayout::getElementContainingOffset method.
...
llvm-svn: 20579
2005-03-13 19:04:41 +00:00
Andrew Lenharth
abe4fd6c68
Should fix mesa
...
llvm-svn: 20577
2005-03-13 00:43:20 +00:00
Andrew Lenharth
d289be2b54
remove a pseudo instruction and improve inline constant generation
...
llvm-svn: 20563
2005-03-11 17:48:05 +00:00
Andrew Lenharth
1060a5028d
some typoes and .bss isn't liked, at all
...
llvm-svn: 20542
2005-03-10 19:02:02 +00:00
Andrew Lenharth
65ef5bced7
minor correction for Register that isn't used
...
llvm-svn: 20535
2005-03-09 20:48:23 +00:00
Chris Lattner
496d623600
Fix a crash handling 'undef bool', fixing an llc crash on 186.crafty
...
llvm-svn: 20523
2005-03-08 22:53:09 +00:00
Reid Spencer
b0ca4aa8cd
Patch to make assembly output compatible with mingw compilation (identical
...
to cygwin)
llvm-svn: 20520
2005-03-08 17:02:05 +00:00
Chris Lattner
667186f10f
Make sure to remove all dead type names from the symbol table, not just
...
struct types. This fixes Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll,
a crash on Java output that Alkis reported.
llvm-svn: 20519
2005-03-08 16:19:59 +00:00
Misha Brukman
e29de97ab7
Single characters should be printed out as chars, not strings.
...
llvm-svn: 20515
2005-03-08 00:26:08 +00:00
Chris Lattner
a518cf568a
simplify some code.
...
llvm-svn: 20471
2005-03-06 02:28:23 +00:00
Chris Lattner
f70d80d026
don't break the build on 32-bit hosts.
...
llvm-svn: 20455
2005-03-05 17:47:38 +00:00
Andrew Lenharth
ee4072f980
fix data size stuff for architectures with bit challenged data types
...
llvm-svn: 20453
2005-03-05 15:30:33 +00:00
Andrew Lenharth
ad4380f06e
fix up stack pointer adjustments
...
llvm-svn: 20442
2005-03-04 21:40:02 +00:00
Andrew Lenharth
458e6bcf28
fix FCMOVxx typo, set rem and div to hardcode target reg to be the same as the one the assembler uese, update ISel to put values in regs used by assembler for rem and div
...
llvm-svn: 20434
2005-03-04 20:09:23 +00:00
Andrew Lenharth
e831777542
turn on IEEE for compares
...
llvm-svn: 20425
2005-03-03 22:12:11 +00:00
Andrew Lenharth
e6dbf989b3
beter Select on FP
...
llvm-svn: 20424
2005-03-03 21:47:53 +00:00
Chris Lattner
4439f1686f
Print -X like this:
...
double test(double l1_X) {
return (-l1_X);
}
instead of like this:
double test(double l1_X) {
return (-0x0p+0 - l1_X);
}
llvm-svn: 20423
2005-03-03 21:12:04 +00:00
Andrew Lenharth
b5ddbc074d
LSR cleanup patch
...
llvm-svn: 20422
2005-03-03 19:03:21 +00:00
Chris Lattner
8074739aa2
Do not lower malloc's to pass "sizeof" expressions like this:
...
ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u]))));
Instead, just emit the literal constant, like this:
ltmp_0_7 = malloc(784u);
This works around a bug in ICC 8.1 compiling the CBE generated code. :-(
llvm-svn: 20415
2005-03-03 01:04:50 +00:00
Chris Lattner
b205d87afe
cleanup the cfg after lsr
...
llvm-svn: 20410
2005-03-02 21:56:00 +00:00
Andrew Lenharth
1e213c7924
remove 32 sign extend after 32 sextload and handle small negative constant
...
llvm-svn: 20408
2005-03-02 17:23:03 +00:00
Andrew Lenharth
8fc5ba2e06
Added LSR as a beta pass for alpha
...
llvm-svn: 20407
2005-03-02 17:21:38 +00:00
Chris Lattner
798b18474c
Add a temporary option for llc-beta: -enable-lsr-for-ppc, which turns on
...
Loop Strength Reduction.
llvm-svn: 20399
2005-03-02 06:19:22 +00:00
Chris Lattner
9d57998cda
Remove tabs from file.
...
llvm-svn: 20380
2005-02-28 19:36:15 +00:00
Chris Lattner
b2720f5b57
Add support to the C backend for llvm.prefetch. Patch contributed by
...
Justin Wick!
llvm-svn: 20378
2005-02-28 19:29:46 +00:00
Andrew Lenharth
7dc9ea9509
fix integer division and stuff
...
llvm-svn: 20372
2005-02-28 17:22:18 +00:00
Chris Lattner
a024984017
Fix spelling, patch contributed by Gabor Greif!
...
llvm-svn: 20343
2005-02-27 06:18:25 +00:00
Andrew Lenharth
b5331ffe0f
make BB labels be exported for debuging, add fp negation optimization, further pecimise the FP instructions
...
llvm-svn: 20332
2005-02-25 22:55:15 +00:00
Andrew Lenharth
ef5f87784b
fix Allocas. Really. I mean it this time.
...
llvm-svn: 20306
2005-02-24 18:36:32 +00:00
Tanya Lattner
b640bb0d88
Only print out machine instructions before modulo scheduling if we are actually doing modulo scheduling! :)
...
llvm-svn: 20292
2005-02-24 02:14:44 +00:00
Andrew Lenharth
69a8320c0d
Ah the problems you have to fix when you stray from the One True Way (TM)
...
llvm-svn: 20290
2005-02-23 17:33:42 +00:00
Chris Lattner
9838ab1271
Silence some uninit variable warnings.
...
llvm-svn: 20284
2005-02-23 05:57:21 +00:00
Tanya Lattner
a981a711aa
Fixed bug in findAllcircuits. Fixed branch addition to schedule. Added debug information.
...
llvm-svn: 20280
2005-02-23 02:01:42 +00:00
Andrew Lenharth
889efe4fb3
oops
...
llvm-svn: 20278
2005-02-22 23:29:25 +00:00
Andrew Lenharth
d870103306
dynamic stack allocas
...
llvm-svn: 20273
2005-02-22 21:59:48 +00:00
Andrew Lenharth
8ead0f13d3
no longer build as a shared library
...
llvm-svn: 20264
2005-02-22 04:58:26 +00:00
Misha Brukman
ea2c511191
Fix compilation errors with VS 2005, patch contributed by Aaron Gray.
...
llvm-svn: 20232
2005-02-17 21:40:27 +00:00
Tanya Lattner
a35f2f428e
Fixed node deletion bug.
...
llvm-svn: 20207
2005-02-16 04:00:59 +00:00
Chris Lattner
5174b9cb60
Fix a problem where the PPC backend lost track of the fact that it had
...
to save and restore the LR register on entry and exit of a leaf function
that needed to access globals or the constant pool. This should hopefully
fix oscar from sending the PPC tester spinning out of control.
llvm-svn: 20197
2005-02-15 20:26:49 +00:00
Chris Lattner
bf72146607
Fix volatile load/store of pointers. Consider this testcase:
...
void %test(int** %P) {
%A = volatile load int** %P
ret void
}
void %test2(int*** %Q) {
%P = load int*** %Q
volatile store int** %P, int*** %Q
ret void
}
instead of emitting:
void test(int **l1_P) {
int *l2_A;
l2_A = (int **((volatile int **)l1_P));
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((volatile int ***)l2_Q) = l1_P;
return;
}
... which is loading/storing volatile pointers, not through volatile pointers,
emit this (which is right):
void test(int **l1_P) {
int *l3_A;
l3_A = *((int * volatile*)l1_P);
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((int ** volatile*)l2_Q) = l1_P;
return;
}
llvm-svn: 20191
2005-02-15 05:52:14 +00:00
Misha Brukman
7b6a863954
Write out single characters as chars, not strings.
...
llvm-svn: 20179
2005-02-14 18:52:35 +00:00
Chris Lattner
ef836a918e
Implement CodeGen/CBackend/2005-02-14-VolatileOperations.ll
...
Volatile loads and stores need to emit volatile pointer operations in C.
llvm-svn: 20177
2005-02-14 16:47:52 +00:00
Andrew Lenharth
f023ce8d97
fix setcc on floats, fixes singlesource:pi, perhaps others
...
llvm-svn: 20172
2005-02-14 05:41:43 +00:00
Andrew Lenharth
e398f7797e
try to do better match for i32 adds
...
llvm-svn: 20143
2005-02-12 21:11:17 +00:00
Andrew Lenharth
089b56ae58
make FP conversion more conservative (matches gcc)
...
llvm-svn: 20142
2005-02-12 21:10:58 +00:00
Andrew Lenharth
b9c44170a5
oops, I was sure this had already gond though the nightly tester
...
llvm-svn: 20141
2005-02-12 20:42:09 +00:00
Andrew Lenharth
a12e5330bf
added sign extend for boolean
...
llvm-svn: 20137
2005-02-12 19:35:12 +00:00
Andrew Lenharth
076faf95a8
fix a bunch of regressions due to call behavior
...
llvm-svn: 20110
2005-02-10 20:10:38 +00:00
Tanya Lattner
04a78e13df
Added new circuit finding alogrithm.
...
Fixed bug in graph so that phi ite diff edges are added.
llvm-svn: 20108
2005-02-10 17:02:58 +00:00
Tanya Lattner
cd54968a72
Allow modsched and local scheduling to both be run.
...
llvm-svn: 20107
2005-02-10 17:02:06 +00:00
Andrew Lenharth
56c441caf2
so, if you beat on it, you too can talk emacs into having a sane indenting policy... Also, optimize many function calls with pc-relative calls (partial prologue skipping for that case coming soon), try to fix the random jumps to strange places problem by pesimizing div et. al. register usage and fixing up GP before using, some calling convention tweaks, and make frame pointer unallocatable (not strickly necessary, but let's go for correctness first)
...
llvm-svn: 20106
2005-02-10 06:25:22 +00:00
Andrew Lenharth
6c28128e3e
fix fp branch
...
llvm-svn: 20105
2005-02-10 05:17:38 +00:00
Misha Brukman
4bd124492b
* Fix spelling of `volatile'
...
* Align comments with tablegen elements
llvm-svn: 20103
2005-02-10 01:52:22 +00:00
Andrew Lenharth
d42ae810cb
BranchCC, nifty
...
llvm-svn: 20067
2005-02-08 00:40:03 +00:00
Andrew Lenharth
71fce71669
fix store issue and an FP conversion (segfault) issue
...
llvm-svn: 20066
2005-02-07 23:02:23 +00:00
Andrew Lenharth
cf4f405e55
copytoreg fix
...
llvm-svn: 20063
2005-02-07 06:31:44 +00:00
Andrew Lenharth
d20853f420
copyfromreg fix
...
llvm-svn: 20062
2005-02-07 06:21:37 +00:00
Andrew Lenharth
80cf648100
fix load bug
...
llvm-svn: 20061
2005-02-07 05:55:55 +00:00
Andrew Lenharth
9f5502e40f
more FP load store fixes and Load store simplifications
...
llvm-svn: 20060
2005-02-07 05:33:15 +00:00
Andrew Lenharth
bc6ddca09c
clean up load and stores alot
...
llvm-svn: 20059
2005-02-07 05:18:02 +00:00
Andrew Lenharth
4416315969
teach all loads and stores about the stack
...
llvm-svn: 20058
2005-02-07 05:07:00 +00:00
Andrew Lenharth
1b8bf311d2
prefer FP scratch registers and more check in LowerArguments
...
llvm-svn: 20057
2005-02-06 21:07:31 +00:00
Andrew Lenharth
23ca0026fa
fix oopso
...
llvm-svn: 20056
2005-02-06 16:22:15 +00:00
Andrew Lenharth
baa723abc0
smarter loads and stores. can now handle base+offset.
...
llvm-svn: 20055
2005-02-06 15:40:40 +00:00
Andrew Lenharth
9a2bc47fba
fix build
...
llvm-svn: 20053
2005-02-05 19:46:51 +00:00
Andrew Lenharth
6bd554a11e
clean up
...
llvm-svn: 20051
2005-02-05 17:41:39 +00:00
Andrew Lenharth
9fd7ce4bca
fix f32 setcc, and fp select
...
llvm-svn: 20050
2005-02-05 16:41:03 +00:00
Andrew Lenharth
5447bb6596
added ugly support for fp compares
...
llvm-svn: 20049
2005-02-05 13:19:12 +00:00
Misha Brukman
75da90f127
Make the rest of file header comments consistent in format and style
...
llvm-svn: 20048
2005-02-05 02:24:26 +00:00
Misha Brukman
74be40e1d2
Make file header comment consistent: extend the whole 80 cols to fill the line
...
llvm-svn: 20039
2005-02-04 20:25:52 +00:00
Andrew Lenharth
e081ab1c69
alignment
...
llvm-svn: 20028
2005-02-04 14:09:38 +00:00
Andrew Lenharth
68f8792889
get alignment printing correctly and get rid of __main hack
...
llvm-svn: 20027
2005-02-04 14:01:21 +00:00
Andrew Lenharth
fa74ac60e6
FP fixes
...
llvm-svn: 20019
2005-02-03 21:01:15 +00:00
Andrew Lenharth
d5de7adf26
Store fix
...
llvm-svn: 20004
2005-02-02 17:32:39 +00:00
Andrew Lenharth
fef75b04f1
oops
...
llvm-svn: 20003
2005-02-02 17:01:31 +00:00
Andrew Lenharth
b4bf49a4ae
prevent register allocator from using the stack pointer :)
...
llvm-svn: 20002
2005-02-02 17:00:21 +00:00
Andrew Lenharth
c3e3bd1c22
fix loading of floats
...
llvm-svn: 19997
2005-02-02 15:05:33 +00:00
Andrew Lenharth
2482a0ef99
marked mem* as not supported
...
llvm-svn: 19992
2005-02-02 05:49:42 +00:00
Andrew Lenharth
a856b4db61
fix Load bug
...
llvm-svn: 19987
2005-02-02 04:35:44 +00:00
Andrew Lenharth
35ae745650
try to make a bug bugpointable, add yet more constant pool stuff, fixup constant loads for FP
...
llvm-svn: 19985
2005-02-02 03:36:35 +00:00
Andrew Lenharth
5a2bb3de8b
better constant handling, should fix many remaining cases
...
llvm-svn: 19984
2005-02-02 00:51:15 +00:00
Andrew Lenharth
172fc4b1fd
fix FP arg passing bug, Add unsigned to/from int, fix SELECT, fix Constant pool
...
llvm-svn: 19976
2005-02-01 20:40:27 +00:00
Andrew Lenharth
9086064b72
Print the Constant pool
...
llvm-svn: 19975
2005-02-01 20:38:53 +00:00
Andrew Lenharth
540700124d
Make cmov work right and loads for fp from constant pool
...
llvm-svn: 19974
2005-02-01 20:36:44 +00:00
Andrew Lenharth
bf88e70920
Correct stack stuff for FP
...
llvm-svn: 19973
2005-02-01 20:35:57 +00:00
Andrew Lenharth
810fa6d4f1
try to match alpha pattern
...
llvm-svn: 19972
2005-02-01 20:35:11 +00:00
Andrew Lenharth
b8e15cfe9c
fix register names
...
llvm-svn: 19971
2005-02-01 20:34:29 +00:00
Andrew Lenharth
fa52a84802
pecimise loads, put indirect call addr in right register. still doesn't fix methcall
...
llvm-svn: 19963
2005-02-01 01:37:24 +00:00
Misha Brukman
1e8e58b829
Fix hyphenation in output comment
...
llvm-svn: 19954
2005-01-31 06:19:57 +00:00
Andrew Lenharth
648e85bb8a
indirect call fix
...
llvm-svn: 19945
2005-01-31 03:19:31 +00:00
Andrew Lenharth
401bb5807b
fp to int and back conversion sequences
...
llvm-svn: 19944
2005-01-31 01:44:26 +00:00
Andrew Lenharth
43c294ffc3
added fp extend and removed a forgotten assert in more than 6 arg support (should break somewhere else now :) ) and fix an incorrect asm sequence for indirect calls
...
llvm-svn: 19938
2005-01-30 20:42:36 +00:00
Chris Lattner
c952d46d13
This code is really unreachable.
...
llvm-svn: 19934
2005-01-30 16:33:46 +00:00
Chris Lattner
d27e3639ba
Fix warnings.
...
llvm-svn: 19933
2005-01-30 16:32:48 +00:00
Andrew Lenharth
60966b9bf0
support for larger calls
...
llvm-svn: 19932
2005-01-30 00:35:27 +00:00
Chris Lattner
fc8d0e9460
Unbreak the build :(
...
llvm-svn: 19926
2005-01-29 19:27:28 +00:00
Andrew Lenharth
f426f1c0c9
first step towards a correct and complete stack. also add some forms for things that were getting stuck in the nightly tester.
...
llvm-svn: 19914
2005-01-29 15:42:07 +00:00
Chris Lattner
774d64469c
Finegrainify namespacification.
...
Adjust TmpInstruction to work with the new User model.
llvm-svn: 19896
2005-01-29 00:36:59 +00:00
Chris Lattner
0b2dec0f59
add namespace qualifier
...
llvm-svn: 19895
2005-01-29 00:36:38 +00:00
Andrew Lenharth
8a3a14d343
fix ExprMap, partially teach about add long
...
llvm-svn: 19882
2005-01-28 23:17:54 +00:00
Andrew Lenharth
9db35b0763
fix ExprMap and constant check in setcc
...
llvm-svn: 19870
2005-01-28 14:06:46 +00:00
Andrew Lenharth
4cfda09ee9
move FP into it's own select
...
llvm-svn: 19867
2005-01-28 06:57:18 +00:00
Andrew Lenharth
c0cd77a1a0
stack frame fix and zero FP reg fix
...
llvm-svn: 19857
2005-01-27 08:31:19 +00:00
Andrew Lenharth
55eadc4772
Floating point instructions like Floating point registers
...
llvm-svn: 19856
2005-01-27 07:58:15 +00:00
Andrew Lenharth
67328d7fac
int to float conversion and another setcc
...
llvm-svn: 19855
2005-01-27 07:50:35 +00:00
Andrew Lenharth
4283bf1216
teach isel about comparison with constants and zero extending bits
...
llvm-svn: 19853
2005-01-27 03:49:45 +00:00
Andrew Lenharth
b539dd2c83
perhaps this will let me have calls again
...
llvm-svn: 19851
2005-01-27 01:22:48 +00:00
Andrew Lenharth
227bc0e21a
minor bug fix
...
llvm-svn: 19850
2005-01-27 00:52:26 +00:00
Andrew Lenharth
ae8ce1856a
minor bug fix
...
llvm-svn: 19849
2005-01-27 00:51:05 +00:00
Andrew Lenharth
11fc660a34
added instructions for fp to int to fp moves
...
llvm-svn: 19848
2005-01-26 23:56:48 +00:00
Andrew Lenharth
1f0b710fb6
initial fp support
...
llvm-svn: 19847
2005-01-26 21:54:09 +00:00
Andrew Lenharth
f9f01c190b
hum, writing on one machine, testing on another...
...
llvm-svn: 19844
2005-01-26 02:53:56 +00:00
Andrew Lenharth
53ad9ac1db
add some operations, fix others. should compile several more tests now
...
llvm-svn: 19843
2005-01-26 01:24:38 +00:00
Chris Lattner
ab92b92bc5
We can fold promoted and non-promoted loads into divs also!
...
llvm-svn: 19835
2005-01-25 20:35:10 +00:00
Chris Lattner
a9a0369879
Fold promoted loads into binary ops for FP, allowing us to generate m32 forms
...
of FP ops.
llvm-svn: 19834
2005-01-25 20:03:11 +00:00
Andrew Lenharth
4e10c17eeb
problems with bools, and their work arounds
...
llvm-svn: 19833
2005-01-25 19:58:40 +00:00
Andrew Lenharth
3ae267eb3b
more load choices, better add with imm
...
llvm-svn: 19821
2005-01-25 00:35:34 +00:00
Andrew Lenharth
3b44cfa26d
Clean ups, and taught the instruction selector about immediate forms
...
llvm-svn: 19816
2005-01-24 19:44:07 +00:00
Andrew Lenharth
3c6e50e63b
Alpha JIT prune
...
llvm-svn: 19815
2005-01-24 18:48:22 +00:00
Andrew Lenharth
ae874f0d85
include prune and JIT prune
...
llvm-svn: 19814
2005-01-24 18:45:41 +00:00
Andrew Lenharth
e3991f8256
Pruned includes
...
llvm-svn: 19813
2005-01-24 18:37:48 +00:00
Chris Lattner
88a4c43e67
Fix a spurious warning.
...
llvm-svn: 19799
2005-01-24 01:40:18 +00:00
Chris Lattner
6ff85c3152
Silence a warning.
...
llvm-svn: 19798
2005-01-23 23:20:06 +00:00
Chris Lattner
94952e0947
Allow the FP stackifier to completely ignore functions that do not use FP at
...
all. This should speed up the X86 backend fairly significantly on integer
codes. Now if only we didn't have to compute livevar still... ;-)
llvm-svn: 19796
2005-01-23 23:13:59 +00:00
Chris Lattner
680bc75f7f
Build Alpha by default.
...
llvm-svn: 19777
2005-01-23 04:34:46 +00:00
Reid Spencer
e48557f583
Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_alloca
...
llvm-svn: 19776
2005-01-23 04:32:47 +00:00
Reid Spencer
5c7b6e83f0
Support Cygwin assembly generation. The cygwin version of Gnu ASsembler
...
doesn't support certain directives and symbols on cygwin are prefixed with
an underscore. This patch makes the necessary adjustments to the output.
llvm-svn: 19775
2005-01-23 03:52:14 +00:00
Andrew Lenharth
f5b9a8fe57
Let me introduce you to the early stages of the llvm backend for the alpha processor
...
llvm-svn: 19764
2005-01-22 23:41:55 +00:00
Chris Lattner
b4cf4ffb04
Speed up folding operations into loads.
...
llvm-svn: 19733
2005-01-21 21:43:02 +00:00
Chris Lattner
fd4d7f71ae
The ever-important vanity pass name :)
...
llvm-svn: 19731
2005-01-21 21:35:14 +00:00
Chris Lattner
5f2fbeaa69
Fix a FIXME: realize that argument stores are all independent (don't alias)
...
llvm-svn: 19728
2005-01-21 19:46:38 +00:00
Chris Lattner
febeb380ae
Implement ADD_PARTS/SUB_PARTS so that 64-bit integer add/sub work. This
...
fixes most of the remaining llc-beta failures.
llvm-svn: 19716
2005-01-20 18:53:00 +00:00
Chris Lattner
8b0a2a3251
Fix a crash compiling 134.perl.
...
llvm-svn: 19711
2005-01-20 16:50:16 +00:00
Chris Lattner
6534e1ede3
Fix a problem where were were literally selecting for INCREASED register
...
pressure, not decreases register pressure. Fix problem where we accidentally
swapped the operands of SHLD, which caused fourinarow to fail. This fixes
fourinarow.
llvm-svn: 19697
2005-01-19 17:24:34 +00:00
Chris Lattner
b75589131d
When commuting these instructions, make sure to actually swap the operands too.
...
llvm-svn: 19694
2005-01-19 16:55:52 +00:00
Chris Lattner
fde1a5688b
Implement Regression/CodeGen/X86/rotate.ll: emit rotate instructions (which
...
typically cost 1 cycle) instead of shld/shrd instruction (which are typically
6 or more cycles). This also saves code space.
For example, instead of emitting:
rotr:
mov %EAX, DWORD PTR [%ESP + 4]
mov %CL, BYTE PTR [%ESP + 8]
shrd %EAX, %EAX, %CL
ret
rotli:
mov %EAX, DWORD PTR [%ESP + 4]
shrd %EAX, %EAX, 27
ret
Emit:
rotr32:
mov %CL, BYTE PTR [%ESP + 8]
mov %EAX, DWORD PTR [%ESP + 4]
ror %EAX, %CL
ret
rotli32:
mov %EAX, DWORD PTR [%ESP + 4]
ror %EAX, 27
ret
We also emit byte rotate instructions which do not have a sh[lr]d counterpart
at all.
llvm-svn: 19692
2005-01-19 08:07:05 +00:00
Chris Lattner
34757ff939
Add rotate instructions.
...
llvm-svn: 19690
2005-01-19 07:50:03 +00:00
Chris Lattner
e539ce8223
Match 16-bit shld/shrd instructions as well, implementing shift-double.llx:test5
...
llvm-svn: 19689
2005-01-19 07:37:26 +00:00
Chris Lattner
9d5ee289d7
Improve coverage of the X86 instruction set by adding 16-bit shift doubles.
...
llvm-svn: 19687
2005-01-19 07:31:24 +00:00
Chris Lattner
c03f360215
Teach the code generator that shrd/shld is commutable if it has an immediate.
...
This allows us to generate this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
shld %EDX, %EDX, 2
shl %EAX, 2
ret
instead of this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
mov %EDX, %EAX
shrd %EDX, %ECX, 30
shl %EAX, 2
ret
Note the magically transmogrifying immediate.
llvm-svn: 19686
2005-01-19 07:11:01 +00:00
Chris Lattner
33efebcdc8
Finegrainify namespacification
...
Add default impl of commuteInstruction
Add notes about ugly V9 code.
llvm-svn: 19684
2005-01-19 06:53:34 +00:00
Chris Lattner
575e912fcf
Codegen long >> 2 to this:
...
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
shrd %EAX, %EDX, 2
sar %EDX, 2
ret
instead of this:
test1:
mov %ECX, DWORD PTR [%ESP + 4]
shr %ECX, 2
mov %EDX, DWORD PTR [%ESP + 8]
mov %EAX, %EDX
shl %EAX, 30
or %EAX, %ECX
sar %EDX, 2
ret
and long << 2 to this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
*** mov %EDX, %EAX
shrd %EDX, %ECX, 30
shl %EAX, 2
ret
instead of this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
shr %ECX, 30
mov %EDX, DWORD PTR [%ESP + 8]
shl %EDX, 2
or %EDX, %ECX
shl %EAX, 2
ret
The extra copy (marked ***) can be eliminated when I teach the code generator
that shrd32rri8 is really commutative.
llvm-svn: 19681
2005-01-19 06:18:43 +00:00
Chris Lattner
419a5d213b
X86 shifts mask the amount.
...
llvm-svn: 19678
2005-01-19 03:36:30 +00:00
Chris Lattner
fbd1f8e4fd
Add a hook to find out how the target handles shift amounts that are out of
...
range. Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
This defaults to undefined, which is conservatively correct.
llvm-svn: 19677
2005-01-19 03:36:14 +00:00
Chris Lattner
6dec8cb829
Code to handle FP_EXTEND is dead now. X86 doesn't support any data types to
...
FP_EXTEND from!
llvm-svn: 19674
2005-01-18 20:05:56 +00:00
Chris Lattner
798e9c85d6
Remove more dead code.
...
llvm-svn: 19673
2005-01-18 19:50:08 +00:00
Chris Lattner
401814508f
The selection dag code handles the promotions from F32 to F64 for us, so we
...
don't need to even think about F32 in the X86 code anymore.
llvm-svn: 19672
2005-01-18 19:46:54 +00:00
Chris Lattner
dc09e52b3e
Fix 124.m88ksim.
...
llvm-svn: 19667
2005-01-18 17:35:28 +00:00
Chris Lattner
a04b1ee7a8
Do not emit loads multiple times, potentially in the wrong places.
...
llvm-svn: 19661
2005-01-18 04:18:32 +00:00
Tanya Lattner
d3459278f2
Minor changes.
...
llvm-svn: 19660
2005-01-18 04:15:41 +00:00
Chris Lattner
722ddeb86e
Eliminate bad assertions.
...
llvm-svn: 19659
2005-01-18 04:00:54 +00:00
Chris Lattner
8f3a8d96e2
* Eliminate the TokenSet and just use the ExprMap for both tokens and values.
...
* Insert some really pedantic assertions that will notice when we emit the
same loads more than one time, exposing bugs. This turns a miscompilation in
bzip2 into a compile-fail. yaay.
llvm-svn: 19658
2005-01-18 03:51:59 +00:00
Chris Lattner
b3edb09ede
Rely on the code in MatchAddress to do this work. Otherwise we fail to
...
match (X+Y)+(Z << 1), because we match the X+Y first, consuming the index
register, then there is no place to put the Z.
llvm-svn: 19652
2005-01-18 02:25:52 +00:00
Chris Lattner
ce2e0125dc
Fix a problem where probing for addressing modes caused expressions to be
...
emitted too early. In particular, this fixes
Regression/CodeGen/X86/regpressure.ll:regpressure3.
This also improves the 2nd basic block in 164.gzip:flush_block, which went from
.LBBflush_block_1: # loopentry.1.i
movzx %EAX, WORD PTR [dyn_ltree + 20]
movzx %ECX, WORD PTR [dyn_ltree + 16]
mov DWORD PTR [%ESP + 32], %ECX
movzx %ECX, WORD PTR [dyn_ltree + 12]
movzx %EDX, WORD PTR [dyn_ltree + 8]
movzx %EBX, WORD PTR [dyn_ltree + 4]
mov DWORD PTR [%ESP + 36], %EBX
movzx %EBX, WORD PTR [dyn_ltree]
add DWORD PTR [%ESP + 36], %EBX
add %EDX, DWORD PTR [%ESP + 36]
add %ECX, %EDX
add DWORD PTR [%ESP + 32], %ECX
add %EAX, DWORD PTR [%ESP + 32]
movzx %ECX, WORD PTR [dyn_ltree + 24]
add %EAX, %ECX
mov %ECX, 0
mov %EDX, %ECX
to
.LBBflush_block_1: # loopentry.1.i
movzx %EAX, WORD PTR [dyn_ltree]
movzx %ECX, WORD PTR [dyn_ltree + 4]
add %ECX, %EAX
movzx %EAX, WORD PTR [dyn_ltree + 8]
add %EAX, %ECX
movzx %ECX, WORD PTR [dyn_ltree + 12]
add %ECX, %EAX
movzx %EAX, WORD PTR [dyn_ltree + 16]
add %EAX, %ECX
movzx %ECX, WORD PTR [dyn_ltree + 20]
add %ECX, %EAX
movzx %EAX, WORD PTR [dyn_ltree + 24]
add %ECX, %EAX
mov %EAX, 0
mov %EDX, %EAX
... which results in less spilling in the function.
This change alone speeds up 164.gzip from 37.23s to 36.24s on apoc. The
default isel takes 37.31s.
llvm-svn: 19650
2005-01-18 01:06:26 +00:00
Chris Lattner
a78f9ced61
Fix indentation.
...
llvm-svn: 19649
2005-01-17 23:25:45 +00:00
Chris Lattner
dff1e3e86f
Don't bother using max here.
...
llvm-svn: 19647
2005-01-17 23:02:13 +00:00
Chris Lattner
2d86b43318
Do not give token factor nodes outrageous weights
...
llvm-svn: 19645
2005-01-17 22:56:09 +00:00
Chris Lattner
f2878ce8ba
Two changes:
...
1. Fold [mem] += (1|-1) into inc [mem]/dec [mem] to save some icache space.
2. Do not let token factor nodes prevent forming '[mem] op= val' folds.
llvm-svn: 19643
2005-01-17 22:10:42 +00:00
Chris Lattner
40c0fca632
Refactor load/op/store folding into it's own method, no functionality changes.
...
llvm-svn: 19641
2005-01-17 19:25:26 +00:00
Chris Lattner
2348abc421
Fix a major regression last night that prevented us from producing [mem] op= reg
...
operations.
The body of the if is less indented but unmodified in this patch.
llvm-svn: 19638
2005-01-17 17:49:14 +00:00
Chris Lattner
adb669ab1f
Codegen this:
...
int %foo(int %X) {
%T = add int %X, 13
%S = mul int %T, 3
ret int %S
}
as this:
mov %ECX, DWORD PTR [%ESP + 4]
lea %EAX, DWORD PTR [%ECX + 2*%ECX + 39]
ret
instead of this:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EAX, %ECX
add %EAX, 13
imul %EAX, %EAX, 3
ret
llvm-svn: 19633
2005-01-17 06:48:02 +00:00
Tanya Lattner
5a10531cf8
Added tmp instructions to preserve ssa.
...
llvm-svn: 19632
2005-01-17 06:47:26 +00:00
Chris Lattner
51590b615c
Fix test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll and 132.ijpeg.
...
Do not fold a load into an operation if it will induce a cycle in the DAG.
Repeat after me: dAg.
llvm-svn: 19631
2005-01-17 06:26:58 +00:00
Chris Lattner
f1e85bec5a
Do not fold a load into a comparison that is used by more than one place.
...
The comparison will probably be folded, so this is not ok to do.
This fixed 197.parser.
llvm-svn: 19624
2005-01-17 01:34:14 +00:00
Chris Lattner
1b8c8fe020
Do not codegen 'xor bool, true' as 'not reg'. not reg inverts the upper bits
...
of the bytereg. This fixes yacr2, 300.twolf and probably others.
llvm-svn: 19622
2005-01-17 00:23:16 +00:00
Chris Lattner
46dac4394c
Set up the shift and setcc types.
...
If we emit a load because we followed a token chain to get to it, try to
fold it into its single user if possible.
llvm-svn: 19620
2005-01-17 00:00:33 +00:00
Chris Lattner
4c88cc95ee
Shift and setcc types default to the pointer type.
...
llvm-svn: 19619
2005-01-16 23:59:48 +00:00
Tanya Lattner
fea188af7e
Added paramters to a few functions in order to allow me to change the functions to preserve SSA
...
llvm-svn: 19615
2005-01-16 08:51:10 +00:00
Chris Lattner
9ffc59287e
* Adjust to changes in TargetLowering interfaces.
...
* Remove custom promotion for bool and byte select ops. Legalize now
promotes them for us.
* Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates.
* Declare which operations are not supported better.
* Add some hacky code for TRUNCSTORE to pretend that we have truncstore
for i16 types. This is useful for testing promotion code because I can
just remove 16-bit registers all together and verify that programs work.
llvm-svn: 19614
2005-01-16 07:34:08 +00:00
Chris Lattner
b49d2a7b0f
Use enums, move virtual dtor out of line.
...
llvm-svn: 19610
2005-01-16 07:28:11 +00:00
Chris Lattner
be2a427f51
cycles_t -> CycleCount_t
...
llvm-svn: 19604
2005-01-16 04:20:30 +00:00
Reid Spencer
afa1cb9e11
Rename BUILD_* to PROJ_*
...
llvm-svn: 19592
2005-01-16 02:21:29 +00:00
Tanya Lattner
66cf1a6f82
Fixed a couple of instructions that broke SSA.
...
llvm-svn: 19587
2005-01-16 02:14:17 +00:00
Chris Lattner
605b9a23a2
Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
...
llvm-svn: 19586
2005-01-16 01:31:31 +00:00
Chris Lattner
06c297f8ca
Set up identity transforms.
...
llvm-svn: 19584
2005-01-16 01:20:18 +00:00
Chris Lattner
1d0e1ffe02
Move some information out of LegalizeDAG into the generic Target interface.
...
llvm-svn: 19581
2005-01-16 01:10:58 +00:00
Chris Lattner
98611ce291
Add a new target-independent code generator flag.
...
llvm-svn: 19567
2005-01-15 06:00:32 +00:00
Chris Lattner
f3d950e816
Add support for truncstore and *extload.
...
llvm-svn: 19566
2005-01-15 05:22:24 +00:00
Chris Lattner
27c91fac94
Adjust to CopyFromREg changes.
...
llvm-svn: 19561
2005-01-14 22:37:41 +00:00
Chris Lattner
c032990335
Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll
...
llvm-svn: 19557
2005-01-14 20:22:02 +00:00
Chris Lattner
b0b49268c4
Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll
...
llvm-svn: 19555
2005-01-14 19:31:00 +00:00
Chris Lattner
7a8788c9ac
Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
...
llvm-svn: 19535
2005-01-13 20:50:02 +00:00
Chris Lattner
fce6a5439d
Codegen factor nodes more intelligently according to perceived register pressure.
...
llvm-svn: 19532
2005-01-13 19:56:00 +00:00
Chris Lattner
cb4359465a
Initial trivial (but stupid) codegen for this node.
...
llvm-svn: 19529
2005-01-13 18:01:36 +00:00
Chris Lattner
9a70166615
Add some really pedantic assertions to the load folding code. Fix a bunch
...
of cases where we accidentally emitted a load folded once and unfolded
elsewhere.
llvm-svn: 19522
2005-01-13 05:53:16 +00:00
Chris Lattner
2ab70aafe0
We can only fold a load into an op if there is exactly one use of the value.
...
Checking to see if the load has two uses is not equivalent, as the chain
value may have zero uses.
llvm-svn: 19518
2005-01-12 18:38:26 +00:00
Chris Lattner
4b03f0f99e
Try both ways to fold an add together. This allows us to generate this code
...
imul %EAX, %EAX, 400
add %ECX, %EAX
add %ESI, DWORD PTR [%ECX + 4*%EDX]
inc %EDX
cmp %EDX, 100
instead of this:
imul %EAX, %EAX, 400
add %ECX, %EAX
mov %EAX, %EDX
shl %EAX, 2
add %ECX, %EAX
add %ESI, DWORD PTR [%ECX]
inc %EDX
cmp %EDX, 100
llvm-svn: 19513
2005-01-12 18:08:53 +00:00
Chris Lattner
61c572eb7f
Fix a major miscompilation where we were overwriting the scale reg.
...
llvm-svn: 19511
2005-01-12 07:33:20 +00:00
Chris Lattner
5816f1a302
Do not use the type of the RHS constant to determine the type of the operation.
...
This fails for shifts because the constant is always 8 bits.
llvm-svn: 19508
2005-01-12 05:22:07 +00:00
Chris Lattner
89d6b21ae6
Do not lose the offset from teh global when peephole optimizing instructions.
...
This fixes FreeBench/pcompress
llvm-svn: 19507
2005-01-12 05:17:28 +00:00
Jeff Cohen
614a5ec22a
Fix C++ more compilatiom errors
...
llvm-svn: 19504
2005-01-12 04:29:05 +00:00
Chris Lattner
5ef92f3a40
Fix a compile error with VC++, which things that static const arrays need
...
to be dynamically initialized. :(
llvm-svn: 19503
2005-01-12 04:23:22 +00:00
Chris Lattner
627c64e5e5
Fix a bug that caused us to crash on povray. We weren't emitting an FP_REG_KILL into a block that had a successor with a FP PHI node.
...
llvm-svn: 19502
2005-01-12 04:21:28 +00:00
Chris Lattner
a5f0ba59a0
Print a load of a null pointer (in intel mode) like this:
...
mov %AX, WORD PTR [0]
instead of like this:
mov %AX, WORD PTR []
llvm-svn: 19501
2005-01-12 04:07:11 +00:00
Chris Lattner
360988bae2
Print a load of a null pointer like this:
...
movw 0, %ax
instead of like this:
movw , %ax
llvm-svn: 19500
2005-01-12 04:05:19 +00:00
Chris Lattner
3c85c67c97
Fix a crash compiling povray on UINT_TO_FP from i16.
...
llvm-svn: 19499
2005-01-12 04:00:00 +00:00
Chris Lattner
4e72a2a000
There are no [mem] op= reg instructions for FP, so remove their entries.
...
llvm-svn: 19496
2005-01-12 03:16:09 +00:00
Chris Lattner
00cb0ace9b
Fix a bug where we didn't insert FP_REG_KILL instructions into MBB's that
...
contain FP PHI nodes but no other FP defining instructions. This fixes
183.equake
llvm-svn: 19495
2005-01-12 02:57:10 +00:00
Chris Lattner
92166ed1df
Fold TRUNCATE (LOAD P) into a smaller load from P.
...
llvm-svn: 19494
2005-01-12 02:19:06 +00:00
Chris Lattner
258b23bd9d
Be more careful about order of arg evalution for CopyToReg nodes. This shrinks
...
256.bzip2 from 7142 to 7103 lines of .s file.
Second, add initial support for folding loads into compares, though this code
is dynamically dead for now. :(
llvm-svn: 19493
2005-01-12 02:02:48 +00:00
Chris Lattner
604416e8f4
Fold some more [mem] op= val operators. This allows us to things like this
...
several times in 256.bzip2:
mov %EAX, DWORD PTR [%ESP + 204]
- mov %EAX, DWORD PTR [%EAX]
- or %EAX, 2097152
- mov %ECX, DWORD PTR [%ESP + 204]
- mov DWORD PTR [%ECX], %EAX
+ or DWORD PTR [%EAX], 2097152
llvm-svn: 19492
2005-01-12 01:28:00 +00:00
Chris Lattner
e83ae1063f
Fold loads into sign/zero extends. instead of:
...
mov %AL, BYTE PTR [%EDX + l18_length_code]
movzx %EAX, %AL
Emit:
movzx %EAX, BYTE PTR [%EDX + l18_length_code]
llvm-svn: 19489
2005-01-11 23:33:00 +00:00
Chris Lattner
87a38bd4a8
Comment out debug code :)
...
Select [mem] += Val operations. For constants, we used to get:
mov %ECX, -32768
add %ECX, DWORD PTR [l4_match_start]
mov DWORD PTR [l4_match_start], %ECX
Now we get:
add DWORD PTR [l4_match_start], -32768
For other values we used to get:
mov %EBP, %EDI ;; because the add destroys the value
add %EBP, DWORD PTR [l4_input_len]
mov DWORD PTR [l4_input_len], %EBP
now we get:
add DWORD PTR [l4_input_len], %EDI
Both of these use less registers than the alternative, are faster and smaller.
llvm-svn: 19488
2005-01-11 23:21:30 +00:00
Chris Lattner
282473a25d
Handle the global address case here, not just the offset case.
...
llvm-svn: 19487
2005-01-11 22:58:43 +00:00
Chris Lattner
9eb2cc700b
Treat int constants as not requiring a register, since they are almost always
...
folded into an instruction.
llvm-svn: 19486
2005-01-11 22:29:12 +00:00
Chris Lattner
7cb2220907
* Factor a bunch of binary operator cases into shared code.
...
* Fold loads into Add, sub, and, or, xor and mul when possible.
* Codegen shl X, 1 as add X, X
llvm-svn: 19483
2005-01-11 21:19:59 +00:00
Chris Lattner
b1a72cb39a
Clear the whole array, always.
...
llvm-svn: 19482
2005-01-11 20:25:26 +00:00
Chris Lattner
b838c9748e
Fold multiplies by 3,5,9 into addressing modes when possible.
...
llvm-svn: 19480
2005-01-11 19:37:02 +00:00
Chris Lattner
e7b1130b01
Instead of generating stuff like this:
...
mov %ECX, %EAX
add %ECX, 32768
mov %SI, WORD PTR [2*%ECX + l13_prev]
Generate this:
mov %SI, WORD PTR [2*%ECX + l13_prev + 65536]
This occurs when you have a GEP instruction where an index is
"something + imm".
llvm-svn: 19472
2005-01-11 06:36:20 +00:00
Chris Lattner
bb63a09cd1
Implement MEMCPY natively in terms of rep movs*
...
llvm-svn: 19468
2005-01-11 06:19:26 +00:00
Chris Lattner
b2b08a8bc1
Implement memset -> rep stos*
...
llvm-svn: 19467
2005-01-11 06:14:36 +00:00
Chris Lattner
58816a9e81
Announce that we don't support mem ops yet.
...
llvm-svn: 19466
2005-01-11 05:57:36 +00:00
Chris Lattner
f867443d7e
Teach the address selector to make 'reg+reg' addressing modes.
...
llvm-svn: 19457
2005-01-11 04:40:19 +00:00
Chris Lattner
edf06be50e
Emit NOT instructions.
...
llvm-svn: 19455
2005-01-11 04:31:30 +00:00