Lines Matching refs:ConstantExpr
230 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupPointerRootUsers()
297 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupConstantGlobalUsers()
319 if (!isa<ConstantExpr>(GEP->getOperand(0))) { in CleanupConstantGlobalUsers()
320 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>( in CleanupConstantGlobalUsers()
394 (!isa<ConstantExpr>(U) || in IsUserOfGlobalSafeForSRA()
395 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr)) in IsUserOfGlobalSafeForSRA()
556 assert(((isa<ConstantExpr>(GEP) && in SRAGlobal()
557 cast<ConstantExpr>(GEP)->getOpcode()==Instruction::GetElementPtr)|| in SRAGlobal()
571 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) { in SRAGlobal()
577 ConstantExpr::getGetElementPtr(NewTy, cast<Constant>(NewPtr), Idxs); in SRAGlobal()
595 cast<ConstantExpr>(GEP)->destroyConstant(); in SRAGlobal()
710 ConstantExpr::getCast(CI->getOpcode(), in OptimizeAwayTrappingUsesOfValue()
728 GEPI, ConstantExpr::getGetElementPtr(nullptr, NewV, Idxs)); in OptimizeAwayTrappingUsesOfValue()
775 isa<ConstantExpr>(GlobalUser) || isa<CmpInst>(GlobalUser) || in OptimizeAwayTrappingUsesOfLoads()
873 RepValue = ConstantExpr::getBitCast(RepValue, in OptimizeGlobalAddressOfMalloc()
1575 SOVC = ConstantExpr::getBitCast(SOVC, GV->getInitializer()->getType()); in OptimizeOnceStoredGlobal()
1951 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GV->getInitializer())) { in OptimizeGlobalVars()
2008 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
2066 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit()
2106 ConstantExpr *Addr, unsigned OpNo) { in EvaluateStoreInto()
2160 ConstantExpr *CE = cast<ConstantExpr>(Addr); in CommitValueTo()
2271 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) in ComputeLoadResult()
2299 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
2320 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
2344 Ptr = ConstantExpr::getGetElementPtr(nullptr, Ptr, IdxList); in EvaluateBlock()
2345 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) in EvaluateBlock()
2359 Val = ConstantExpr::getBitCast(Val, NewTy); in EvaluateBlock()
2367 InstResult = ConstantExpr::get(BO->getOpcode(), in EvaluateBlock()
2373 InstResult = ConstantExpr::getCompare(CI->getPredicate(), in EvaluateBlock()
2379 InstResult = ConstantExpr::getCast(CI->getOpcode(), in EvaluateBlock()
2385 InstResult = ConstantExpr::getSelect(getVal(SI->getOperand(0)), in EvaluateBlock()
2391 InstResult = ConstantExpr::getExtractValue( in EvaluateBlock()
2396 InstResult = ConstantExpr::getInsertValue( in EvaluateBlock()
2408 ConstantExpr::getGetElementPtr(GEP->getSourceElementType(), P, GEPOps, in EvaluateBlock()
2420 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
2604 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(InstResult)) in EvaluateBlock()
2731 = ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, Int8PtrTy); in setUsedInitializer()
2890 J->replaceAllUsesWith(ConstantExpr::getBitCast(Aliasee, J->getType())); in OptimizeGlobalAliases()