summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorDuraid Madina <duraid@octopus.com.au>2005-04-26 07:23:02 +0000
committerDuraid Madina <duraid@octopus.com.au>2005-04-26 07:23:02 +0000
commit81ebb5777128f34c33aa6e28177f0a3b8438f77a (patch)
tree2d43051c2c1a840e0eb09d4e132d70b579efe9b4 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent76dab9a5238ee8c2d34b4dd56e471bbdfe780c04 (diff)
downloadbcm5719-llvm-81ebb5777128f34c33aa6e28177f0a3b8438f77a.tar.gz
bcm5719-llvm-81ebb5777128f34c33aa6e28177f0a3b8438f77a.zip
* Add code to reduce multiplies by constant integers to shifts, adds and
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud