Evan Cheng
d3babfe458
Support for ADD_PARTS, SUB_PARTS, SHL_PARTS, SHR_PARTS, and SRA_PARTS.
...
llvm-svn: 25158
2006-01-09 18:33:28 +00:00
Evan Cheng
a8064e0723
* Allow custom lowering of ADD_PARTS, SUB_PARTS, SHL_PARTS, SRA_PARTS,
...
and SRL_PARTS.
* Fix a bug that caused *_PARTS to be custom lowered twice.
llvm-svn: 25157
2006-01-09 18:31:59 +00:00
Evan Cheng
7a32c047d9
New getNode() variants.
...
llvm-svn: 25156
2006-01-09 18:29:18 +00:00
Evan Cheng
e720cfd690
New DAG node properties SNDPInFlag, SNDPOutFlag, and SNDPOptInFlag to replace
...
hasInFlag, hasOutFlag.
llvm-svn: 25155
2006-01-09 18:28:21 +00:00
Evan Cheng
7b8f8c317e
* Remove instruction fields hasInFlag / hasOutFlag and added SNDPInFlag and
...
SNDPOutFlag to DAG nodes. These properties do not belong to target specific
instructions.
* Added DAG node property SNDPOptInFlag. It's same as SNDPInFlag except it's
optional. Used by ret / call, etc.
llvm-svn: 25154
2006-01-09 18:27:06 +00:00
Chris Lattner
05816ecb7f
Teach loopsimplify to update et-forest. Patch contributed by Daniel Berlin!
...
llvm-svn: 25153
2006-01-09 08:03:08 +00:00
Chris Lattner
06a5b2acff
Bugfix for etforest updating. Contributed by Daniel Berlin.
...
llvm-svn: 25152
2006-01-09 07:58:01 +00:00
Reid Spencer
1c717326d9
Saem Ghani's PassManager Patch #8 :
...
This fixes a "gccass" regression. The -debug-pass=Structure option now
prints all the appropriate output
llvm-svn: 25151
2006-01-08 22:57:07 +00:00
Reid Spencer
fb5ba86d31
Add some documentation.
...
llvm-svn: 25150
2006-01-08 22:41:22 +00:00
Reid Spencer
ae8ad0d55a
Fix line length of a comment.
...
llvm-svn: 25149
2006-01-08 22:40:10 +00:00
Jeff Cohen
a19fcf4b2c
Visual Studio hates being left out.
...
llvm-svn: 25148
2006-01-08 18:29:44 +00:00
Chris Lattner
60499c68b3
Fix the build on platforms where <cassert> doesn't define NULL
...
llvm-svn: 25147
2006-01-08 09:10:46 +00:00
Chris Lattner
4266c0b9cb
Fix a problem exposed by the et-forest work. Load-vn needs these passes live
...
whenever it is live, not just when load-vn is computed initially
llvm-svn: 25146
2006-01-08 09:10:04 +00:00
Chris Lattner
6dc27e7cef
Add an entry
...
llvm-svn: 25145
2006-01-08 08:25:38 +00:00
Chris Lattner
84a9d11b28
Initial implementation of the ET-Forest data structure for dominators and
...
post-dominators. This code was written/adapted by Daniel Berlin!
llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner
31d0e66ff2
Fix out of date comments, patch by Marco Matthies.
...
llvm-svn: 25143
2006-01-08 02:32:52 +00:00
Chris Lattner
8d84170fb5
Patch #7 from Saem:
...
"added the asserts and casts, fixed the comments and started the break
down of the larger methods. A few more patches and the breakdown
should be complete."
llvm-svn: 25142
2006-01-07 23:16:58 +00:00
Chris Lattner
00d77e22d4
Fix the PPC JIT failures last night, which were due to mishandling of linkonce globals
...
llvm-svn: 25141
2006-01-07 06:22:16 +00:00
Chris Lattner
446a1e7a68
Wrap long lines.
...
llvm-svn: 25140
2006-01-07 06:20:51 +00:00
Chris Lattner
05a3f338cd
wrap long line
...
llvm-svn: 25139
2006-01-07 06:12:07 +00:00
Chris Lattner
9d4d1b1220
Modify this test to not depend on the host math.h implementation
...
llvm-svn: 25138
2006-01-07 01:37:25 +00:00
Chris Lattner
9453593f40
fix some 176.gcc miscompilation from my previous patch.
...
llvm-svn: 25137
2006-01-07 01:32:28 +00:00
Evan Cheng
6a9c735e21
* Added integer div / rem.
...
* Fixed a load folding bug.
llvm-svn: 25136
2006-01-06 23:19:29 +00:00
Robert Bocchino
d424e0904c
Fixed Makefile so it does, indeed, build a dynamic library.
...
llvm-svn: 25135
2006-01-06 22:51:19 +00:00
Robert Bocchino
e399fb1bbd
Fixed a typo; "= 1" was missing.
...
llvm-svn: 25134
2006-01-06 22:49:23 +00:00
Evan Cheng
353958d60c
Pattern complexity calculation fix.
...
llvm-svn: 25133
2006-01-06 22:19:44 +00:00
Evan Cheng
060b19c708
ISEL code for MULHU, MULHS, and UNDEF.
...
llvm-svn: 25132
2006-01-06 20:36:21 +00:00
Andrew Lenharth
193ef655ed
make 0 codegen much better
...
llvm-svn: 25131
2006-01-06 19:41:51 +00:00
Chris Lattner
6c99d09404
silence some bogus gcc warnings on fenris
...
llvm-svn: 25130
2006-01-06 17:59:59 +00:00
Chris Lattner
88239024ca
silence a bogus gcc warning
...
llvm-svn: 25129
2006-01-06 17:56:38 +00:00
Chris Lattner
6c01df15ac
Enhance the shift-shift folding code to allow a no-op cast to occur in between
...
the shifts.
This allows us to fold this (which is the 'integer add a constant' sequence
from cozmic's scheme compmiler):
int %x(uint %anf-temporary776) {
%anf-temporary777 = shr uint %anf-temporary776, ubyte 1
%anf-temporary800 = cast uint %anf-temporary777 to int
%anf-temporary804 = shl int %anf-temporary800, ubyte 1
%anf-temporary805 = add int %anf-temporary804, -2
%anf-temporary806 = or int %anf-temporary805, 1
ret int %anf-temporary806
}
into this:
int %x(uint %anf-temporary776) {
%anf-temporary776 = cast uint %anf-temporary776 to int
%anf-temporary776.mask1 = add int %anf-temporary776, -2
%anf-temporary805 = or int %anf-temporary776.mask1, 1
ret int %anf-temporary805
}
note that instcombine already knew how to eliminate the AND that the two
shifts fold into. This is tested by InstCombine/shift.ll:test26
-Chris
llvm-svn: 25128
2006-01-06 07:52:12 +00:00
Chris Lattner
e585f4fa9d
A case that instcombine is not catching.
...
llvm-svn: 25127
2006-01-06 07:48:28 +00:00
Chris Lattner
410db54bbf
Simplify the code a bit more
...
llvm-svn: 25126
2006-01-06 07:22:22 +00:00
Chris Lattner
83fc19a4a9
Extract a bunch of code out of visitShiftInst into FoldShiftByConstant. No
...
functionality changes.
llvm-svn: 25125
2006-01-06 07:12:35 +00:00
Chris Lattner
ae1bace70a
Unbreak the build :(
...
llvm-svn: 25124
2006-01-06 05:47:48 +00:00
Evan Cheng
66355df170
Addd (shl x, 1) ==> (shl x, x) peepholes.
...
llvm-svn: 25123
2006-01-06 02:31:59 +00:00
Evan Cheng
1d376c6eb2
Tweak pattern complexity calc.
...
llvm-svn: 25122
2006-01-06 02:30:23 +00:00
Evan Cheng
105a0cc17e
Revert the previous check-in. Leave shl x, 1 along for target to deal with.
...
llvm-svn: 25121
2006-01-06 01:56:02 +00:00
Evan Cheng
efe621adce
fold (shl x, 1) -> (add x, x)
...
llvm-svn: 25120
2006-01-06 01:06:31 +00:00
Chris Lattner
d583872b9e
linkonce symbols have an extra indirection, just like weak ones do. This fixes
...
Prolangs-C++/family and Prolangs-C++/primes.
llvm-svn: 25119
2006-01-06 01:04:03 +00:00
Evan Cheng
1e0d7b98f3
* Fast call support.
...
* FP cmp, setcc, etc.
llvm-svn: 25117
2006-01-06 00:43:03 +00:00
Evan Cheng
133170cb5c
Support for custom lowering of ISD::RET.
...
llvm-svn: 25116
2006-01-06 00:41:43 +00:00
Evan Cheng
c6ad7a02a8
Bug fix wrt chain operand.
...
llvm-svn: 25115
2006-01-06 00:41:12 +00:00
Chris Lattner
5488b43338
Fix a compile crash building MultiSource/Applications/d with the new front-end.
...
The PPC backend was generating random shift counts in this case, due to an
uninitialized variable.
llvm-svn: 25114
2006-01-05 18:32:49 +00:00
Robert Bocchino
61bbc59306
Added the spec for the new "extractelement" instruction.
...
llvm-svn: 25113
2006-01-05 17:37:02 +00:00
Chris Lattner
ee327e57d2
Implement a few symbolic constant folding things. X ? Y : Y is Y.
...
Fold:
seteq ({ short }* cast (int 1 to { short }*), { short }* null)
setlt ({ short }* cast (int 1 to { short }*), { short }* cast (int 2 to { short }*))
to false/true. These last two commonly occur in the output of compilers that
tag integers, like cozmic's scheme compiler.
Tested by Regression/Assembler/ConstantExprFold.llx
llvm-svn: 25112
2006-01-05 07:49:30 +00:00
Chris Lattner
b11a652b2a
new tests, derived from cosmics scheme output
...
llvm-svn: 25111
2006-01-05 07:46:46 +00:00
Chris Lattner
253796d43f
fix some formatting problems
...
llvm-svn: 25110
2006-01-05 07:19:51 +00:00
Chris Lattner
0bbcba6cff
unbreak the build, these are now in TargetSelectionDAG.td
...
llvm-svn: 25109
2006-01-05 04:48:15 +00:00
Evan Cheng
6c86cf3a5f
Added ConstantFP patterns.
...
llvm-svn: 25108
2006-01-05 02:08:37 +00:00