Home | History | Annotate | Download | only in IPO

Lines Matching refs:ConstantExpr

197     if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
200 // If the result of the constantexpr isn't pointer type, then we won't
430 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
487 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
508 if (!isa<ConstantExpr>(GEP->getOperand(0))) {
509 ConstantExpr *CE =
510 dyn_cast_or_null<ConstantExpr>(ConstantFoldInstruction(GEP, TD, TLI));
583 // The user of the global must be a GEP Inst or a ConstantExpr GEP.
585 (!isa<ConstantExpr>(U) ||
586 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr))
589 // Check to see if this ConstantExpr GEP is SRA'able. In particular, we
743 // Loop over all of the uses of the global, replacing the constantexpr geps,
744 // with smaller constantexpr geps or direct references.
747 assert(((isa<ConstantExpr>(GEP) &&
748 cast<ConstantExpr>(GEP)->getOpcode()==Instruction::GetElementPtr)||
761 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) {
766 NewPtr = ConstantExpr::getGetElementPtr(cast<Constant>(NewPtr), Idxs);
782 cast<ConstantExpr>(GEP)->destroyConstant();
904 ConstantExpr::getCast(CI->getOpcode(),
922 ConstantExpr::getGetElementPtr(NewV, Idxs));
969 isa<ConstantExpr>(GlobalUser) || isa<CmpInst>(GlobalUser) ||
1069 RepValue = ConstantExpr::getBitCast(RepValue,
1778 SOVC = ConstantExpr::getBitCast(SOVC, GV->getInitializer()->getType());
2143 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GV->getInitializer())) {
2253 V = ConstantExpr::getBitCast(V, GCL->getType());
2302 ConstantExpr *CE = cast<ConstantExpr>(C);
2360 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
2361 // Handle a constantexpr gep.
2382 // A constantexpr bitcast from a pointer to another pointer is a no-op,
2396 /// EvaluateStoreInto - Evaluate a piece of a constantexpr store into a global
2400 ConstantExpr *Addr, unsigned OpNo) {
2454 ConstantExpr *CE = cast<ConstantExpr>(Addr);
2570 // Handle a constantexpr getelementptr.
2571 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P))
2599 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
2620 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
2644 Ptr = ConstantExpr::getGetElementPtr(Ptr, IdxList);
2645 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr))
2659 Val = ConstantExpr::getBitCast(Val, NewTy);
2667 InstResult = ConstantExpr::get(BO->getOpcode(),
2673 InstResult = ConstantExpr::getCompare(CI->getPredicate(),
2679 InstResult = ConstantExpr::getCast(CI->getOpcode(),
2685 InstResult = ConstantExpr::getSelect(getVal(SI->getOperand(0)),
2697 ConstantExpr::getGetElementPtr(P, GEPOps,
2709 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
2894 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(InstResult))