/external/swiftshader/third_party/LLVM/lib/CodeGen/ |
D | ObjectCodeEmitter.cpp | 21 ObjectCodeEmitter::ObjectCodeEmitter() : BO(0) {} in ObjectCodeEmitter() 22 ObjectCodeEmitter::ObjectCodeEmitter(BinaryObject *bo) : BO(bo) {} in ObjectCodeEmitter() 26 void ObjectCodeEmitter::setBinaryObject(BinaryObject *bo) { BO = bo; } in setBinaryObject() 31 BO->emitByte(B); in emitByte() 37 BO->emitWordLE(W); in emitWordLE() 43 BO->emitWordBE(W); in emitWordBE() 49 BO->emitDWordLE(W); in emitDWordLE() 55 BO->emitDWordBE(W); in emitDWordBE() 61 BO->emitAlignment(Alignment, fill); in emitAlignment() 67 BO->emitULEB128Bytes(Value); in emitULEB128Bytes() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | SeparateConstOffsetFromGEP.cpp | 248 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 296 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 447 BinaryOperator *BO, in CanTraceInto() argument 452 if (BO->getOpcode() != Instruction::Add && in CanTraceInto() 453 BO->getOpcode() != Instruction::Sub && in CanTraceInto() 454 BO->getOpcode() != Instruction::Or) { in CanTraceInto() 458 Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1); in CanTraceInto() 461 if (BO->getOpcode() == Instruction::Or && in CanTraceInto() 462 !haveNoCommonBitsSet(LHS, RHS, DL, nullptr, BO, DT)) in CanTraceInto() 476 if (BO->getOpcode() == Instruction::Add && !ZeroExtended && NonNegative) { in CanTraceInto() [all …]
|
D | Reassociate.cpp | 489 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local 492 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() 528 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() 530 Worklist.push_back(std::make_pair(BO, It->second)); in LinearizeExprTree() 559 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) in LinearizeExprTree() local 560 if ((Opcode == Instruction::Mul && BinaryOperator::isNeg(BO)) || in LinearizeExprTree() 561 (Opcode == Instruction::FMul && BinaryOperator::isFNeg(BO))) { in LinearizeExprTree() 563 BO = LowerNegateToMultiply(BO); in LinearizeExprTree() 564 DEBUG(dbgs() << *BO << '\n'); in LinearizeExprTree() 565 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | SeparateConstOffsetFromGEP.cpp | 268 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 320 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 486 BinaryOperator *BO, in CanTraceInto() argument 491 if (BO->getOpcode() != Instruction::Add && in CanTraceInto() 492 BO->getOpcode() != Instruction::Sub && in CanTraceInto() 493 BO->getOpcode() != Instruction::Or) { in CanTraceInto() 497 Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1); in CanTraceInto() 502 if (BO->getOpcode() == Instruction::Or && in CanTraceInto() 503 !haveNoCommonBitsSet(LHS, RHS, DL, nullptr, BO, DT)) in CanTraceInto() 517 if (BO->getOpcode() == Instruction::Add && !ZeroExtended && NonNegative) { in CanTraceInto() [all …]
|
D | Reassociate.cpp | 503 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local 506 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() 544 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() 546 Worklist.push_back(std::make_pair(BO, It->second)); in LinearizeExprTree() 575 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) in LinearizeExprTree() local 576 if ((Opcode == Instruction::Mul && BinaryOperator::isNeg(BO)) || in LinearizeExprTree() 577 (Opcode == Instruction::FMul && BinaryOperator::isFNeg(BO))) { in LinearizeExprTree() 580 BO = LowerNegateToMultiply(BO); in LinearizeExprTree() 581 LLVM_DEBUG(dbgs() << *BO << '\n'); in LinearizeExprTree() 582 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() [all …]
|
D | CorrelatedValuePropagation.cpp | 538 auto *BO = in processUDivOrURem() local 540 auto *Zext = CastInst::Create(Instruction::ZExt, BO, Instr->getType(), in processUDivOrURem() 542 if (BO->getOpcode() == Instruction::UDiv) in processUDivOrURem() 543 BO->setIsExact(Instr->isExact()); in processUDivOrURem() 555 auto *BO = BinaryOperator::CreateURem(SDI->getOperand(0), SDI->getOperand(1), in processSRem() local 557 SDI->replaceAllUsesWith(BO); in processSRem() 561 processUDivOrURem(BO, LVI); in processSRem() 576 auto *BO = BinaryOperator::CreateUDiv(SDI->getOperand(0), SDI->getOperand(1), in processSDiv() local 578 BO->setIsExact(SDI->isExact()); in processSDiv() 579 SDI->replaceAllUsesWith(BO); in processSDiv() [all …]
|
/external/swiftshader/third_party/LLVM/include/llvm/Support/ |
D | NoFolder.h | 42 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 43 if (HasNUW) BO->setHasNoUnsignedWrap(); 44 if (HasNSW) BO->setHasNoSignedWrap(); 45 return BO; 58 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 59 if (HasNUW) BO->setHasNoUnsignedWrap(); 60 if (HasNSW) BO->setHasNoSignedWrap(); 61 return BO; 74 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 75 if (HasNUW) BO->setHasNoUnsignedWrap(); [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/IR/ |
D | NoFolder.h | 44 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 45 if (HasNUW) BO->setHasNoUnsignedWrap(); 46 if (HasNSW) BO->setHasNoSignedWrap(); 47 return BO; 64 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 65 if (HasNUW) BO->setHasNoUnsignedWrap(); 66 if (HasNSW) BO->setHasNoSignedWrap(); 67 return BO; 84 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 85 if (HasNUW) BO->setHasNoUnsignedWrap(); [all …]
|
D | InstrTypes.h | 390 BinaryOperator *BO = Create(Opc, V1, V2, Name); 391 BO->copyIRFlags(CopyBO); 392 return BO; 428 BinaryOperator *BO = Create(Opc, V1, V2, Name); 429 BO->setHasNoSignedWrap(true); 430 return BO; 434 BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); 435 BO->setHasNoSignedWrap(true); 436 return BO; 440 BinaryOperator *BO = Create(Opc, V1, V2, Name, I); [all …]
|
/external/llvm/include/llvm/IR/ |
D | NoFolder.h | 42 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 43 if (HasNUW) BO->setHasNoUnsignedWrap(); 44 if (HasNSW) BO->setHasNoSignedWrap(); 45 return BO; 58 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 59 if (HasNUW) BO->setHasNoUnsignedWrap(); 60 if (HasNSW) BO->setHasNoSignedWrap(); 61 return BO; 74 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 75 if (HasNUW) BO->setHasNoUnsignedWrap(); [all …]
|
D | InstrTypes.h | 393 BinaryOperator *BO = Create(Opc, V1, V2, Name); 394 BO->copyIRFlags(CopyBO); 395 return BO; 400 BinaryOperator *BO = Create(Opc, V1, V2, Name); 401 BO->setHasNoSignedWrap(true); 402 return BO; 406 BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); 407 BO->setHasNoSignedWrap(true); 408 return BO; 412 BinaryOperator *BO = Create(Opc, V1, V2, Name, I); [all …]
|
/external/swiftshader/third_party/LLVM/include/llvm/ |
D | InstrTypes.h | 198 BinaryOperator *BO = Create(Opc, V1, V2, Name); 199 BO->setHasNoSignedWrap(true); 200 return BO; 204 BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); 205 BO->setHasNoSignedWrap(true); 206 return BO; 210 BinaryOperator *BO = Create(Opc, V1, V2, Name, I); 211 BO->setHasNoSignedWrap(true); 212 return BO; 217 BinaryOperator *BO = Create(Opc, V1, V2, Name); [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/ |
D | FormatVariadic.cpp | 96 std::size_t BO = Fmt.find_first_of('{', From); in splitLiteralAndReplacement() local 98 if (BO != 0) in splitLiteralAndReplacement() 99 return std::make_pair(ReplacementItem{Fmt.substr(0, BO)}, Fmt.substr(BO)); in splitLiteralAndReplacement() 102 Fmt.drop_front(BO).take_while([](char C) { return C == '{'; }); in splitLiteralAndReplacement() 107 StringRef Middle = Fmt.substr(BO, NumEscapedBraces); in splitLiteralAndReplacement() 108 StringRef Right = Fmt.drop_front(BO + NumEscapedBraces * 2); in splitLiteralAndReplacement() 114 std::size_t BC = Fmt.find_first_of('}', BO); in splitLiteralAndReplacement() 125 std::size_t BO2 = Fmt.find_first_of('{', BO + 1); in splitLiteralAndReplacement() 130 StringRef Spec = Fmt.slice(BO + 1, BC); in splitLiteralAndReplacement()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineMulDivRem.cpp | 190 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul() local 192 BO->setHasNoSignedWrap(); in visitMul() 193 return BO; in visitMul() 207 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul() local 209 BO->setHasNoUnsignedWrap(); in visitMul() 212 BO->setHasNoSignedWrap(); in visitMul() 213 return BO; in visitMul() 295 BinaryOperator *BO = BinaryOperator::CreateMul(Op0v, Op1v); in visitMul() local 299 BO->setHasNoSignedWrap(); in visitMul() 300 return BO; in visitMul() [all …]
|
D | InstCombineShifts.cpp | 218 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue() local 219 unsigned TypeWidth = BO->getType()->getScalarSizeInBits(); in GetShiftedValue() 222 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in GetShiftedValue() 231 BO->setOperand(1, ConstantInt::get(BO->getType(), NewShAmt)); in GetShiftedValue() 232 BO->setHasNoUnsignedWrap(false); in GetShiftedValue() 233 BO->setHasNoSignedWrap(false); in GetShiftedValue() 241 V = IC.Builder->CreateAnd(BO->getOperand(0), in GetShiftedValue() 242 ConstantInt::get(BO->getContext(), Mask)); in GetShiftedValue() 244 VI->moveBefore(BO); in GetShiftedValue() 245 VI->takeName(BO); in GetShiftedValue() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 211 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue() local 212 unsigned TypeWidth = BO->getType()->getScalarSizeInBits(); in GetShiftedValue() 215 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in GetShiftedValue() 224 BO->setOperand(1, ConstantInt::get(BO->getType(), NewShAmt)); in GetShiftedValue() 225 BO->setHasNoUnsignedWrap(false); in GetShiftedValue() 226 BO->setHasNoSignedWrap(false); in GetShiftedValue() 234 V = IC.Builder->CreateAnd(BO->getOperand(0), in GetShiftedValue() 235 ConstantInt::get(BO->getContext(), Mask)); in GetShiftedValue() 237 VI->moveBefore(BO); in GetShiftedValue() 238 VI->takeName(BO); in GetShiftedValue() [all …]
|
D | InstCombineMulDivRem.cpp | 183 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0); in visitMul() local 184 if (!BO || in visitMul() 185 (BO->getOpcode() != Instruction::UDiv && in visitMul() 186 BO->getOpcode() != Instruction::SDiv)) { in visitMul() 188 BO = dyn_cast<BinaryOperator>(Op1); in visitMul() 191 if (BO && BO->hasOneUse() && in visitMul() 192 (BO->getOperand(1) == Op1C || BO->getOperand(1) == Neg) && in visitMul() 193 (BO->getOpcode() == Instruction::UDiv || in visitMul() 194 BO->getOpcode() == Instruction::SDiv)) { in visitMul() 195 Value *Op0BO = BO->getOperand(0), *Op1BO = BO->getOperand(1); in visitMul() [all …]
|
/external/clang/lib/Analysis/ |
D | ThreadSafetyCommon.cpp | 455 const BinaryOperator *BO, in translateBinOp() argument 457 til::SExpr *E0 = translate(BO->getLHS(), Ctx); in translateBinOp() 458 til::SExpr *E1 = translate(BO->getRHS(), Ctx); in translateBinOp() 466 const BinaryOperator *BO, in translateBinAssign() argument 469 const Expr *LHS = BO->getLHS(); in translateBinAssign() 470 const Expr *RHS = BO->getRHS(); in translateBinAssign() 491 til::SExpr *SExprBuilder::translateBinaryOperator(const BinaryOperator *BO, in translateBinaryOperator() argument 493 switch (BO->getOpcode()) { in translateBinaryOperator() 496 return new (Arena) til::Undefined(BO); in translateBinaryOperator() 498 case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx); in translateBinaryOperator() [all …]
|
/external/spirv-llvm/lib/SPIRV/ |
D | SPIRVRegularizeLLVM.cpp | 134 if (auto BO = dyn_cast<BinaryOperator>(II)) { in regularize() local 135 if (isa<OverflowingBinaryOperator>(BO)) { in regularize() 136 if (BO->hasNoUnsignedWrap()) in regularize() 137 BO->setHasNoUnsignedWrap(false); in regularize() 138 if (BO->hasNoSignedWrap()) in regularize() 139 BO->setHasNoSignedWrap(false); in regularize() 141 if (isa<PossiblyExactOperator>(BO) && BO->isExact()) in regularize() 142 BO->setIsExact(false); in regularize()
|
/external/llvm/lib/Transforms/Utils/ |
D | SimplifyIndVar.cpp | 491 bool SimplifyIndvar::strengthenOverflowingOperation(BinaryOperator *BO, in strengthenOverflowingOperation() argument 495 if (BO->hasNoUnsignedWrap() && BO->hasNoSignedWrap()) in strengthenOverflowingOperation() 501 switch (BO->getOpcode()) { in strengthenOverflowingOperation() 518 unsigned BitWidth = cast<IntegerType>(BO->getType())->getBitWidth(); in strengthenOverflowingOperation() 519 Type *WideTy = IntegerType::get(BO->getContext(), BitWidth * 2); in strengthenOverflowingOperation() 520 const SCEV *LHS = SE->getSCEV(BO->getOperand(0)); in strengthenOverflowingOperation() 521 const SCEV *RHS = SE->getSCEV(BO->getOperand(1)); in strengthenOverflowingOperation() 525 if (!BO->hasNoUnsignedWrap()) { in strengthenOverflowingOperation() 526 const SCEV *ExtendAfterOp = SE->getZeroExtendExpr(SE->getSCEV(BO), WideTy); in strengthenOverflowingOperation() 531 BO->setHasNoUnsignedWrap(); in strengthenOverflowingOperation() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/ |
D | ScalarEvolutionAliasAnalysis.cpp | 78 Value *BO = GetBaseValue(BS); in alias() local 79 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 83 MemoryLocation(BO ? BO : LocB.Ptr, in alias() 84 BO ? +MemoryLocation::UnknownSize : LocB.Size, in alias() 85 BO ? AAMDNodes() : LocB.AATags)) == NoAlias) in alias()
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolutionAliasAnalysis.cpp | 78 Value *BO = GetBaseValue(BS); in alias() local 79 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 83 MemoryLocation(BO ? BO : LocB.Ptr, in alias() 84 BO ? +MemoryLocation::UnknownSize : LocB.Size, in alias() 85 BO ? AAMDNodes() : LocB.AATags)) == NoAlias) in alias()
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | ScalarEvolutionAliasAnalysis.cpp | 161 Value *BO = GetBaseValue(BS); in alias() local 162 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 166 Location(BO ? BO : LocB.Ptr, in alias() 167 BO ? +UnknownSize : LocB.Size, in alias() 168 BO ? 0 : LocB.TBAATag)) == NoAlias) in alias()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/ |
D | SimplifyIndVar.cpp | 95 bool strengthenRightShift(BinaryOperator *BO, Value *IVOperand); 722 bool SimplifyIndvar::strengthenOverflowingOperation(BinaryOperator *BO, in strengthenOverflowingOperation() argument 726 if (BO->hasNoUnsignedWrap() && BO->hasNoSignedWrap()) in strengthenOverflowingOperation() 731 switch (BO->getOpcode()) { in strengthenOverflowingOperation() 748 unsigned BitWidth = cast<IntegerType>(BO->getType())->getBitWidth(); in strengthenOverflowingOperation() 749 Type *WideTy = IntegerType::get(BO->getContext(), BitWidth * 2); in strengthenOverflowingOperation() 750 const SCEV *LHS = SE->getSCEV(BO->getOperand(0)); in strengthenOverflowingOperation() 751 const SCEV *RHS = SE->getSCEV(BO->getOperand(1)); in strengthenOverflowingOperation() 755 if (!BO->hasNoUnsignedWrap()) { in strengthenOverflowingOperation() 756 const SCEV *ExtendAfterOp = SE->getZeroExtendExpr(SE->getSCEV(BO), WideTy); in strengthenOverflowingOperation() [all …]
|
/external/clang/lib/ARCMigrate/ |
D | TransZeroOutPropsInDealloc.cpp | 154 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) in isZeroingPropIvar() local 155 return isZeroingPropIvar(BO); in isZeroingPropIvar() 194 BinaryOperator *BO = dyn_cast<BinaryOperator>(PO->getSyntacticForm()); in isZeroingPropIvar() local 195 if (!BO) return false; in isZeroingPropIvar() 196 if (BO->getOpcode() != BO_Assign) return false; in isZeroingPropIvar() 199 dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParens()); in isZeroingPropIvar() 211 return isZero(cast<OpaqueValueExpr>(BO->getRHS())->getSourceExpr()); in isZeroingPropIvar()
|