summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-04-13 20:29:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-04-13 20:29:59 +0000
commit55bd375b69c6ae16727333303ea582ed3b1b3500 (patch)
tree3b3b748bb1d93a405a7fbc10dd0d6c2658c91699 /llvm/lib/CodeGen/CodeGen.cpp
parent257cb4e099cd739b13ac40ef7b7412a34ecafe59 (diff)
downloadbcm5719-llvm-55bd375b69c6ae16727333303ea582ed3b1b3500.tar.gz
bcm5719-llvm-55bd375b69c6ae16727333303ea582ed3b1b3500.zip
Remove all allocation and divisions from GreatestCommonDivisor
Switch from Euclid's algorithm to Stein's algorithm for computing GCD. This avoids the (expensive) APInt division operation in favour of bit operations. Remove all memory allocation from within the GCD loop by tweaking our `lshr` implementation so it can operate in-place. Differential Revision: https://reviews.llvm.org/D31968 llvm-svn: 300252
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud