Nate Begeman
39ef2f1d43
Fixed version of optimized integer divide is now fixed. Calculate the
...
quotient, not the remainder. Also, make sure to remove the old div operand
from the ExprMap and let SelectExpr insert the new one.
llvm-svn: 21111
2005-04-06 06:44:57 +00:00
Duraid Madina
c0e9adf3cc
lie a bit and say that r1/r12 (GP/SP) _aren't_ callee-save, as we take
...
care of this ourselves
llvm-svn: 21110
2005-04-06 06:18:36 +00:00
Duraid Madina
df0ecbd4cc
make sure 'special' registers don't get allocated
...
llvm-svn: 21109
2005-04-06 06:17:54 +00:00
Chris Lattner
9953d17a44
document these nodes, as they are nonobvious
...
llvm-svn: 21108
2005-04-06 04:21:29 +00:00
Chris Lattner
4fbb4af5d1
Add (untested) support for MULHS and MULHU.
...
llvm-svn: 21107
2005-04-06 04:21:07 +00:00
Chris Lattner
c21db6b15c
add signed versions of the extra precision multiplies
...
llvm-svn: 21106
2005-04-06 04:19:22 +00:00
Nate Begeman
dd397119b0
Turn off the div -> mul optimization until it works correctly 100% of the
...
time.
llvm-svn: 21105
2005-04-06 03:36:33 +00:00
Nate Begeman
4164c4baac
Add support for MULHS and MULHU nodes
...
Have LegalizeDAG handle SREM and UREM for us
Codegen SDIV and UDIV by constant as a multiply by magic constant instead
of integer divide, which is very slow.
llvm-svn: 21104
2005-04-06 00:25:27 +00:00
Nate Begeman
20b7d2a36f
Expand SREM and UREM for targets that claim not to have them, like PowerPC
...
llvm-svn: 21103
2005-04-06 00:23:54 +00:00
Nate Begeman
55e8625c69
Add MULHU and MULHS nodes for the high part of an (un)signed 32x32=64b
...
multiply.
llvm-svn: 21102
2005-04-05 22:36:56 +00:00
Andrew Lenharth
43f78bc2da
added lowerargs support for varargs
...
llvm-svn: 21101
2005-04-05 20:51:46 +00:00
Nate Begeman
524417357c
Behold, rlwinm with certain immediate arguments is printed as the much more
...
readable slwi or srwi (shift left/right word immediate).
llvm-svn: 21099
2005-04-05 18:19:50 +00:00
Nate Begeman
a188b698a2
Fix cut & paste errors (32->64), and codegen float->int more optimally.
...
llvm-svn: 21098
2005-04-05 17:32:30 +00:00
Tanya Lattner
8d64e9a90d
Updated to use dep analyzer.
...
llvm-svn: 21097
2005-04-05 16:36:44 +00:00
Nate Begeman
9203e169a7
Remove 64 bit simple ISel, it never worked correctly
...
Add initial (buggy) implementation of 64 bit pattern ISel
llvm-svn: 21096
2005-04-05 08:51:15 +00:00
Nate Begeman
4bde071216
Back out the previous change to SelectBranchCC, since there are cases it
...
could miscompile. A correct solution will be found in the near future.
llvm-svn: 21095
2005-04-05 04:32:16 +00:00
Nate Begeman
9049e4beec
Rename canUseAsImmediateForOpcode to getImmediateForOpcode to better
...
indicate that it is not a boolean function.
Properly emit the pseudo instruction for conditional branch, so that we
can fix up conditional branches whose displacements are too large.
Reserve the right amount of opcode space for said pseudo instructions.
llvm-svn: 21094
2005-04-05 04:22:58 +00:00
Chris Lattner
7e0a534cba
do not crash when using -debug
...
llvm-svn: 21092
2005-04-05 01:12:03 +00:00
Nate Begeman
d6933f5078
Implement SDIV by power of 2 as srawi/addze rather than load imm, divw
...
llvm-svn: 21091
2005-04-05 00:15:08 +00:00
Nate Begeman
1d5d767a09
Pattern match fp mul-add, mul-sub, neg-mul-add, and neg-mul-sub
...
llvm-svn: 21090
2005-04-04 23:40:36 +00:00
Nate Begeman
d96350095c
Add support for multiply-add, multiply-sub, and their negated versions
...
llvm-svn: 21089
2005-04-04 23:01:51 +00:00
Chris Lattner
b919b21777
do not dereference an extra layer of pointers to determine if an external
...
call can modify a memory location. This fixes
test/Regression/Analysis/Andersens/modreftest.ll
llvm-svn: 21088
2005-04-04 22:23:21 +00:00
Chris Lattner
0933766e2b
new testcase
...
llvm-svn: 21087
2005-04-04 22:22:30 +00:00
Nate Begeman
1194531057
Make sure that arg regs used by the call instruction are marked as such, so
...
that regalloc doesn't cleverly reuse early arg regs loading later arg regs.
This fixes almost all outstanding failures in the pattern isel.
llvm-svn: 21086
2005-04-04 22:17:48 +00:00
Nate Begeman
c7186025de
Remove unnecessary register copy now that regalloc is fixed
...
llvm-svn: 21085
2005-04-04 21:48:13 +00:00
Chris Lattner
6a6056e93d
Make sure to notice that explicit physregs are used in the function
...
llvm-svn: 21084
2005-04-04 21:35:34 +00:00
Nate Begeman
d753765460
i1 loads should also be from the low byte of the argument word.
...
llvm-svn: 21077
2005-04-04 09:09:00 +00:00
Nate Begeman
1ce4839890
Fix i64 return, fix CopyFromReg
...
llvm-svn: 21076
2005-04-04 06:52:38 +00:00
Duraid Madina
9935f44fb8
fix SREM/UREM, which gave incorrect results for x%y if x was zero. This is
...
an ugly hack, but it seems to work. I should fix this properly and add a test
as well.
fixes multisource/obsequi (maybe others)
llvm-svn: 21075
2005-04-04 05:05:52 +00:00
Duraid Madina
dbc810022b
add implicit use op
...
llvm-svn: 21074
2005-04-04 04:50:57 +00:00
Nate Begeman
cc00a7c42d
Handle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when
...
you have something like i16 = truncate i64. This fixes Regression/C/casts
llvm-svn: 21073
2005-04-04 00:57:08 +00:00
Chris Lattner
4784489de2
Fix sign_extend and zero_extend of promoted value types to expanded value
...
types. This occurs when casting short to long on PPC for example.
llvm-svn: 21072
2005-04-03 23:41:52 +00:00
Nate Begeman
629cdaea39
Full varargs support. All of UnitTests now passes
...
llvm-svn: 21070
2005-04-03 23:11:17 +00:00
Nate Begeman
7a3e929efc
Pass the correct value for the chain to the store
...
llvm-svn: 21066
2005-04-03 22:22:56 +00:00
Nate Begeman
f6dc43bd46
Fix SHL_PARTS
...
Start implementation of integer varargs
llvm-svn: 21065
2005-04-03 22:13:27 +00:00
Andrew Lenharth
79e727e8a7
is this simpler? I think it is simpler.
...
llvm-svn: 21064
2005-04-03 20:35:21 +00:00
Andrew Lenharth
7ce5740de9
fix 101 regressions
...
llvm-svn: 21063
2005-04-03 18:24:50 +00:00
Duraid Madina
2f472ecb11
a wise man once said:
...
"!!!!!!!! IF YOU CHANGE SPACES TO TABS, YOU WILL BE KILLED!!!!!!"
llvm-svn: 21062
2005-04-03 14:57:35 +00:00
Duraid Madina
6c9afaead4
.bss is no problem here.
...
llvm-svn: 21061
2005-04-03 14:52:01 +00:00
Nate Begeman
34cc5b329f
Keeping up with the Joneses.
...
Implement not, nor, nand, and eqv
llvm-svn: 21060
2005-04-03 11:20:20 +00:00
Andrew Lenharth
46897ab49e
Select optimization
...
llvm-svn: 21051
2005-04-02 22:32:39 +00:00
Andrew Lenharth
f029d795f0
Try several things. 1) drop /i from FP ops 2) factor out FP to Int moves and provide 21264 support for those 3) match not 4) match ornot andnot xornot
...
llvm-svn: 21046
2005-04-02 21:06:51 +00:00
Chris Lattner
d2df8ca403
fix some VC compilation problems, thanks to Jeff C for pointing this out!
...
llvm-svn: 21044
2005-04-02 20:17:09 +00:00
Chris Lattner
a7913e66e1
EquivClassGraphs is now in DataStructure.h
...
llvm-svn: 21042
2005-04-02 20:08:17 +00:00
Chris Lattner
745c960672
merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
...
llvm-svn: 21041
2005-04-02 20:08:06 +00:00
Chris Lattner
526cc17b55
use a callee_iterator typedef.
...
llvm-svn: 21038
2005-04-02 20:02:41 +00:00
Chris Lattner
63e3a262d8
add and use a callee_iterator typedef
...
llvm-svn: 21037
2005-04-02 20:02:32 +00:00
Chris Lattner
990ed1d201
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
...
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.
llvm-svn: 21031
2005-04-02 19:17:18 +00:00
Chris Lattner
637e42022f
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
...
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
llvm-svn: 21030
2005-04-02 19:15:15 +00:00
Andrew Lenharth
e7ae400bc8
FNEG/FABS/UNDEF
...
llvm-svn: 21029
2005-04-02 19:11:07 +00:00