Lines Matching refs:ConstantExpr
180 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in AnalyzeGlobal()
324 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupConstantGlobalUsers()
345 if (!isa<ConstantExpr>(GEP->getOperand(0))) { in CleanupConstantGlobalUsers()
346 ConstantExpr *CE = in CleanupConstantGlobalUsers()
347 dyn_cast_or_null<ConstantExpr>(ConstantFoldInstruction(GEP)); in CleanupConstantGlobalUsers()
416 (!isa<ConstantExpr>(U) || in IsUserOfGlobalSafeForSRA()
417 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr)) in IsUserOfGlobalSafeForSRA()
580 assert(((isa<ConstantExpr>(GEP) && in SRAGlobal()
581 cast<ConstantExpr>(GEP)->getOpcode()==Instruction::GetElementPtr)|| in SRAGlobal()
594 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) { in SRAGlobal()
599 NewPtr = ConstantExpr::getGetElementPtr(cast<Constant>(NewPtr), in SRAGlobal()
616 cast<ConstantExpr>(GEP)->destroyConstant(); in SRAGlobal()
738 ConstantExpr::getCast(CI->getOpcode(), in OptimizeAwayTrappingUsesOfValue()
756 ConstantExpr::getGetElementPtr(NewV, &Idxs[0], in OptimizeAwayTrappingUsesOfValue()
802 isa<ConstantExpr>(GlobalUser) || isa<CmpInst>(GlobalUser)) && in OptimizeAwayTrappingUsesOfLoads()
893 RepValue = ConstantExpr::getBitCast(RepValue, in OptimizeGlobalAddressOfMalloc()
1593 SOVC = ConstantExpr::getBitCast(SOVC, GV->getInitializer()->getType()); in OptimizeOnceStoredGlobal()
1936 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GV->getInitializer())) { in OptimizeGlobalVars()
2047 V = ConstantExpr::getBitCast(V, GCL->getType()); in InstallGlobalCtors()
2101 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
2151 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit()
2191 ConstantExpr *Addr, unsigned OpNo) { in EvaluateStoreInto()
2268 ConstantExpr *CE = cast<ConstantExpr>(Addr); in CommitValueTo()
2291 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) in ComputeLoadResult()
2354 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) in EvaluateFunction()
2377 Ptr = ConstantExpr::getGetElementPtr(Ptr, IdxList, 2); in EvaluateFunction()
2388 Val = ConstantExpr::getBitCast(Val, NewTy); in EvaluateFunction()
2393 InstResult = ConstantExpr::get(BO->getOpcode(), in EvaluateFunction()
2397 InstResult = ConstantExpr::getCompare(CI->getPredicate(), in EvaluateFunction()
2401 InstResult = ConstantExpr::getCast(CI->getOpcode(), in EvaluateFunction()
2405 InstResult = ConstantExpr::getSelect(getVal(Values, SI->getOperand(0)), in EvaluateFunction()
2415 ConstantExpr::getInBoundsGetElementPtr(P, &GEPOps[0], GEPOps.size()) : in EvaluateFunction()
2416 ConstantExpr::getGetElementPtr(P, &GEPOps[0], GEPOps.size()); in EvaluateFunction()
2541 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(InstResult)) in EvaluateFunction()