Lines Matching refs:Instruction

53   if (isa<Instruction>(V)) {
95 if (BO->getOpcode() == Instruction::Add ||
96 BO->getOpcode() == Instruction::Sub)
149 void InsertHelper(Instruction *I, const Twine &Name, BasicBlock *BB,
166 : public InstVisitor<InstCombiner, Instruction *> {
229 Instruction *visitAdd(BinaryOperator &I);
230 Instruction *visitFAdd(BinaryOperator &I);
232 Instruction *visitSub(BinaryOperator &I);
233 Instruction *visitFSub(BinaryOperator &I);
234 Instruction *visitMul(BinaryOperator &I);
235 Value *foldFMulConst(Instruction *FMulOrDiv, Constant *C,
236 Instruction *InsertBefore);
237 Instruction *visitFMul(BinaryOperator &I);
238 Instruction *visitURem(BinaryOperator &I);
239 Instruction *visitSRem(BinaryOperator &I);
240 Instruction *visitFRem(BinaryOperator &I);
242 Instruction *commonRemTransforms(BinaryOperator &I);
243 Instruction *commonIRemTransforms(BinaryOperator &I);
244 Instruction *commonDivTransforms(BinaryOperator &I);
245 Instruction *commonIDivTransforms(BinaryOperator &I);
246 Instruction *visitUDiv(BinaryOperator &I);
247 Instruction *visitSDiv(BinaryOperator &I);
248 Instruction *visitFDiv(BinaryOperator &I);
252 Instruction *visitAnd(BinaryOperator &I);
253 Value *FoldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction *CxtI);
255 Instruction *FoldOrWithConstants(BinaryOperator &I, Value *Op, Value *A,
257 Instruction *FoldXorWithConstants(BinaryOperator &I, Value *Op, Value *A,
259 Instruction *visitOr(BinaryOperator &I);
260 Instruction *visitXor(BinaryOperator &I);
261 Instruction *visitShl(BinaryOperator &I);
262 Instruction *visitAShr(BinaryOperator &I);
263 Instruction *visitLShr(BinaryOperator &I);
264 Instruction *commonShiftTransforms(BinaryOperator &I);
265 Instruction *FoldFCmp_IntToFP_Cst(FCmpInst &I, Instruction *LHSI,
267 Instruction *FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
270 Instruction *visitFCmpInst(FCmpInst &I);
271 Instruction *visitICmpInst(ICmpInst &I);
272 Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI);
273 Instruction *visitICmpInstWithInstAndIntCst(ICmpInst &ICI, Instruction *LHS,
275 Instruction *FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI,
277 Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI,
279 Instruction *FoldICmpCstShrCst(ICmpInst &I, Value *Op, Value *A,
281 Instruction *FoldICmpCstShlCst(ICmpInst &I, Value *Op, Value *A,
283 Instruction *FoldICmpAddOpCst(Instruction &ICI, Value *X, ConstantInt *CI,
285 Instruction *FoldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
286 ICmpInst::Predicate Cond, Instruction &I);
287 Instruction *FoldAllocaCmp(ICmpInst &ICI, AllocaInst *Alloca, Value *Other);
288 Instruction *FoldShiftByConstant(Value *Op0, Constant *Op1,
290 Instruction *commonCastTransforms(CastInst &CI);
291 Instruction *commonPointerCastTransforms(CastInst &CI);
292 Instruction *visitTrunc(TruncInst &CI);
293 Instruction *visitZExt(ZExtInst &CI);
294 Instruction *visitSExt(SExtInst &CI);
295 Instruction *visitFPTrunc(FPTruncInst &CI);
296 Instruction *visitFPExt(CastInst &CI);
297 Instruction *visitFPToUI(FPToUIInst &FI);
298 Instruction *visitFPToSI(FPToSIInst &FI);
299 Instruction *visitUIToFP(CastInst &CI);
300 Instruction *visitSIToFP(CastInst &CI);
301 Instruction *visitPtrToInt(PtrToIntInst &CI);
302 Instruction *visitIntToPtr(IntToPtrInst &CI);
303 Instruction *visitBitCast(BitCastInst &CI);
304 Instruction *visitAddrSpaceCast(AddrSpaceCastInst &CI);
305 Instruction *FoldSelectOpOp(SelectInst &SI, Instruction *TI, Instruction *FI);
306 Instruction *FoldSelectIntoOp(SelectInst &SI, Value *, Value *);
307 Instruction *FoldSPFofSPF(Instruction *Inner, SelectPatternFlavor SPF1,
308 Value *A, Value *B, Instruction &Outer,
310 Instruction *FoldItoFPtoI(Instruction &FI);
311 Instruction *visitSelectInst(SelectInst &SI);
312 Instruction *visitSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
313 Instruction *visitCallInst(CallInst &CI);
314 Instruction *visitInvokeInst(InvokeInst &II);
316 Instruction *SliceUpIllegalIntegerPHI(PHINode &PN);
317 Instruction *visitPHINode(PHINode &PN);
318 Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
319 Instruction *visitAllocaInst(AllocaInst &AI);
320 Instruction *visitAllocSite(Instruction &FI);
321 Instruction *visitFree(CallInst &FI);
322 Instruction *visitLoadInst(LoadInst &LI);
323 Instruction *visitStoreInst(StoreInst &SI);
324 Instruction *visitBranchInst(BranchInst &BI);
325 Instruction *visitSwitchInst(SwitchInst &SI);
326 Instruction *visitReturnInst(ReturnInst &RI);
327 Instruction *visitInsertValueInst(InsertValueInst &IV);
328 Instruction *visitInsertElementInst(InsertElementInst &IE);
329 Instruction *visitExtractElementInst(ExtractElementInst &EI);
330 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
331 Instruction *visitExtractValueInst(ExtractValueInst &EV);
332 Instruction *visitLandingPadInst(LandingPadInst &LI);
333 Instruction *visitVAStartInst(VAStartInst &I);
334 Instruction *visitVACopyInst(VACopyInst &I);
337 Instruction *visitInstruction(Instruction &I) { return nullptr; }
342 bool dominatesAllUses(const Instruction *DI, const Instruction *UI,
356 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
364 bool ShouldOptimizeCast(Instruction::CastOps opcode, const Value *V,
380 Instruction &CtxI, Value *&OperationResult,
383 Instruction *visitCallSite(CallSite CS);
384 Instruction *tryOptimizeCall(CallInst *CI);
386 Instruction *transformCallThroughTrampoline(CallSite CS,
388 Instruction *transformZExtICmp(ICmpInst *ICI, Instruction &CI,
390 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
391 bool WillNotOverflowSignedAdd(Value *LHS, Value *RHS, Instruction &CxtI);
392 bool WillNotOverflowSignedSub(Value *LHS, Value *RHS, Instruction &CxtI);
393 bool WillNotOverflowUnsignedSub(Value *LHS, Value *RHS, Instruction &CxtI);
394 bool WillNotOverflowSignedMul(Value *LHS, Value *RHS, Instruction &CxtI);
396 Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
398 Instruction *foldCastedBitwiseLogic(BinaryOperator &I);
405 Instruction *InsertNewInstBefore(Instruction *New, Instruction &Old) {
415 Instruction *InsertNewInstWith(Instruction *New, Instruction &Old) {
426 Instruction *replaceInstUsesWith(Instruction &I, Value *V) {
447 Instruction *CreateOverflowTuple(IntrinsicInst *II, Value *Result,
460 Instruction *eraseInstFromFunction(Instruction &I) {
468 if (auto *Inst = dyn_cast<Instruction>(Operand))
478 unsigned Depth, Instruction *CxtI) const {
484 Instruction *CxtI = nullptr) const {
488 Instruction *CxtI = nullptr) const {
492 unsigned Depth = 0, Instruction *CxtI = nullptr) const {
497 const Instruction *CxtI) {
501 const Instruction *CxtI) {
523 Instruction *CxtI);
528 Value *SimplifyShrShlDemandedBits(Instruction *Lsr, Instruction *Sftl,
534 bool SimplifyDemandedInstructionBits(Instruction &Inst);
547 Instruction *FoldOpIntoPhi(Instruction &I);
551 Instruction *FoldPHIArgOpIntoPHI(PHINode &PN);
552 Instruction *FoldPHIArgBinOpIntoPHI(PHINode &PN);
553 Instruction *FoldPHIArgGEPIntoPHI(PHINode &PN);
554 Instruction *FoldPHIArgLoadIntoPHI(PHINode &PN);
555 Instruction *FoldPHIArgZextsIntoPHI(PHINode &PN);
557 Instruction *OptAndOp(Instruction *Op, ConstantInt *OpRHS,
561 bool isSub, Instruction &I);
564 Instruction *PromoteCastOfAllocation(BitCastInst &CI, AllocaInst &AI);
565 Instruction *MatchBSwap(BinaryOperator &I);
567 Instruction *SimplifyMemTransfer(MemIntrinsic *MI);
568 Instruction *SimplifyMemSet(MemSetInst *MI);