Lines Matching refs:CE
69 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper() local
70 switch (CE->getOpcode()) { in isSimpleEnoughValueToCommitHelper()
73 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
79 if (DL.getTypeSizeInBits(CE->getType()) != in isSimpleEnoughValueToCommitHelper()
80 DL.getTypeSizeInBits(CE->getOperand(0)->getType())) in isSimpleEnoughValueToCommitHelper()
82 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
86 for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) in isSimpleEnoughValueToCommitHelper()
87 if (!isa<ConstantInt>(CE->getOperand(i))) in isSimpleEnoughValueToCommitHelper()
89 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
93 if (!isa<ConstantInt>(CE->getOperand(1))) in isSimpleEnoughValueToCommitHelper()
95 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL); in isSimpleEnoughValueToCommitHelper()
126 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit() local
128 if (CE->getOpcode() == Instruction::GetElementPtr && in isSimpleEnoughPointerToCommit()
129 isa<GlobalVariable>(CE->getOperand(0)) && in isSimpleEnoughPointerToCommit()
130 cast<GEPOperator>(CE)->isInBounds()) { in isSimpleEnoughPointerToCommit()
131 GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0)); in isSimpleEnoughPointerToCommit()
138 ConstantInt *CI = dyn_cast<ConstantInt>(*std::next(CE->op_begin())); in isSimpleEnoughPointerToCommit()
143 if (!CE->isGEPWithNoNotionalOverIndexing()) in isSimpleEnoughPointerToCommit()
146 return ConstantFoldLoadThroughGEPConstantExpr(GV->getInitializer(), CE); in isSimpleEnoughPointerToCommit()
151 } else if (CE->getOpcode() == Instruction::BitCast && in isSimpleEnoughPointerToCommit()
152 isa<GlobalVariable>(CE->getOperand(0))) { in isSimpleEnoughPointerToCommit()
155 return cast<GlobalVariable>(CE->getOperand(0))->hasUniqueInitializer(); in isSimpleEnoughPointerToCommit()
178 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) in ComputeLoadResult() local
179 if (CE->getOpcode() == Instruction::GetElementPtr && in ComputeLoadResult()
180 isa<GlobalVariable>(CE->getOperand(0))) { in ComputeLoadResult()
181 GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0)); in ComputeLoadResult()
183 return ConstantFoldLoadThroughGEPConstantExpr(GV->getInitializer(), CE); in ComputeLoadResult()
206 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock() local
208 Ptr = ConstantFoldConstantExpression(CE, DL, TLI); in EvaluateBlock()
227 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock() local
228 if (CE->getOpcode() == Instruction::BitCast) { in EvaluateBlock()
233 Ptr = CE->getOperand(0); in EvaluateBlock()
252 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) in EvaluateBlock() local
253 Ptr = ConstantFoldConstantExpression(CE, DL, TLI); in EvaluateBlock()
327 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock() local
328 Ptr = ConstantFoldConstantExpression(CE, DL, TLI); in EvaluateBlock()
515 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(InstResult)) in EvaluateBlock() local
516 InstResult = ConstantFoldConstantExpression(CE, DL, TLI); in EvaluateBlock()