Lines Matching refs:CE

83   ConstantExpr *CE = cast<ConstantExpr>(C);  in isSimpleEnoughValueToCommitHelper()  local
84 switch (CE->getOpcode()) { in isSimpleEnoughValueToCommitHelper()
87 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
93 if (DL.getTypeSizeInBits(CE->getType()) != in isSimpleEnoughValueToCommitHelper()
94 DL.getTypeSizeInBits(CE->getOperand(0)->getType())) in isSimpleEnoughValueToCommitHelper()
96 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
100 for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) in isSimpleEnoughValueToCommitHelper()
101 if (!isa<ConstantInt>(CE->getOperand(i))) in isSimpleEnoughValueToCommitHelper()
103 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
107 if (!isa<ConstantInt>(CE->getOperand(1))) in isSimpleEnoughValueToCommitHelper()
109 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
140 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit() local
142 if (CE->getOpcode() == Instruction::GetElementPtr && in isSimpleEnoughPointerToCommit()
143 isa<GlobalVariable>(CE->getOperand(0)) && in isSimpleEnoughPointerToCommit()
144 cast<GEPOperator>(CE)->isInBounds()) { in isSimpleEnoughPointerToCommit()
145 GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0)); in isSimpleEnoughPointerToCommit()
152 ConstantInt *CI = dyn_cast<ConstantInt>(*std::next(CE->op_begin())); in isSimpleEnoughPointerToCommit()
157 if (!CE->isGEPWithNoNotionalOverIndexing()) in isSimpleEnoughPointerToCommit()
161 GV->getInitializer(), CE, in isSimpleEnoughPointerToCommit()
162 cast<GEPOperator>(CE)->getResultElementType(), DL); in isSimpleEnoughPointerToCommit()
163 } else if (CE->getOpcode() == Instruction::BitCast && in isSimpleEnoughPointerToCommit()
164 isa<GlobalVariable>(CE->getOperand(0))) { in isSimpleEnoughPointerToCommit()
170 return cast<GlobalVariable>(CE->getOperand(0))->hasUniqueInitializer(); in isSimpleEnoughPointerToCommit()
228 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) { in ComputeLoadResult() local
229 switch (CE->getOpcode()) { in ComputeLoadResult()
232 if (auto *I = getInitializer(CE->getOperand(0))) in ComputeLoadResult()
233 return ConstantFoldLoadThroughGEPConstantExpr(I, CE, Ty, DL); in ComputeLoadResult()
242 evaluateBitcastFromPtr(CE->getOperand(0), DL, TLI, TryFindMemLoc); in ComputeLoadResult()
244 Val = getInitializer(CE->getOperand(0)); in ComputeLoadResult()
272 auto *CE = dyn_cast<ConstantExpr>(V); in getCalleeWithFormalArgs() local
273 if (!CE || CE->getOpcode() != Instruction::BitCast || in getCalleeWithFormalArgs()
274 !getFormalParams(CB, getFunction(CE->getOperand(0)), Formals)) in getCalleeWithFormalArgs()
278 ConstantFoldLoadThroughBitcast(CE, CE->getOperand(0)->getType(), DL)); in getCalleeWithFormalArgs()
309 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr); in castCallResultIfNeeded() local
310 if (!RV || !CE || CE->getOpcode() != Instruction::BitCast) in castCallResultIfNeeded()
314 dyn_cast<FunctionType>(CE->getType()->getPointerElementType())) { in castCallResultIfNeeded()
363 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock() local
364 if (CE->getOpcode() == Instruction::BitCast) { in EvaluateBlock()
392 evaluateBitcastFromPtr(CE->getOperand(0), DL, TLI, TryCastValTy); in EvaluateBlock()