LLVM 20.0.0git
|
#include "llvm/ADT/APInt.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <optional>
Go to the source code of this file.
Functions | |
static ConstantRange | makeExactMulNUWRegion (const APInt &V) |
Exact mul nuw region for single element RHS. | |
static ConstantRange | makeExactMulNSWRegion (const APInt &V) |
Exact mul nsw region for single element RHS. | |
static ConstantRange | getPreferredRange (const ConstantRange &CR1, const ConstantRange &CR2, ConstantRange::PreferredRangeType Type) |
static ConstantRange | computeShlNUW (const ConstantRange &LHS, const ConstantRange &RHS) |
static ConstantRange | computeShlNSWWithNNegLHS (const APInt &LHSMin, const APInt &LHSMax, unsigned RHSMin, unsigned RHSMax) |
static ConstantRange | computeShlNSWWithNegLHS (const APInt &LHSMin, const APInt &LHSMax, unsigned RHSMin, unsigned RHSMax) |
static ConstantRange | computeShlNSW (const ConstantRange &LHS, const ConstantRange &RHS) |
static ConstantRange | getUnsignedCountTrailingZerosRange (const APInt &Lower, const APInt &Upper) |
static ConstantRange | getUnsignedPopCountRange (const APInt &Lower, const APInt &Upper) |
|
static |
Definition at line 1683 of file ConstantRange.cpp.
References llvm::BitWidth, computeShlNSWWithNegLHS(), computeShlNSWWithNNegLHS(), llvm::APInt::getAllOnes(), llvm::APInt::getZero(), llvm::APInt::isNegative(), llvm::APInt::isNonNegative(), LHS, RHS, llvm::ConstantRange::Signed, and llvm::ConstantRange::unionWith().
Referenced by llvm::ConstantRange::shlWithNoWrap().
|
static |
Definition at line 1664 of file ConstantRange.cpp.
References llvm::BitWidth, llvm::APInt::countLeadingOnes(), llvm::APInt::getBitWidth(), llvm::ConstantRange::getNonEmpty(), llvm::APInt::getSignMask(), llvm::APInt::shl(), and llvm::APInt::sshl_ov().
Referenced by computeShlNSW().
|
static |
Definition at line 1643 of file ConstantRange.cpp.
References llvm::BitWidth, llvm::APInt::countLeadingZeros(), llvm::APInt::getBitsSet(), llvm::APInt::getBitWidth(), llvm::ConstantRange::getNonEmpty(), llvm::APInt::sshl_ov(), and llvm::APIntOps::umax().
Referenced by computeShlNSW().
|
static |
Definition at line 1620 of file ConstantRange.cpp.
References llvm::BitWidth, llvm::APInt::countLeadingZeros(), llvm::APInt::getHighBitsSet(), llvm::ConstantRange::getNonEmpty(), LHS, RHS, llvm::APIntOps::umax(), and llvm::APInt::ushl_ov().
Referenced by llvm::ConstantRange::shlWithNoWrap().
|
static |
Definition at line 560 of file ConstantRange.cpp.
References llvm::ConstantRange::isSignWrappedSet(), llvm::ConstantRange::isSizeStrictlySmallerThan(), llvm::ConstantRange::isWrappedSet(), llvm::ConstantRange::Signed, and llvm::ConstantRange::Unsigned.
Referenced by llvm::ConstantRange::intersectWith(), and llvm::ConstantRange::unionWith().
|
static |
Definition at line 1958 of file ConstantRange.cpp.
References assert(), llvm::BitWidth, llvm::APInt::getZero(), llvm::Lower, and llvm::Upper.
Referenced by llvm::ConstantRange::cttz().
|
static |
Definition at line 2026 of file ConstantRange.cpp.
References assert(), llvm::BitWidth, llvm::countl_zero(), llvm::Lower, and llvm::Upper.
Referenced by llvm::ConstantRange::ctpop().
|
static |
Exact mul nsw region for single element RHS.
Definition at line 290 of file ConstantRange.cpp.
References llvm::BitWidth, llvm::APInt::DOWN, llvm::ConstantRange::getNonEmpty(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm::Lower, llvm::APIntOps::RoundingSDiv(), llvm::APInt::UP, and llvm::Upper.
Referenced by llvm::ConstantRange::makeGuaranteedNoWrapRegion().
|
static |
Exact mul nuw region for single element RHS.
Definition at line 277 of file ConstantRange.cpp.
References llvm::BitWidth, llvm::APInt::DOWN, llvm::APInt::getMaxValue(), llvm::APInt::getMinValue(), llvm::ConstantRange::getNonEmpty(), llvm::APIntOps::RoundingUDiv(), and llvm::APInt::UP.
Referenced by llvm::ConstantRange::makeGuaranteedNoWrapRegion().