aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-10-16 21:02:04 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-10-17 16:41:49 +0200
commit274b2439f8392796e04e366ce5ff47434bd077e1 (patch)
tree25777a8a6bd5cad799642c036ce758d297305b63 /clang/lib/CodeGen/CodeGenModule.cpp
parent91373bf12ec66591addf56b9f447ec9befd6ddae (diff)
downloadllvm-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