| /freebsd-13.1/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | ConstantFolder.h | 44 return ConstantExpr::getFAdd(LHS, RHS); in CreateFAdd() 53 return ConstantExpr::getFSub(LHS, RHS); in CreateFSub() 62 return ConstantExpr::getFMul(LHS, RHS); in CreateFMul() 76 return ConstantExpr::getFDiv(LHS, RHS); in CreateFDiv() 80 return ConstantExpr::getURem(LHS, RHS); in CreateURem() 107 return ConstantExpr::getAnd(LHS, RHS); in CreateAnd() 111 return ConstantExpr::getOr(LHS, RHS); in CreateOr() 115 return ConstantExpr::getXor(LHS, RHS); in CreateXor() 133 return ConstantExpr::getFNeg(C); in CreateFNeg() 137 return ConstantExpr::getNot(C); in CreateNot() [all …]
|
| H A D | Operator.h | 44 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode() 52 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode() 77 friend class ConstantExpr; variable 115 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof() 129 friend class ConstantExpr; variable 156 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof() 426 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof() 461 friend class ConstantExpr; variable 599 friend class ConstantExpr; variable 627 friend class ConstantExpr; variable [all …]
|
| H A D | ReplaceConstant.h | 26 Instruction *createReplacementInstr(ConstantExpr *CE, Instruction *Instr); 35 Instruction *I, ConstantExpr *CE, 47 std::map<Use *, std::vector<std::vector<ConstantExpr *>>> &CEPaths, 55 Instruction *I, ConstantExpr *CE, 56 std::map<Use *, std::vector<std::vector<ConstantExpr *>>> &CEPaths);
|
| /freebsd-13.1/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | TargetFolder.h | 54 return Fold(ConstantExpr::getFAdd(LHS, RHS)); in CreateFAdd() 61 return Fold(ConstantExpr::getFSub(LHS, RHS)); in CreateFSub() 68 return Fold(ConstantExpr::getFMul(LHS, RHS)); in CreateFMul() 79 return Fold(ConstantExpr::getFDiv(LHS, RHS)); in CreateFDiv() 82 return Fold(ConstantExpr::getURem(LHS, RHS)); in CreateURem() 103 return Fold(ConstantExpr::getAnd(LHS, RHS)); in CreateAnd() 106 return Fold(ConstantExpr::getOr(LHS, RHS)); in CreateOr() 109 return Fold(ConstantExpr::getXor(LHS, RHS)); in CreateXor() 126 return Fold(ConstantExpr::getFNeg(C)); in CreateFNeg() 129 return Fold(ConstantExpr::getNot(C)); in CreateNot() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/IR/ |
| H A D | ReplaceConstant.cpp | 28 void convertConstantExprsToInstructions(Instruction *I, ConstantExpr *CE, in convertConstantExprsToInstructions() 31 std::map<Use *, std::vector<std::vector<ConstantExpr *>>> CEPaths; in convertConstantExprsToInstructions() 41 std::map<Use *, std::vector<std::vector<ConstantExpr *>>> &CEPaths, in convertConstantExprsToInstructions() 43 SmallPtrSet<ConstantExpr *, 8> Visited; in convertConstantExprsToInstructions() 79 Instruction *I, ConstantExpr *CE, in collectConstantExprPaths() 83 auto *CE2 = dyn_cast<ConstantExpr>(U.get()); in collectConstantExprPaths() 88 std::vector<std::vector<ConstantExpr *>> Paths; in collectConstantExprPaths() 91 std::vector<ConstantExpr *> Path{CE2}; in collectConstantExprPaths() 92 std::vector<std::vector<ConstantExpr *>> Stack{Path}; in collectConstantExprPaths() 94 std::vector<ConstantExpr *> TPath = Stack.back(); in collectConstantExprPaths() [all …]
|
| H A D | ConstantsContext.h | 64 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 91 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 117 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 144 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 172 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 182 : ConstantExpr(VectorType::get( in ShuffleVectorConstantExpr() 208 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 238 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 269 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() 302 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof() [all …]
|
| H A D | ConstantFold.cpp | 236 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes() 373 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in ConstantFoldCastInstruction() 604 if (ConstantExpr *TrueVal = dyn_cast<ConstantExpr>(V1)) { in ConstantFoldSelectInstruction() 1112 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) in ConstantFoldBinaryInstruction() 1243 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction() 1399 ConstantExpr *CE1 = cast<ConstantExpr>(V1); in evaluateFCmpRelation() 1543 ConstantExpr *CE1 = cast<ConstantExpr>(V1); in evaluateICmpRelation() 1626 ConstantExpr *CE2 = cast<ConstantExpr>(V2); in evaluateICmpRelation() 1883 (isa<ConstantExpr>(C1) || isa<ConstantExpr>(C2))) { in ConstantFoldCompareInstruction() 2022 if (ConstantExpr *CE2 = dyn_cast<ConstantExpr>(C2)) { in ConstantFoldCompareInstruction() [all …]
|
| H A D | Constants.cpp | 397 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue() 579 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in canTrapImpl() 585 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) { in canTrapImpl() 677 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) { in getRelocationInfo() 679 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in getRelocationInfo() 680 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in getRelocationInfo() 1458 bool ConstantExpr::isCast() const { in isCast() 1462 bool ConstantExpr::isCompare() const { in isCompare() 1488 bool ConstantExpr::hasIndices() const { in hasIndices() 1564 return ConstantExpr::getFNeg(Ops[0]); in getWithOperands() [all …]
|
| H A D | Core.cpp | 1509 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf() 1513 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf() 1662 return wrap(ConstantExpr::getICmp(Predicate, in LLVMConstICmp() 1669 return wrap(ConstantExpr::getFCmp(Predicate, in LLVMConstFCmp() 2810 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst))) in LLVMGetICmpPredicate() 2819 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst))) in LLVMGetFCmpPredicate() 3038 if (auto *CE = dyn_cast<ConstantExpr>(I)) in LLVMGetNumIndices() 3050 if (auto *CE = dyn_cast<ConstantExpr>(I)) in LLVMGetIndices() 3494 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty)); in LLVMBuildMalloc() 3495 AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, ITy); in LLVMBuildMalloc() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | Evaluator.cpp | 83 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper() 140 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit() 198 Ptr = ConstantExpr::getGetElementPtr(Ty, Ptr, IdxList); in evaluateBitcastFromPtr() 228 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) { in ComputeLoadResult() 272 auto *CE = dyn_cast<ConstantExpr>(V); in getCalleeWithFormalArgs() 309 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr); in castCallResultIfNeeded() 363 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock() 406 InstResult = ConstantExpr::get(BO->getOpcode(), in EvaluateBlock() 418 InstResult = ConstantExpr::getCast(CI->getOpcode(), in EvaluateBlock() 430 InstResult = ConstantExpr::getExtractValue( in EvaluateBlock() [all …]
|
| H A D | SanitizerStats.cpp | 52 ConstantExpr::getIntToPtr( in create() 62 auto InitAddr = ConstantExpr::getGetElementPtr( in create() 68 B.CreateCall(StatReport, ConstantExpr::getBitCast(InitAddr, Int8PtrTy)); in create() 90 ConstantExpr::getBitCast(NewModuleStatsGV, ModuleStatsGV->getType())); in finish() 103 B.CreateCall(StatInit, ConstantExpr::getBitCast(NewModuleStatsGV, Int8PtrTy)); in finish()
|
| H A D | RelLookupTableConverter.cpp | 111 Constant *Base = llvm::ConstantExpr::getPtrToInt(RelLookupTable, IntPtrTy); in createRelLookupTable() 112 Constant *Target = llvm::ConstantExpr::getPtrToInt(Element, IntPtrTy); in createRelLookupTable() 113 Constant *Sub = llvm::ConstantExpr::getSub(Target, Base); in createRelLookupTable() 115 llvm::ConstantExpr::getTrunc(Sub, Type::getInt32Ty(M.getContext())); in createRelLookupTable()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Bitcode/Reader/ |
| H A D | ValueList.cpp | 33 class ConstantPlaceHolder : public ConstantExpr { 36 : ConstantExpr(Ty, Instruction::UserOp1, &Op<0>(), 1) { in ConstantPlaceHolder() 47 return isa<ConstantExpr>(V) && in classof() 48 cast<ConstantExpr>(V)->getOpcode() == Instruction::UserOp1; in classof() 203 assert(isa<ConstantExpr>(UserC) && "Must be a ConstantExpr."); in resolveConstantForwardRefs() 204 NewC = cast<ConstantExpr>(UserC)->getWithOperands(NewOps); in resolveConstantForwardRefs()
|
| /freebsd-13.1/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/ |
| H A D | ConstantHoisting.h | 55 class ConstantExpr; variable 86 ConstantExpr *ConstExpr; 89 ConstantCandidate(ConstantInt *ConstInt, ConstantExpr *ConstExpr=nullptr) : 118 ConstantExpr *BaseExpr; 146 using ConstPtrUnionType = PointerUnion<ConstantInt *, ConstantExpr *>; 180 ConstantExpr *ConstExpr);
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | ConstantFolding.cpp | 203 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast() 241 Src = ConstantExpr::getShl(Src, in FoldBitCast() 246 Elt = ConstantExpr::getOr(Elt, Src); in FoldBitCast() 326 auto *CE = dyn_cast<ConstantExpr>(C); in IsConstantOffsetFromGlobal() 687 auto *CE = dyn_cast<ConstantExpr>(C); in ConstantFoldLoadFromConstPtr() 885 Ptr = ConstantExpr::getPointerCast( in StripPtrCastKeepAS() 1132 return ConstantExpr::getExtractValue( in ConstantFoldInstOperandsImpl() 1137 return ConstantExpr::getShuffleVector( in ConstantFoldInstOperandsImpl() 1343 } else if (isa<ConstantExpr>(Ops1)) { in ConstantFoldCompareInstOperands() 1357 return ConstantExpr::get(Opcode, Op); in ConstantFoldUnaryOpOperand() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | InferAddressSpaces.cpp | 399 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in appendsFlatAddressExpressionToPostorderStack() 414 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Op->getOperand(I))) { in appendsFlatAddressExpressionToPostorderStack() 515 return ConstantExpr::getAddrSpaceCast(C, NewPtrTy); in operandWithNewAddressSpaceOrCreateUndef() 635 ConstantExpr *CE, unsigned NewAddrSpace, in cloneConstantExprWithNewAddressSpace() 649 return ConstantExpr::getBitCast(CE->getOperand(0), TargetType); in cloneConstantExprWithNewAddressSpace() 655 return ConstantExpr::getAddrSpaceCast(CE, TargetType); in cloneConstantExprWithNewAddressSpace() 664 return ConstantExpr::getSelect( in cloneConstantExprWithNewAddressSpace() 666 ConstantExpr::getAddrSpaceCast(Src1, TargetType)); in cloneConstantExprWithNewAddressSpace() 674 return ConstantExpr::getBitCast(Src, TargetType); in cloneConstantExprWithNewAddressSpace() 692 if (auto CExpr = dyn_cast<ConstantExpr>(Operand)) in cloneConstantExprWithNewAddressSpace() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/XCore/ |
| H A D | XCoreLowerThreadLocal.cpp | 79 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { in replaceConstantExprOp() 100 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU); in replaceConstantExprOp() 118 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU); in rewriteNonInstructionUses()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 254 NewMask = ConstantExpr::getNot(ExtendedInvertedMask); in dropRedundantMaskingOfLeftShiftInput() 282 auto *ExtendedNumHighBitsToClear = ConstantExpr::getZExt( in dropRedundantMaskingOfLeftShiftInput() 295 NewMask = ConstantExpr::getTrunc(NewMask, NarrowestTy); in dropRedundantMaskingOfLeftShiftInput() 353 match(ConstantExpr::getAdd(C0, C1), in foldShiftOfShiftedLogic() 366 Constant *ShiftSumC = ConstantExpr::getAdd(C0, C1); in foldShiftOfShiftedLogic() 707 Constant *ShAmt = ConstantExpr::getZExt(Op1, SrcTy); in FoldShiftByConstant() 723 MaskV = ConstantExpr::get(I.getOpcode(), MaskV, ShAmt); in FoldShiftByConstant() 813 Constant *NewRHS = ConstantExpr::get(I.getOpcode(), in FoldShiftByConstant() 830 Constant *NewRHS = ConstantExpr::get(I.getOpcode(), in FoldShiftByConstant() 857 Constant *NewRHS = ConstantExpr::get(I.getOpcode(), in FoldShiftByConstant() [all …]
|
| H A D | InstCombineMulDivRem.cpp | 176 Constant *Shl = ConstantExpr::getShl(C1, C2); in visitMul() 471 Constant *CC1 = ConstantExpr::getFMul(C, C1); in visitFMul() 477 Constant *CDivC1 = ConstantExpr::getFDiv(C, C1); in visitFMul() 483 Constant *C1DivC = ConstantExpr::getFDiv(C1, C); in visitFMul() 493 Constant *CC1 = ConstantExpr::getFMul(C, C1); in visitFMul() 499 Constant *CC1 = ConstantExpr::getFMul(C, C1); in visitFMul() 917 Constant *Log2Base = ConstantExpr::getExactLogBase2(CI); in foldUDivShl() 992 if (ConstantExpr::getZExt(TruncC, Ty) != C) in narrowUDivURem() 1132 Op1 = ConstantExpr::getNeg(cast<Constant>(Op1)); in visitSDiv() 1268 NewC = ConstantExpr::getFDiv(C, C2); in foldFDivConstantDividend() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
| H A D | GlobalOpt.cpp | 240 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupPointerRootUsers() 310 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupConstantGlobalUsers() 334 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>( in CleanupConstantGlobalUsers() 433 (!isa<ConstantExpr>(U) || in GlobalUsersSafeToSRA() 521 assert(((isa<ConstantExpr>(GEP) && cast<ConstantExpr>(GEP)->getOpcode() == in SRAGlobal() 598 assert(((isa<ConstantExpr>(GEP) && in SRAGlobal() 613 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) { in SRAGlobal() 1410 if (!isa<ConstantExpr>(U)) in allNonInstructionUsersCanBeMadeInstructions() 1429 if (isa<ConstantExpr>(U)) in makeAllConstantUsesInstructions() 2100 ConstantExpr *CE = cast<ConstantExpr>(Addr); in CommitValueTo() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUOpenCLEnqueuedBlockLowering.cpp | 127 if (!isa<ConstantExpr>(UU)) in runOnModule() 130 auto *BitCast = cast<ConstantExpr>(UU); in runOnModule() 131 auto *NewPtr = ConstantExpr::getPointerCast(GV, BitCast->getType()); in runOnModule()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
| H A D | NVVMReflect.cpp | 136 assert(isa<ConstantExpr>(Str) && in runNVVMReflect() 138 const ConstantExpr *GEP = cast<ConstantExpr>(Str); in runNVVMReflect()
|
| H A D | NVPTXGenericToNVVM.cpp | 52 Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C, 142 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType()); in runOnModule() 184 } else if (isa<ConstantExpr>(C)) { in remapConstant() 188 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder); in remapConstant() 234 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C, in remapConstantExpr()
|
| /freebsd-13.1/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ |
| H A D | IRForTarget.cpp | 479 Constant *bytes_arg = cstr ? ConstantExpr::getBitCast(cstr, i8_ptr_ty) in RewriteObjCConstString() 620 ConstantExpr *nsstring_expr = dyn_cast<ConstantExpr>(nsstring_member); in RewriteObjCConstStrings() 785 ConstantExpr *osr_initializer_expr = dyn_cast<ConstantExpr>(osr_initializer); in RewriteObjCSelector() 860 Constant *omvn_pointer = ConstantExpr::getBitCast( in RewriteObjCSelector() 944 ConstantExpr *ocr_initializer_expr = dyn_cast<ConstantExpr>(ocr_initializer); in RewriteObjCClassReference() 1012 Constant *ocn_pointer = ConstantExpr::getBitCast( in RewriteObjCClassReference() 1179 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr)) { in MaybeHandleVariable() 1290 ConstantExpr::getIntToPtr(symbol_addr_int, symbol_type); in HandleSymbol() 1365 ConstantExpr::getIntToPtr(class_addr, load_instruction->getType()); in HandleObjCClass() 1473 if (auto CE = dyn_cast<ConstantExpr>(V)) { in isGuardVariableRef() [all …]
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AMDGPU/Utils/ |
| H A D | AMDGPULDSUtils.h | 22 class ConstantExpr; variable 65 void replaceConstantUsesInFunction(ConstantExpr *C, const Function *F);
|