reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Derived Classes

include/llvm/IR/Operator.h
  407 class ConcreteOperator : public SuperClass {

References

include/llvm/Analysis/InstructionSimplify.h
   71   template <class InstT> bool hasNoUnsignedWrap(const InstT *Op) const {
   77   template <class InstT> bool hasNoSignedWrap(const InstT *Op) const {
include/llvm/IR/Operator.h
  407 class ConcreteOperator : public SuperClass {
  422   : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {
  425   : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {
  428   : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {
  431   : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {
include/llvm/IR/PatternMatch.h
  919     if (auto *Op = dyn_cast<OverflowingBinaryOperator>(V)) {
  919     if (auto *Op = dyn_cast<OverflowingBinaryOperator>(V)) {
  922       if (WrapFlags & OverflowingBinaryOperator::NoUnsignedWrap &&
  925       if (WrapFlags & OverflowingBinaryOperator::NoSignedWrap &&
  936                                  OverflowingBinaryOperator::NoSignedWrap>
  939                                    OverflowingBinaryOperator::NoSignedWrap>(
  944                                  OverflowingBinaryOperator::NoSignedWrap>
  947                                    OverflowingBinaryOperator::NoSignedWrap>(
  952                                  OverflowingBinaryOperator::NoSignedWrap>
  955                                    OverflowingBinaryOperator::NoSignedWrap>(
  960                                  OverflowingBinaryOperator::NoSignedWrap>
  963                                    OverflowingBinaryOperator::NoSignedWrap>(
  969                                  OverflowingBinaryOperator::NoUnsignedWrap>
  972                                    OverflowingBinaryOperator::NoUnsignedWrap>(
  977                                  OverflowingBinaryOperator::NoUnsignedWrap>
  980                                    OverflowingBinaryOperator::NoUnsignedWrap>(
  985                                  OverflowingBinaryOperator::NoUnsignedWrap>
  988                                    OverflowingBinaryOperator::NoUnsignedWrap>(
  993                                  OverflowingBinaryOperator::NoUnsignedWrap>
  996                                    OverflowingBinaryOperator::NoUnsignedWrap>(
include/llvm/Support/Casting.h
   58     return To::classof(&Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  142   return isa_impl_wrap<X, const Y,
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
lib/Analysis/BasicAliasAnalysis.cpp
  365       if (isa<OverflowingBinaryOperator>(BOp)) {
lib/Analysis/InstructionSimplify.cpp
 1021     auto *Mul = cast<OverflowingBinaryOperator>(Op0);
 1021     auto *Mul = cast<OverflowingBinaryOperator>(Op0);
 1622   auto *AddInst = cast<OverflowingBinaryOperator>(Op0->getOperand(0));
 1622   auto *AddInst = cast<OverflowingBinaryOperator>(Op0->getOperand(0));
 2682            Q.IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(LBO))) ||
 2684            Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(LBO)));
 2692            Q.IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(RBO))) ||
 2694            Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(RBO)));
 2912         if (Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(LBO)) ||
 2913             Q.IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(LBO)) ||
 3690     if (isa<OverflowingBinaryOperator>(B))
lib/Analysis/LazyValueInfo.cpp
 1095   if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(BO)) {
 1095   if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(BO)) {
 1098       NoWrapKind |= OverflowingBinaryOperator::NoUnsignedWrap;
 1100       NoWrapKind |= OverflowingBinaryOperator::NoSignedWrap;
lib/Analysis/LoopAccessAnalysis.cpp
  975   if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(NonConstIndex))
  975   if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(NonConstIndex))
lib/Analysis/ScalarEvolution.cpp
 2342   using OBO = OverflowingBinaryOperator;
 3884     if (isa<OverflowingBinaryOperator>(I)) {
 4438   using OBO = OverflowingBinaryOperator;
 4484     if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(Op)) {
 4484     if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(Op)) {
lib/Analysis/ScalarEvolutionExpander.cpp
  192         if (isa<OverflowingBinaryOperator>(I)) {
 1318     if (isa<OverflowingBinaryOperator>(IncV)) {
lib/Analysis/ValueTracking.cpp
 1036     bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I));
 1171     bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I));
 1222     bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I));
 1228     bool NSW = Q.IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(I));
 1388           auto *OverflowOp = dyn_cast<OverflowingBinaryOperator>(LU);
 1388           auto *OverflowOp = dyn_cast<OverflowingBinaryOperator>(LU);
 1794     const OverflowingBinaryOperator *VOBO = cast<OverflowingBinaryOperator>(V);
 1794     const OverflowingBinaryOperator *VOBO = cast<OverflowingBinaryOperator>(V);
 2129     const OverflowingBinaryOperator *BO = cast<OverflowingBinaryOperator>(V);
 2129     const OverflowingBinaryOperator *BO = cast<OverflowingBinaryOperator>(V);
 2202     const OverflowingBinaryOperator *BO = cast<OverflowingBinaryOperator>(V);
 2202     const OverflowingBinaryOperator *BO = cast<OverflowingBinaryOperator>(V);
 5426       if (IIQ.hasNoUnsignedWrap(cast<OverflowingBinaryOperator>(&BO))) {
 5429       } else if (IIQ.hasNoSignedWrap(cast<OverflowingBinaryOperator>(&BO))) {
lib/AsmParser/LLParser.cpp
 3509     if (NUW)   Flags |= OverflowingBinaryOperator::NoUnsignedWrap;
 3510     if (NSW)   Flags |= OverflowingBinaryOperator::NoSignedWrap;
lib/Bitcode/Reader/BitcodeReader.cpp
 2547               Flags |= OverflowingBinaryOperator::NoSignedWrap;
 2549               Flags |= OverflowingBinaryOperator::NoUnsignedWrap;
lib/Bitcode/Writer/BitcodeWriter.cpp
 1392   if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) {
 1392   if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) {
lib/CodeGen/CodeGenPrepare.cpp
 3739   if (BinOp && isa<OverflowingBinaryOperator>(BinOp) &&
lib/CodeGen/MachineInstr.cpp
  529   if (const OverflowingBinaryOperator *OB =
  530           dyn_cast<OverflowingBinaryOperator>(&I)) {
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 3113   if (auto *OFBinOp = dyn_cast<OverflowingBinaryOperator>(&I)) {
 3167     if (const OverflowingBinaryOperator *OFBinOp =
 3168             dyn_cast<const OverflowingBinaryOperator>(&I)) {
lib/IR/AsmWriter.cpp
 1273   if (const OverflowingBinaryOperator *OBO =
 1274         dyn_cast<OverflowingBinaryOperator>(U)) {
lib/IR/ConstantRange.cpp
  228   using OBO = OverflowingBinaryOperator;
  864   using OBO = OverflowingBinaryOperator;
lib/IR/Constants.cpp
 2252   unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) |
 2253                    (HasNSW ? OverflowingBinaryOperator::NoSignedWrap   : 0);
 2263   unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) |
 2264                    (HasNSW ? OverflowingBinaryOperator::NoSignedWrap   : 0);
 2274   unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) |
 2275                    (HasNSW ? OverflowingBinaryOperator::NoSignedWrap   : 0);
 2323   unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) |
 2324                    (HasNSW ? OverflowingBinaryOperator::NoSignedWrap   : 0);
 3037     if (isa<OverflowingBinaryOperator>(BO)) {
 3039                                OverflowingBinaryOperator::NoUnsignedWrap);
 3041                              OverflowingBinaryOperator::NoSignedWrap);
lib/IR/Instruction.cpp
  101   cast<OverflowingBinaryOperator>(this)->setHasNoUnsignedWrap(b);
  105   cast<OverflowingBinaryOperator>(this)->setHasNoSignedWrap(b);
  113   return cast<OverflowingBinaryOperator>(this)->hasNoUnsignedWrap();
  117   return cast<OverflowingBinaryOperator>(this)->hasNoSignedWrap();
  126     cast<OverflowingBinaryOperator>(this)->setHasNoUnsignedWrap(false);
  127     cast<OverflowingBinaryOperator>(this)->setHasNoSignedWrap(false);
  245   if (IncludeWrapFlags && isa<OverflowingBinaryOperator>(this)) {
  246     if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) {
  268   if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) {
  269     if (isa<OverflowingBinaryOperator>(this)) {
lib/IR/IntrinsicInst.cpp
  261     return OverflowingBinaryOperator::NoSignedWrap;
  263     return OverflowingBinaryOperator::NoUnsignedWrap;
lib/Target/ARM/ARMCodeGenPrepare.cpp
  419   if (!isa<OverflowingBinaryOperator>(V))
lib/Transforms/InstCombine/InstCombineCasts.cpp
   40     OverflowingBinaryOperator *OBI = dyn_cast<OverflowingBinaryOperator>(Val);
   40     OverflowingBinaryOperator *OBI = dyn_cast<OverflowingBinaryOperator>(Val);
lib/Transforms/InstCombine/InstCombineCompares.cpp
 3691   if (BO0 && isa<OverflowingBinaryOperator>(BO0))
 3696   if (BO1 && isa<OverflowingBinaryOperator>(BO1))
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  287         cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap() &&
  288         cast<OverflowingBinaryOperator>(Op1)->hasNoSignedWrap())
  726         auto *OBO = cast<OverflowingBinaryOperator>(Op0);
  726         auto *OBO = cast<OverflowingBinaryOperator>(Op0);
  752         auto *OBO = cast<OverflowingBinaryOperator>(Op0);
  752         auto *OBO = cast<OverflowingBinaryOperator>(Op0);
  800     bool HasNSW = cast<OverflowingBinaryOperator>(Op1)->hasNoSignedWrap();
  801     bool HasNUW = cast<OverflowingBinaryOperator>(Op1)->hasNoUnsignedWrap();
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  460     bool NSW = cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap();
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
 1240       if (isa<OverflowingBinaryOperator>(BO)) {
lib/Transforms/InstCombine/InstructionCombining.cpp
  204   auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
  204   auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
  227   auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
  227   auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
  232   auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
  232   auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
  599       if (isa<OverflowingBinaryOperator>(SimplifiedInst)) {
  602         if (isa<OverflowingBinaryOperator>(&I)) {
  607         if (auto *LOBO = dyn_cast<OverflowingBinaryOperator>(LHS)) {
  607         if (auto *LOBO = dyn_cast<OverflowingBinaryOperator>(LHS)) {
  612         if (auto *ROBO = dyn_cast<OverflowingBinaryOperator>(RHS)) {
  612         if (auto *ROBO = dyn_cast<OverflowingBinaryOperator>(RHS)) {
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  741   using OBO = OverflowingBinaryOperator;
lib/Transforms/Scalar/IndVarSimplify.cpp
 1269   const OverflowingBinaryOperator *OBO =
 1270     cast<OverflowingBinaryOperator>(DU.NarrowUse);
 1433   const OverflowingBinaryOperator *OBO =
 1434     cast<OverflowingBinaryOperator>(NarrowUse);
 1846         *NarrowDefRHS, OverflowingBinaryOperator::NoSignedWrap);
lib/Transforms/Utils/SimplifyIndVar.cpp
  907       if ((isa<OverflowingBinaryOperator>(BO) &&
unittests/IR/ConstantRangeTest.cpp
  760   typedef OverflowingBinaryOperator OBO;
 1379   typedef OverflowingBinaryOperator OBO;
 1635       Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap,
 1642       Instruction::Add, OverflowingBinaryOperator::NoSignedWrap,
 1649       Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrap,
 1656       Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap,
 1663       Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrap,
 1670       Instruction::Mul, OverflowingBinaryOperator::NoSignedWrap,
 1677                              OverflowingBinaryOperator::NoUnsignedWrap,
 1684                              OverflowingBinaryOperator::NoSignedWrap,