| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subtracts. This is a very rough and nasty implementation of Lefevre's
"pattern finding" algorithm. With a few small changes though, it should
end up beating most other methods in common use, regardless of the size
of the constant (currently, it's often one or two shifts worse)
TODO: rewrite it so it's not hideously ugly (this is a translation from
perl, which doesn't help ;)
bypass most of it for multiplies by 2^n+1
(eventually) teach it that some combinations of shift+add are
cheaper than others (e.g. shladd on ia64, scaled adds on alpha)
get it to try multiple booth encodings in search of the cheapest
routine
make it work for negative constants
This is hacked up as a DAG->DAG transform, so once I clean it up I hope
it'll be pulled out of here and put somewhere else. The only thing backends
should really have to worry about for now is where to draw the line
between using this code vs. going ahead and doing an integer multiply
anyway.
llvm-svn: 21560
|
|
|
|
| |
llvm-svn: 21452
|
|
|
|
| |
llvm-svn: 21424
|
|
|
|
| |
llvm-svn: 21299
|
|
|
|
| |
llvm-svn: 21296
|
|
|
|
|
|
|
|
|
|
| |
* fold left shifts of 1, 2, 3 or 4 bits into adds
This doesn't save much now, but should get a serious workout once
multiplies by constants get converted to shift/add/sub sequences.
Hold on! :)
llvm-svn: 21282
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
0x00000..00FFF..FF
^ ^
^ ^
any number of
0's followed by
some number of
1's
then we use dep.z to just paste zeros over the input. For the special
cases where this is zxt1/zxt2/zxt4, we use those instructions instead,
because we're all about readability!!!
that's what it's about!! readability!
*twitch* ;D
llvm-svn: 21279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
things like this:
mov r9 = 65535;;
and r8 = r8, r9;;
To be emitted instead of:
zxt2 r8 = r8;;
To get this back, the selector for ISD::AND should recognize this case.
llvm-svn: 21269
|
|
|
|
| |
llvm-svn: 21247
|
|
|
|
| |
llvm-svn: 21228
|
|
|
|
| |
llvm-svn: 21224
|
|
|
|
|
|
|
|
|
|
|
| |
* clean up immediates (we use 14, 22 and 64 bit immediates now. sane.)
* fold r0/f0/f1 registers into comparisons against 0/0.0/1.0
* fix nasty thinko - didn't use two-address form of conditional add
for extending bools to integers, so occasionally there would be
garbage in the result. it's amazing how often zeros are just
sitting around in registers ;) - this should fix a bunch of tests.
llvm-svn: 21221
|
|
|
|
| |
llvm-svn: 21164
|
|
|
|
|
|
| |
fix hack in division (clean up frcpa instruction)
llvm-svn: 21153
|
|
|
|
| |
llvm-svn: 21130
|
|
|
|
|
|
| |
thanks sampo!!
llvm-svn: 21113
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 21023
|
|
|
|
| |
llvm-svn: 21012
|
|
|
|
| |
llvm-svn: 21010
|
|
|
|
| |
llvm-svn: 20982
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Stop being pessimistic about output register allocation
* Start to handle function descriptors: compute target GPs and so on
when doing indirect calls etc. Not there yet, though. For the moment,
we try to use _indirect_ branches wherever possible, to stress test
function descriptors.
* FP divide-by-zero should work now
* add varargs (it doesn't work, though)
At this point, all of SingleSource passes (modulo C++ tests that are due
to issues with the CFE, see note in the README.) Much of MultiSource also
passes although there's still a ton of bugs around. Something for me to
work on tomorrow, then. :)
llvm-svn: 20960
|
|
|
|
| |
llvm-svn: 20842
|
|
|
|
|
|
| |
request.
llvm-svn: 20804
|
|
|
|
| |
llvm-svn: 20679
|
|
|
|
| |
llvm-svn: 20658
|
|
PHASE 1: write instruction selector
PHASE 2: ???
PHASE 3: profit!
llvm-svn: 20652
|