LLVM 20.0.0git
|
#include "llvm/ADT/SlowDynamicAPInt.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Functions | |
static unsigned | getMaxWidth (const APInt &A, const APInt &B) |
APInt | runOpWithExpandOnOverflow (const APInt &A, const APInt &B, function_ref< APInt(const APInt &, const APInt &, bool &Overflow)> Op) |
Bring a and b to have the same width and then call op(a, b, overflow). | |
Definition at line 117 of file SlowDynamicAPInt.cpp.
Referenced by llvm::detail::ceilDiv(), llvm::detail::floorDiv(), llvm::detail::gcd(), llvm::detail::SlowDynamicAPInt::operator!=(), llvm::detail::SlowDynamicAPInt::operator<(), llvm::detail::SlowDynamicAPInt::operator<=(), llvm::detail::SlowDynamicAPInt::operator==(), llvm::detail::SlowDynamicAPInt::operator>(), llvm::detail::SlowDynamicAPInt::operator>=(), and runOpWithExpandOnOverflow().
APInt runOpWithExpandOnOverflow | ( | const APInt & | A, |
const APInt & | B, | ||
function_ref< APInt(const APInt &, const APInt &, bool &Overflow)> | Op | ||
) |
Bring a and b to have the same width and then call op(a, b, overflow).
If the overflow bit becomes set, resize a and b to double the width and call op(a, b, overflow), returning its result. The operation with double widths should not also overflow.
Definition at line 159 of file SlowDynamicAPInt.cpp.
References A, assert(), B, and getMaxWidth().
Referenced by llvm::detail::SlowDynamicAPInt::operator*(), llvm::detail::SlowDynamicAPInt::operator+(), llvm::detail::SlowDynamicAPInt::operator-(), and llvm::detail::SlowDynamicAPInt::operator/().