/external/swiftshader/third_party/llvm-7.0/llvm/tools/llvm-c-test/ |
D | echo.cpp | 222 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M); 224 static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant() argument 225 LLVMValueRef Ret = clone_constant_impl(Cst, M); in clone_constant() 226 check_value_kind(Ret, LLVMGetValueKind(Cst)); in clone_constant() 230 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant_impl() argument 231 if (!LLVMIsAConstant(Cst)) in clone_constant_impl() 235 if (LLVMIsAGlobalValue(Cst)) { in clone_constant_impl() 237 const char *Name = LLVMGetValueName2(Cst, &NameLen); in clone_constant_impl() 240 if (LLVMIsAFunction(Cst)) { in clone_constant_impl() 241 check_value_kind(Cst, LLVMFunctionValueKind); in clone_constant_impl() [all …]
|
/external/llvm/tools/llvm-c-test/ |
D | echo.cpp | 220 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M); 222 static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant() argument 223 LLVMValueRef Ret = clone_constant_impl(Cst, M); in clone_constant() 224 check_value_kind(Ret, LLVMGetValueKind(Cst)); in clone_constant() 228 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant_impl() argument 229 if (!LLVMIsAConstant(Cst)) in clone_constant_impl() 233 if (LLVMIsAGlobalValue(Cst)) { in clone_constant_impl() 234 const char *Name = LLVMGetValueName(Cst); in clone_constant_impl() 237 if (LLVMIsAFunction(Cst)) { in clone_constant_impl() 238 check_value_kind(Cst, LLVMFunctionValueKind); in clone_constant_impl() [all …]
|
/external/llvm/lib/Target/AArch64/ |
D | AArch64PromoteConstant.cpp | 250 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument 316 static bool shouldConvertImpl(const Constant *Cst) { in shouldConvertImpl() argument 317 if (isa<const UndefValue>(Cst)) in shouldConvertImpl() 327 if (Cst->isZeroValue()) in shouldConvertImpl() 334 if (Cst->getType()->isVectorTy()) in shouldConvertImpl() 336 return isConstantUsingVectorTy(Cst->getType()); in shouldConvertImpl() 543 Constant *Cst = dyn_cast<Constant>(U); in runOnFunction() local 547 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst)) in runOnFunction() 551 if (!shouldConvert(*Cst, PromotionCache)) in runOnFunction() 556 if (!shouldConvertUse(Cst, &I, OpNo)) in runOnFunction() [all …]
|
D | AArch64AddressTypePromotion.cpp | 321 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in propagateSignExtension() local 324 Cst->getSExtValue())); in propagateSignExtension()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AArch64/ |
D | AArch64PromoteConstant.cpp | 258 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument 324 static bool shouldConvertImpl(const Constant *Cst) { in shouldConvertImpl() argument 325 if (isa<const UndefValue>(Cst)) in shouldConvertImpl() 335 if (Cst->isZeroValue()) in shouldConvertImpl() 342 if (Cst->getType()->isVectorTy()) in shouldConvertImpl() 344 return isConstantUsingVectorTy(Cst->getType()); in shouldConvertImpl() 550 Constant *Cst = dyn_cast<Constant>(U); in runOnFunction() local 554 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst)) in runOnFunction() 558 if (!shouldConvert(*Cst, PromotionCache)) in runOnFunction() 563 if (!shouldConvertUse(Cst, &I, OpNo)) in runOnFunction() [all …]
|
/external/swiftshader/third_party/LLVM/include/llvm/MC/ |
D | MCValue.h | 39 int64_t Cst; variable 42 int64_t getConstant() const { return Cst; } in getConstant() 59 R.Cst = Val; 67 R.Cst = Val; in get()
|
/external/llvm/include/llvm/MC/ |
D | MCValue.h | 42 int64_t Cst; variable 46 int64_t getConstant() const { return Cst; } in getConstant() 66 R.Cst = Val; 75 R.Cst = Val; in get()
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/MC/ |
D | MCValue.h | 42 int64_t Cst = 0; variable 47 int64_t getConstant() const { return Cst; } in getConstant() 67 R.Cst = Val; 76 R.Cst = Val; in get()
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/CodeGen/GlobalISel/ |
D | PatternMatchTest.cpp | 138 int64_t Cst; in TEST() local 139 bool match = mi_match(MIBCst->getOperand(0).getReg(), MRI, m_ICst(Cst)); in TEST() 141 ASSERT_EQ(Cst, 42); in TEST() 193 int64_t Cst; in TEST() local 195 m_GMul(m_ICst(Cst), m_Reg(Src0))); in TEST() 197 ASSERT_EQ(Cst, 42); in TEST() 203 m_GSub(m_ICst(Cst), m_Reg(Src0))); in TEST() 210 m_GFMul(m_ICst(Cst), m_Reg(Src0))); in TEST() 212 ASSERT_EQ(Cst, 42); in TEST() 247 match = mi_match(MIBCAdd->getOperand(0).getReg(), MRI, m_ICst(Cst)); in TEST() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Target/PowerPC/ |
D | PPCCodeEmitter.cpp | 153 intptr_t Cst = 0; in GetRelocation() local 156 Cst = -(intptr_t)MovePCtoLROffset - 4; in GetRelocation() 162 Cst, isa<Function>(MO.getGlobal())); in GetRelocation() 165 RelocID, MO.getSymbolName(), Cst); in GetRelocation() 168 RelocID, MO.getIndex(), Cst); in GetRelocation() 176 RelocID, MO.getIndex(), Cst); in GetRelocation()
|
/external/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 1792 Constant *Cst = nullptr; in OptimizeExpression() local 1796 Cst = Cst ? ConstantExpr::get(Opcode, C, Cst) : C; in OptimizeExpression() 1800 return Cst; in OptimizeExpression() 1805 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1806 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1807 return Cst; in OptimizeExpression() 1808 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 523 Value *A = nullptr; ConstantInt *Cst = nullptr; in visitTrunc() local 525 match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 534 if (Cst->getZExtValue() >= ASize) in visitTrunc() 540 Value *Shift = Builder->CreateLShr(A, Cst->getZExtValue()); in visitTrunc() 551 match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst))) && in visitTrunc() 558 if (Cst->getValue().ult(ASize)) { in visitTrunc() 559 Value *Shift = Builder->CreateAShr(A, Cst->getZExtValue()); in visitTrunc() 569 match(Src, m_And(m_Value(A), m_ConstantInt(Cst)))) { in visitTrunc() 572 ConstantExpr::getTrunc(Cst, DestTy)); in visitTrunc()
|
D | InstCombineCompares.cpp | 1405 Constant *Cst = Builder->getInt1(IsICMP_NE); in FoldICmpShrCst() local 1406 return replaceInstUsesWith(ICI, Cst); in FoldICmpShrCst() 2001 Constant *Cst = Builder->getInt1(IsICMP_NE); in visitICmpInstWithInstAndIntCst() local 2002 return replaceInstUsesWith(ICI, Cst); in visitICmpInstWithInstAndIntCst() 4284 Value *X; ConstantInt *Cst; in visitICmpInst() local 4286 if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X) in visitICmpInst() 4287 return FoldICmpAddOpCst(I, X, Cst, I.getPredicate()); in visitICmpInst() 4290 if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X) in visitICmpInst() 4291 return FoldICmpAddOpCst(I, X, Cst, I.getSwappedPredicate()); in visitICmpInst()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 1822 Constant *Cst = nullptr; in OptimizeExpression() local 1826 Cst = Cst ? ConstantExpr::get(Opcode, C, Cst) : C; in OptimizeExpression() 1830 return Cst; in OptimizeExpression() 1835 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) { in OptimizeExpression() 1836 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType())) in OptimizeExpression() 1837 return Cst; in OptimizeExpression() 1838 Ops.push_back(ValueEntry(0, Cst)); in OptimizeExpression()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/Mips/ |
D | MipsISelLowering.h | 467 SDValue Cst = DAG.getConstant(16, DL, MVT::i32); in getAddrNonPICSym64() local 468 SDValue Shift = DAG.getNode(ISD::SHL, DL, Ty, HigherPart, Cst); in getAddrNonPICSym64() 471 SDValue Shift2 = DAG.getNode(ISD::SHL, DL, Ty, Add, Cst); in getAddrNonPICSym64()
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/CodeGen/GlobalISel/ |
D | MIPatternMatch.h | 57 inline ConstantMatch m_ICst(int64_t &Cst) { return ConstantMatch(Cst); } in m_ICst() argument
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 721 Value *A = nullptr; ConstantInt *Cst = nullptr; in visitTrunc() local 723 match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 732 if (Cst->getZExtValue() >= ASize) in visitTrunc() 738 Value *Shift = Builder.CreateLShr(A, Cst->getZExtValue()); in visitTrunc() 750 match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 756 unsigned ShiftAmt = Cst->getZExtValue(); in visitTrunc() 788 if (match(Src, m_Shl(m_Value(A), m_ConstantInt(Cst))) && in visitTrunc() 793 if (Cst->getValue().ult(DestSize)) { in visitTrunc() 798 ConstantInt::get(DestTy, Cst->getValue().trunc(DestSize))); in visitTrunc()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 466 Value *A = 0; ConstantInt *Cst = 0; in visitTrunc() local 468 match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 477 if (Cst->getZExtValue() >= ASize) in visitTrunc() 483 Value *Shift = Builder->CreateLShr(A, Cst->getZExtValue()); in visitTrunc() 492 match(Src, m_And(m_Value(A), m_ConstantInt(Cst)))) { in visitTrunc() 495 ConstantExpr::getTrunc(Cst, CI.getType())); in visitTrunc()
|
D | InstCombineCompares.cpp | 966 Constant *Cst = ConstantInt::get(Type::getInt1Ty(ICI.getContext()), in FoldICmpShrCst() local 968 return ReplaceInstUsesWith(ICI, Cst); in FoldICmpShrCst() 1259 Constant *Cst = in visitICmpInstWithInstAndIntCst() local 1261 return ReplaceInstUsesWith(ICI, Cst); in visitICmpInstWithInstAndIntCst() 2559 Value *X; ConstantInt *Cst; in visitICmpInst() local 2561 if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X) in visitICmpInst() 2562 return FoldICmpAddOpCst(I, X, Cst, I.getPredicate(), Op0); in visitICmpInst() 2565 if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X) in visitICmpInst() 2566 return FoldICmpAddOpCst(I, X, Cst, I.getSwappedPredicate(), Op1); in visitICmpInst()
|
/external/swiftshader/third_party/LLVM/lib/Target/X86/ |
D | X86ISelDAGToDAG.cpp | 748 if (ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N)) in MatchAddressRecursively() local 749 if (!FoldOffsetIntoAddress(Cst->getSExtValue(), AM)) in MatchAddressRecursively() 1774 ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(N1); in Select() local 1776 if (!Cst || !ShlCst) in Select() 1779 int64_t Val = Cst->getSExtValue(); in Select()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/ |
D | R600ISelLowering.cpp | 917 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local 918 return Cst->isNullValue(); in isZero() 2129 ConstantSDNode *Cst in FoldOperand() local 2131 Consts.push_back(Cst->getZExtValue()); in FoldOperand() 2136 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 2137 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
/external/llvm/lib/Target/AMDGPU/ |
D | R600ISelLowering.cpp | 1085 if(ConstantSDNode *Cst = dyn_cast<ConstantSDNode>(Op)) { in isZero() local 1086 return Cst->isNullValue(); in isZero() 2227 ConstantSDNode *Cst in FoldOperand() local 2229 Consts.push_back(Cst->getZExtValue()); in FoldOperand() 2234 ConstantSDNode *Cst = cast<ConstantSDNode>(CstOffset); in FoldOperand() local 2235 Consts.push_back(Cst->getZExtValue()); in FoldOperand()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 214 Constant *Cst = Constant::getAllOnesValue(Neg->getType()); in LowerNegateToMultiply() local 216 Instruction *Res = BinaryOperator::CreateMul(Neg->getOperand(1), Cst, "",Neg); in LowerNegateToMultiply()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | CodeGenPrepare.cpp | 3454 const ConstantInt *Cst = dyn_cast<ConstantInt>(Inst->getOperand(1)); in canGetThrough() local 3456 if (Cst && !Cst->getValue().isAllOnesValue()) in canGetThrough() 3480 const ConstantInt *Cst = dyn_cast<ConstantInt>(AndInst->getOperand(1)); in canGetThrough() local 3481 if (Cst && in canGetThrough() 3482 Cst->getValue().isIntN(Inst->getType()->getIntegerBitWidth())) in canGetThrough() 3661 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) { in promoteOperandForOther() local 3664 APInt CstVal = IsSExt ? Cst->getValue().sext(BitWidth) in promoteOperandForOther() 3665 : Cst->getValue().zext(BitWidth); in promoteOperandForOther()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/GlobalISel/ |
D | LegalizerHelper.cpp | 528 const APInt &Cst = MI.getOperand(1).getCImm()->getValue(); in narrowScalar() local 535 ConstantInt::get(Ctx, Cst.lshr(NarrowSize * i).trunc(NarrowSize)); in narrowScalar()
|