/external/llvm/lib/Target/Mips/ |
H A D | MipsFastISel.cpp | 361 const ConstantInt *CI = cast<ConstantInt>(C); local 363 if (CI->isNegative()) 364 Imm = CI->getSExtValue(); 366 Imm = CI->getZExtValue();
|
/external/llvm/lib/Target/NVPTX/ |
H A D | NVPTXAsmPrinter.cpp | 125 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) 126 return MCConstantExpr::Create(CI->getZExtValue(), Ctx); 1401 const ConstantInt *CI = nullptr; local 1403 CI = dyn_cast<ConstantInt>(Initializer); 1404 if (CI) { 1405 unsigned sample = CI->getZExtValue(); 2062 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { 2063 O << CI->getValue();
|
/external/llvm/lib/Target/PowerPC/ |
H A D | PPCCTRLoops.cpp | 200 if (CallInst *CI = dyn_cast<CallInst>(J)) { 201 if (InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledValue())) { 219 if (Function *F = CI->getCalledFunction()) { 265 if (CI->getArgOperand(0)->getType()->getScalarType()-> 290 if (!CI->onlyReadsMemory()) 294 if (!CI->getArgOperand(0)->getType()->isFloatingPointTy()) 339 TLI->getSimpleValueType(CI->getArgOperand(0)->getType(), true); 360 CastInst *CI = cast<CastInst>(J); local 361 if (CI->getSrcTy()->getScalarType()->isPPC_FP128Ty() || 362 CI [all...] |
H A D | PPCFastISel.cpp | 332 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Op)) { 334 TmpOffset += CI->getSExtValue() * S; 339 ConstantInt *CI = local 341 TmpOffset += CI->getSExtValue() * S; 689 if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) { 690 Optional<PPC::Predicate> OptPPCPred = getComparePred(CI->getPredicate()); 704 if (!PPCEmitCmp(CI->getOperand(0), CI->getOperand(1), CI->isUnsigned(), 714 } else if (const ConstantInt *CI 1373 const CallInst *CI = cast<CallInst>(I); local 2014 const ConstantInt *CI = cast<ConstantInt>(C); local 2029 const ConstantInt *CI = cast<ConstantInt>(C); local [all...] |
/external/llvm/lib/Target/X86/ |
H A D | X86FastISel.cpp | 167 static CmpInst::Predicate optimizeCmpPredicate(const CmpInst *CI) { argument 169 CmpInst::Predicate Predicate = CI->getPredicate(); 170 if (CI->getOperand(0) != CI->getOperand(1)) 494 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Val)) { 505 if (isInt<32>(CI->getSExtValue())) 513 addFullAddress(MIB, AM).addImm(Signed ? (uint64_t) CI->getSExtValue() 514 : CI->getZExtValue()); 710 if (const ConstantInt *CI = dyn_cast<ConstantInt>(U->getOperand(1))) { 711 uint64_t Disp = (int32_t)AM.Disp + (uint64_t)CI 751 ConstantInt *CI = local 1185 const CmpInst *CI = cast<CmpInst>(I); local 1751 const auto *CI = dyn_cast<CmpInst>(Cond); local 1858 const auto *CI = dyn_cast<FCmpInst>(I->getOperand(0)); local 1954 const auto *CI = dyn_cast<CmpInst>(Cond); local 2639 const CallInst *CI = cast<CallInst>(I); local 2675 const CallInst *CI = cast<CallInst>(I); local [all...] |
/external/llvm/lib/Transforms/IPO/ |
H A D | GlobalOpt.cpp | 624 } else if (const CallInst *CI = dyn_cast<CallInst>(U)) { 625 if (CI->getCalledValue() != V) { 634 } else if (const BitCastInst *CI = dyn_cast<BitCastInst>(U)) { 635 if (!AllUsesOfValueWillTrapIfNull(CI, PHIs)) return false; 704 } else if (CastInst *CI = dyn_cast<CastInst>(I)) { 705 Changed |= OptimizeAwayTrappingUsesOfValue(CI, 706 ConstantExpr::getCast(CI->getOpcode(), 707 NewV, CI->getType())); 708 if (CI->use_empty()) { 710 CI 824 OptimizeGlobalAddressOfMalloc(GlobalVariable *GV, CallInst *CI, Type *AllocTy, ConstantInt *NElements, const DataLayout *DL, TargetLibraryInfo *TLI) argument 830 DEBUG(errs() << "PROMOTING GLOBAL: " << *GV << " CALL = " << *CI << '\\n'); local 1274 PerformHeapAllocSRoA(GlobalVariable *GV, CallInst *CI, Value *NElems, const DataLayout *DL, const TargetLibraryInfo *TLI) argument 1277 DEBUG(dbgs() << "SROA HEAP ALLOC: " << *GV << " MALLOC = " << *CI << '\\n'); local 1463 TryToOptimizeStoreOfMallocToGlobal(GlobalVariable *GV, CallInst *CI, Type *AllocTy, AtomicOrdering Ordering, Module::global_iterator &GVI, const DataLayout *DL, TargetLibraryInfo *TLI) argument 2136 ConstantInt *CI = cast<ConstantInt>(Addr->getOperand(OpNo)); local 3002 CallInst *CI = dyn_cast<CallInst>(*I++); local [all...] |
H A D | MergeFunctions.cpp | 763 if (const CmpInst *CI = dyn_cast<CmpInst>(L)) 764 return cmpNumbers(CI->getPredicate(), cast<CmpInst>(R)->getPredicate()); 765 if (const CallInst *CI = dyn_cast<CallInst>(L)) { 766 if (int Res = cmpNumbers(CI->getCallingConv(), 769 return cmpAttrs(CI->getAttributes(), cast<CallInst>(R)->getAttributes()); 771 if (const InvokeInst *CI = dyn_cast<InvokeInst>(L)) { 772 if (int Res = cmpNumbers(CI->getCallingConv(), 775 return cmpAttrs(CI->getAttributes(), cast<InvokeInst>(R)->getAttributes()); 1340 CallInst *CI = Builder.CreateCall(F, Args); local 1341 CI [all...] |
H A D | StripSymbols.cpp | 252 CallInst *CI = cast<CallInst>(Declare->user_back()); local 253 Value *Arg1 = CI->getArgOperand(0); 254 Value *Arg2 = CI->getArgOperand(1); 255 assert(CI->use_empty() && "llvm.dbg intrinsic should have void result"); 256 CI->eraseFromParent();
|
/external/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineAddSub.cpp | 1035 if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) { 1037 const APInt &Val = CI->getValue(); 1049 return SelectInst::Create(ZI->getOperand(0), AddOne(CI), CI); 1054 const APInt &RHSVal = CI->getValue(); 1085 return BinaryOperator::CreateSub(ConstantExpr::getAdd(XorRHS, CI), 1092 ConstantExpr::getXor(XorRHS, CI)); 1214 Constant *CI = local 1217 ConstantExpr::getSExt(CI, I.getType()) == RHSC && 1218 WillNotOverflowSignedAdd(LHSConv->getOperand(0), CI)) { 1317 Constant *CI = local 1514 Value *X; ConstantInt *CI; local 1542 Constant *CI = nullptr; local [all...] |
H A D | InstCombineAndOrXor.cpp | 37 if (CmpInst *CI = dyn_cast<CmpInst>(V)) 38 return CI->hasOneUse(); 204 ConstantInt *CI = Builder->getInt(AndRHS->getValue() & ShlMask); local 206 if (CI->getValue() == ShlMask) 210 if (CI != AndRHS) { // Reducing bits set in and. 211 TheAnd.setOperand(1, CI); 224 ConstantInt *CI = Builder->getInt(AndRHS->getValue() & ShrMask); local 226 if (CI->getValue() == ShrMask) 230 if (CI != AndRHS) { 231 TheAnd.setOperand(1, CI); // Reduc [all...] |
H A D | InstCombineCalls.cpp | 203 Instruction *InstCombiner::visitCallInst(CallInst &CI) { argument 204 if (isFreeCall(&CI, TLI)) 205 return visitFree(CI); 209 if (CI.getParent()->getParent()->doesNotThrow() && 210 !CI.doesNotThrow()) { 211 CI.setDoesNotThrow(); 212 return &CI; 215 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI); 216 if (!II) return visitCallSite(&CI); 226 return EraseInstFromFunction(CI); 1010 isSafeToEliminateVarargsCast(const CallSite CS, const CastInst * const CI, const DataLayout * const DL, const int ix) argument 1037 tryOptimizeCall(CallInst *CI, const DataLayout *DL) argument 1197 CastInst *CI = dyn_cast<CastInst>(*I); local 1442 CallInst *CI = cast<CallInst>(Caller); local [all...] |
H A D | InstCombineCasts.cpp | 30 if (ConstantInt *CI = dyn_cast<ConstantInt>(Val)) { 31 Offset = CI->getZExtValue(); 81 Instruction *InstCombiner::PromoteCastOfAllocation(BitCastInst &CI, argument 86 PointerType *PTy = cast<PointerType>(CI.getType()); 149 // things that used it to use the new cast. This will also hack on CI, but it 157 return ReplaceInstUsesWith(CI, New); 238 const CastInst *CI, ///< The first cast instruction 244 Type *SrcTy = CI->getOperand(0)->getType(); // A from above 245 Type *MidTy = CI->getType(); // B from above 248 Instruction::CastOps firstOp = Instruction::CastOps(CI 237 isEliminableCastPair( const CastInst *CI, unsigned opcode, Type *DstTy, const DataLayout *DL ) argument 294 commonCastTransforms(CastInst &CI) argument 439 visitTrunc(TruncInst &CI) argument 513 transformZExtICmp(ICmpInst *ICI, Instruction &CI, bool DoXform) argument 760 visitZExt(ZExtInst &CI) argument 894 transformSExtICmp(ICmpInst *ICI, Instruction &CI) argument 1041 visitSExt(SExtInst &CI) argument 1171 visitFPTrunc(FPTruncInst &CI) argument 1354 visitFPExt(CastInst &CI) argument 1398 visitUIToFP(CastInst &CI) argument 1402 visitSIToFP(CastInst &CI) argument 1406 visitIntToPtr(IntToPtrInst &CI) argument 1431 commonPointerCastTransforms(CastInst &CI) argument 1490 visitPtrToInt(PtrToIntInst &CI) argument 1669 ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1)); local 1695 OptimizeIntegerToVectorInsertions(BitCastInst &CI, InstCombiner &IC) argument 1725 OptimizeIntToFloatBitCast(BitCastInst &CI,InstCombiner &IC) argument 1783 visitBitCast(BitCastInst &CI) argument 1911 visitAddrSpaceCast(AddrSpaceCastInst &CI) argument [all...] |
H A D | InstCombineCompares.cpp | 162 static bool isHighOnes(const ConstantInt *CI) { argument 163 return (~CI->getValue() + 1).isPowerOf2(); 519 if (ConstantInt *CI = dyn_cast<ConstantInt>(GEP->getOperand(i))) { 521 if (CI->isZero()) continue; 525 Offset += DL.getStructLayout(STy)->getElementOffset(CI->getZExtValue()); 528 Offset += Size*CI->getSExtValue(); 547 ConstantInt *CI = dyn_cast<ConstantInt>(GEP->getOperand(i)); local 548 if (!CI) return nullptr; 551 if (CI->isZero()) continue; 555 Offset += DL.getStructLayout(STy)->getElementOffset(CI 740 FoldICmpAddOpCst(Instruction &ICI, Value *X, ConstantInt *CI, ICmpInst::Predicate Pred) argument 1849 ConstantInt *CI = dyn_cast<ConstantInt>(ICI.getOperand(1)); local 2106 ConstantInt *CI; local 2201 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); local 2559 const APInt *CI; local 2604 const APInt *CI; local 3608 CallInst *CI = cast<CallInst>(LHSI); local [all...] |
H A D | InstCombineLoadStoreAlloca.cpp | 297 User *CI = cast<User>(LI.getOperand(0)); local 298 Value *CastOp = CI->getOperand(0); 300 PointerType *DestTy = cast<PointerType>(CI->getType()); 342 IC.Builder->CreateLoad(CastOp, LI.isVolatile(), CI->getName()); 473 User *CI = cast<User>(SI.getOperand(1)); local 474 Value *CastOp = CI->getOperand(0); 476 Type *DestPTy = cast<PointerType>(CI->getType())->getElementType(); 522 cast<PointerType>(CI->getType())->getAddressSpace())
|
H A D | InstCombineMulDivRem.cpp | 165 if (ConstantInt *CI = dyn_cast<ConstantInt>(Op1)) { 170 const APInt & Val = CI->getValue(); 201 // Canonicalize (X+C1)*CI -> X*CI+C1*CI. 207 // Only go forward with the transform if C1*CI simplifies to a tidier 851 const APInt &CI = local 854 if (CI != 1) 855 N = IC.Builder->CreateAdd(N, ConstantInt::get(N->getType(), CI.logBase2()));
|
H A D | InstCombineShifts.cpp | 83 ConstantInt *CI = nullptr; 84 if ((isLeftShift && match(I, m_LShr(m_Value(), m_ConstantInt(CI)))) || 85 (!isLeftShift && match(I, m_Shl(m_Value(), m_ConstantInt(CI))))) { 86 if (CI->getZExtValue() == NumBits) { 96 CI->getLimitedValue(BitWidth) < BitWidth) { 119 CI = dyn_cast<ConstantInt>(I->getOperand(1)); 120 if (!CI) return false; 126 if (CI->getValue() == NumBits) return true; 132 if (CI->getZExtValue() > NumBits) { 133 unsigned LowBits = TypeWidth - CI 218 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); local 259 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); local [all...] |
H A D | InstCombineVectorOps.cpp | 53 if (CmpInst *CI = dyn_cast<CmpInst>(I)) 54 if (CI->hasOneUse() && 55 (CheapToScalarize(CI->getOperand(0), isConstant) || 56 CheapToScalarize(CI->getOperand(1), isConstant))) 280 } else if (CastInst *CI = dyn_cast<CastInst>(I)) { 283 if (CI->hasOneUse() && (CI->getOpcode() != Instruction::BitCast)) { 284 Value *EE = Builder->CreateExtractElement(CI->getOperand(0), 287 return CastInst::Create(CI->getOpcode(), EE, EI.getType()); 646 ConstantInt *CI local [all...] |
H A D | InstructionCombining.cpp | 648 if (CastInst *CI = dyn_cast<CastInst>(&I)) { 649 return IC->Builder->CreateCast(CI->getOpcode(), SO, I.getType()); 674 if (ICmpInst *CI = dyn_cast<ICmpInst>(&I)) 675 return IC->Builder->CreateICmp(CI->getPredicate(), Op0, Op1, 677 if (FCmpInst *CI = dyn_cast<FCmpInst>(&I)) 678 return IC->Builder->CreateICmp(CI->getPredicate(), Op0, Op1, 813 } else if (CmpInst *CI = dyn_cast<CmpInst>(&I)) { 818 InV = ConstantExpr::getCompare(CI->getPredicate(), InC, C); 819 else if (isa<ICmpInst>(CI)) 820 InV = Builder->CreateICmp(CI 839 CastInst *CI = cast<CastInst>(&I); local 1821 ConstantInt *CI = cast<ConstantInt>(II->getArgOperand(1)); local [all...] |
/external/llvm/lib/Transforms/Instrumentation/ |
H A D | DataFlowSanitizer.cpp | 304 void visitCastInst(CastInst &CI); 305 void visitCmpInst(CmpInst &CI); 502 CallInst *CI = CallInst::Create(F, Args, "", BB); local 506 ReturnInst::Create(*Ctx, CI, BB); 523 CallInst *CI = local 529 RI = ReturnInst::Create(*Ctx, CI, BB); 535 DFSanVisitor(DFSF).visitCallInst(*CI); 1123 void DFSanVisitor::visitCastInst(CastInst &CI) { visitOperandShadowInst(CI); } argument 1125 void DFSanVisitor::visitCmpInst(CmpInst &CI) { visitOperandShadowIns argument [all...] |
/external/llvm/lib/Transforms/ObjCARC/ |
H A D | ObjCARC.h | 204 if (const CallInst *CI = dyn_cast<CallInst>(V)) { 205 if (const Function *F = CI->getCalledFunction()) 282 static inline void EraseInstruction(Instruction *CI) { argument 283 Value *OldArg = cast<CallInst>(CI)->getArgOperand(0); 285 bool Unused = CI->use_empty(); 289 assert((IsForwarding(GetBasicInstructionClass(CI)) || 290 (IsNoopOnNull(GetBasicInstructionClass(CI)) && 293 CI->replaceAllUsesWith(OldArg); 296 CI->eraseFromParent();
|
H A D | ObjCARCContract.cpp | 407 CallInst *CI = cast<CallInst>(Inst); local 408 if (IsNullOrUndef(CI->getArgOperand(1))) { 410 ConstantPointerNull::get(cast<PointerType>(CI->getType())); 412 new StoreInst(Null, CI->getArgOperand(0), CI); 414 DEBUG(dbgs() << "OBJCARCContract: Old = " << *CI << "\n" 417 CI->replaceAllUsesWith(Null); 418 CI->eraseFromParent();
|
H A D | ObjCARCOpts.cpp | 1332 CallInst *CI = cast<CallInst>(Inst); local 1333 if (IsNullOrUndef(CI->getArgOperand(0))) { 1335 Type *Ty = CI->getArgOperand(0)->getType(); 1338 CI); local 1339 llvm::Value *NewValue = UndefValue::get(CI->getType()); 1341 "\nOld = " << *CI << "\nNew = " << *NewValue << "\n"); 1342 CI->replaceAllUsesWith(NewValue); 1343 CI->eraseFromParent(); 1350 CallInst *CI = cast<CallInst>(Inst); local 1351 if (IsNullOrUndef(CI 1357 CI); local 2712 CallInst *CI = CallInst::Create(Decl, EarlierCall, "", Call); local 2741 CallInst *CI = CallInst::Create(Decl, EarlierCall, "", Call); local [all...] |
H A D | ObjCARCUtil.cpp | 177 const CallInst *CI = cast<CallInst>(I); local 179 if (const Function *F = CI->getCalledFunction()) { 206 return GetCallSiteClass(CI);
|
/external/llvm/lib/Transforms/Scalar/ |
H A D | GVN.cpp | 2148 ConstantInt *CI = dyn_cast<ConstantInt>(RHS); local 2149 if (!CI) 2153 bool isKnownTrue = CI->isAllOnesValue();
|
H A D | JumpThreading.cpp | 267 if (const CallInst *CI = dyn_cast<CallInst>(I)) { 268 if (CI->cannotDuplicate()) 272 else if (!isa<IntrinsicInst>(CI)) 274 else if (!CI->getType()->isVectorTy()) 399 Constant *CI = LVI->getConstantOnEdge(InVal, local 401 if (Constant *KC = getKnownConstant(CI, Preference)) 477 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) { 485 Constant *Folded = ConstantExpr::get(BO->getOpcode(), V, CI); 586 if (ConstantInt *CI = dyn_cast<ConstantInt>(Cond)) { 588 KnownCond = CI 607 Constant *CI = LVI->getConstant(V, BB); local [all...] |