Lines Matching refs:CE

85   ConstantExpr *CE = cast<ConstantExpr>(C);  in isSimpleEnoughValueToCommitHelper()  local
86 switch (CE->getOpcode()) { in isSimpleEnoughValueToCommitHelper()
89 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
95 if (DL.getTypeSizeInBits(CE->getType()) != in isSimpleEnoughValueToCommitHelper()
96 DL.getTypeSizeInBits(CE->getOperand(0)->getType())) in isSimpleEnoughValueToCommitHelper()
98 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
102 for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) in isSimpleEnoughValueToCommitHelper()
103 if (!isa<ConstantInt>(CE->getOperand(i))) in isSimpleEnoughValueToCommitHelper()
105 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
109 if (!isa<ConstantInt>(CE->getOperand(1))) in isSimpleEnoughValueToCommitHelper()
111 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
142 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit() local
144 if (CE->getOpcode() == Instruction::GetElementPtr && in isSimpleEnoughPointerToCommit()
145 isa<GlobalVariable>(CE->getOperand(0)) && in isSimpleEnoughPointerToCommit()
146 cast<GEPOperator>(CE)->isInBounds()) { in isSimpleEnoughPointerToCommit()
147 GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0)); in isSimpleEnoughPointerToCommit()
154 ConstantInt *CI = dyn_cast<ConstantInt>(*std::next(CE->op_begin())); in isSimpleEnoughPointerToCommit()
159 if (!CE->isGEPWithNoNotionalOverIndexing()) in isSimpleEnoughPointerToCommit()
162 return ConstantFoldLoadThroughGEPConstantExpr(GV->getInitializer(), CE); in isSimpleEnoughPointerToCommit()
167 } else if (CE->getOpcode() == Instruction::BitCast && in isSimpleEnoughPointerToCommit()
168 isa<GlobalVariable>(CE->getOperand(0))) { in isSimpleEnoughPointerToCommit()
171 return cast<GlobalVariable>(CE->getOperand(0))->hasUniqueInitializer(); in isSimpleEnoughPointerToCommit()
198 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) { in ComputeLoadResult() local
199 switch (CE->getOpcode()) { in ComputeLoadResult()
202 if (auto *I = getInitializer(CE->getOperand(0))) in ComputeLoadResult()
203 return ConstantFoldLoadThroughGEPConstantExpr(I, CE); in ComputeLoadResult()
207 Constant *Val = getVal(CE->getOperand(0)); in ComputeLoadResult()
210 : getInitializer(CE->getOperand(0)); in ComputeLoadResult()
238 auto *CE = dyn_cast<ConstantExpr>(V); in getCalleeWithFormalArgs() local
239 if (!CE || CE->getOpcode() != Instruction::BitCast || in getCalleeWithFormalArgs()
240 !getFormalParams(CS, getFunction(CE->getOperand(0)), Formals)) in getCalleeWithFormalArgs()
244 ConstantFoldLoadThroughBitcast(CE, CE->getOperand(0)->getType(), DL)); in getCalleeWithFormalArgs()
275 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr); in castCallResultIfNeeded() local
276 if (!RV || !CE || CE->getOpcode() != Instruction::BitCast) in castCallResultIfNeeded()
280 dyn_cast<FunctionType>(CE->getType()->getPointerElementType())) { in castCallResultIfNeeded()
327 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock() local
328 if (CE->getOpcode() == Instruction::BitCast) { in EvaluateBlock()
334 Ptr = CE->getOperand(0); in EvaluateBlock()