diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-10-16 21:02:04 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-10-17 16:41:49 +0200 |
commit | 274b2439f8392796e04e366ce5ff47434bd077e1 (patch) | |
tree | 25777a8a6bd5cad799642c036ce758d297305b63 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 91373bf12ec66591addf56b9f447ec9befd6ddae (diff) | |
download | llvm-274b2439f8392796e04e366ce5ff47434bd077e1.zip llvm-274b2439f8392796e04e366ce5ff47434bd077e1.tar.gz llvm-274b2439f8392796e04e366ce5ff47434bd077e1.tar.bz2 |
[ConstantRange] Add fast signed multiply
The multiply() implementation is very slow -- it performs six
multiplications in double the bitwidth, which means that it will
typically work on allocated APInts and bypass fast-path
implementations. Add an additional implementation that doesn't
try to produce anything better than a full range if overflow is
possible. At least for the BasicAA use-case, we really don't care
about more precise modeling of overflow behavior. The current
use of multiply() is fine while the implementation is limited to
a single index, but extending it to the multiple-index case makes
the compile-time impact untenable.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions