Lines Matching refs:Instruction

59   if (isa<Instruction>(V)) {  in getComplexity()
119 if (BO->getOpcode() == Instruction::Add || in IsFreeToInvert()
120 BO->getOpcode() == Instruction::Sub) in IsFreeToInvert()
168 : public InstVisitor<InstCombiner, Instruction *> {
230 Instruction *visitAdd(BinaryOperator &I);
231 Instruction *visitFAdd(BinaryOperator &I);
233 Instruction *visitSub(BinaryOperator &I);
234 Instruction *visitFSub(BinaryOperator &I);
235 Instruction *visitMul(BinaryOperator &I);
236 Value *foldFMulConst(Instruction *FMulOrDiv, Constant *C,
237 Instruction *InsertBefore);
238 Instruction *visitFMul(BinaryOperator &I);
239 Instruction *visitURem(BinaryOperator &I);
240 Instruction *visitSRem(BinaryOperator &I);
241 Instruction *visitFRem(BinaryOperator &I);
243 Instruction *commonRemTransforms(BinaryOperator &I);
244 Instruction *commonIRemTransforms(BinaryOperator &I);
245 Instruction *commonDivTransforms(BinaryOperator &I);
246 Instruction *commonIDivTransforms(BinaryOperator &I);
247 Instruction *visitUDiv(BinaryOperator &I);
248 Instruction *visitSDiv(BinaryOperator &I);
249 Instruction *visitFDiv(BinaryOperator &I);
253 Instruction *visitAnd(BinaryOperator &I);
254 Value *FoldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction *CxtI);
256 Instruction *FoldOrWithConstants(BinaryOperator &I, Value *Op, Value *A,
258 Instruction *FoldXorWithConstants(BinaryOperator &I, Value *Op, Value *A,
260 Instruction *visitOr(BinaryOperator &I);
261 Instruction *visitXor(BinaryOperator &I);
262 Instruction *visitShl(BinaryOperator &I);
263 Instruction *visitAShr(BinaryOperator &I);
264 Instruction *visitLShr(BinaryOperator &I);
265 Instruction *commonShiftTransforms(BinaryOperator &I);
266 Instruction *visitFCmpInst(FCmpInst &I);
267 Instruction *visitICmpInst(ICmpInst &I);
268 Instruction *FoldShiftByConstant(Value *Op0, Constant *Op1,
270 Instruction *commonCastTransforms(CastInst &CI);
271 Instruction *commonPointerCastTransforms(CastInst &CI);
272 Instruction *visitTrunc(TruncInst &CI);
273 Instruction *visitZExt(ZExtInst &CI);
274 Instruction *visitSExt(SExtInst &CI);
275 Instruction *visitFPTrunc(FPTruncInst &CI);
276 Instruction *visitFPExt(CastInst &CI);
277 Instruction *visitFPToUI(FPToUIInst &FI);
278 Instruction *visitFPToSI(FPToSIInst &FI);
279 Instruction *visitUIToFP(CastInst &CI);
280 Instruction *visitSIToFP(CastInst &CI);
281 Instruction *visitPtrToInt(PtrToIntInst &CI);
282 Instruction *visitIntToPtr(IntToPtrInst &CI);
283 Instruction *visitBitCast(BitCastInst &CI);
284 Instruction *visitAddrSpaceCast(AddrSpaceCastInst &CI);
285 Instruction *FoldItoFPtoI(Instruction &FI);
286 Instruction *visitSelectInst(SelectInst &SI);
287 Instruction *visitCallInst(CallInst &CI);
288 Instruction *visitInvokeInst(InvokeInst &II);
290 Instruction *SliceUpIllegalIntegerPHI(PHINode &PN);
291 Instruction *visitPHINode(PHINode &PN);
292 Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
293 Instruction *visitAllocaInst(AllocaInst &AI);
294 Instruction *visitAllocSite(Instruction &FI);
295 Instruction *visitFree(CallInst &FI);
296 Instruction *visitLoadInst(LoadInst &LI);
297 Instruction *visitStoreInst(StoreInst &SI);
298 Instruction *visitBranchInst(BranchInst &BI);
299 Instruction *visitSwitchInst(SwitchInst &SI);
300 Instruction *visitReturnInst(ReturnInst &RI);
301 Instruction *visitInsertValueInst(InsertValueInst &IV);
302 Instruction *visitInsertElementInst(InsertElementInst &IE);
303 Instruction *visitExtractElementInst(ExtractElementInst &EI);
304 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
305 Instruction *visitExtractValueInst(ExtractValueInst &EV);
306 Instruction *visitLandingPadInst(LandingPadInst &LI);
307 Instruction *visitVAStartInst(VAStartInst &I);
308 Instruction *visitVACopyInst(VACopyInst &I);
311 Instruction *visitInstruction(Instruction &I) { return nullptr; } in visitInstruction()
316 bool dominatesAllUses(const Instruction *DI, const Instruction *UI,
355 Instruction &CtxI, Value *&OperationResult,
358 Instruction *visitCallSite(CallSite CS);
359 Instruction *tryOptimizeCall(CallInst *CI);
361 Instruction *transformCallThroughTrampoline(CallSite CS,
376 Instruction *transformZExtICmp(ICmpInst *ICI, ZExtInst &CI,
379 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
380 bool WillNotOverflowSignedAdd(Value *LHS, Value *RHS, Instruction &CxtI);
381 bool WillNotOverflowSignedSub(Value *LHS, Value *RHS, Instruction &CxtI);
382 bool WillNotOverflowUnsignedSub(Value *LHS, Value *RHS, Instruction &CxtI);
383 bool WillNotOverflowSignedMul(Value *LHS, Value *RHS, Instruction &CxtI);
385 Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
387 Instruction *foldCastedBitwiseLogic(BinaryOperator &I);
388 Instruction *shrinkBitwiseLogic(TruncInst &Trunc);
389 Instruction *optimizeBitCastFromPhi(CastInst &CI, PHINode *PN);
401 Instruction::CastOps isEliminableCastPair(const CastInst *CI1,
409 Instruction *InsertNewInstBefore(Instruction *New, Instruction &Old) { in InsertNewInstBefore()
419 Instruction *InsertNewInstWith(Instruction *New, Instruction &Old) { in InsertNewInstWith()
430 Instruction *replaceInstUsesWith(Instruction &I, Value *V) { in replaceInstUsesWith()
451 Instruction *CreateOverflowTuple(IntrinsicInst *II, Value *Result, in CreateOverflowTuple()
464 Instruction *eraseInstFromFunction(Instruction &I) { in eraseInstFromFunction()
472 if (auto *Inst = dyn_cast<Instruction>(Operand)) in eraseInstFromFunction()
482 unsigned Depth, Instruction *CxtI) const { in computeKnownBits()
488 Instruction *CxtI = nullptr) const {
492 Instruction *CxtI = nullptr) const {
496 unsigned Depth = 0, Instruction *CxtI = nullptr) const {
501 const Instruction *CxtI) { in computeOverflowForUnsignedMul()
505 const Instruction *CxtI) { in computeOverflowForUnsignedAdd()
527 Instruction *CxtI);
532 Value *SimplifyShrShlDemandedBits(Instruction *Lsr, Instruction *Sftl,
538 bool SimplifyDemandedInstructionBits(Instruction &Inst);
550 Instruction *FoldOpIntoPhi(Instruction &I);
556 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
559 Instruction *foldOpWithConstantIntoOperand(Instruction &I);
563 Instruction *FoldPHIArgOpIntoPHI(PHINode &PN);
564 Instruction *FoldPHIArgBinOpIntoPHI(PHINode &PN);
565 Instruction *FoldPHIArgGEPIntoPHI(PHINode &PN);
566 Instruction *FoldPHIArgLoadIntoPHI(PHINode &PN);
567 Instruction *FoldPHIArgZextsIntoPHI(PHINode &PN);
573 Instruction *foldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
574 ICmpInst::Predicate Cond, Instruction &I);
575 Instruction *foldAllocaCmp(ICmpInst &ICI, const AllocaInst *Alloca,
577 Instruction *foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
580 Instruction *foldFCmpIntToFPConst(FCmpInst &I, Instruction *LHSI,
582 Instruction *foldICmpAddOpConst(Instruction &ICI, Value *X, ConstantInt *CI,
584 Instruction *foldICmpWithCastAndCast(ICmpInst &ICI);
586 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp);
587 Instruction *foldICmpWithConstant(ICmpInst &Cmp);
588 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp);
589 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp);
590 Instruction *foldICmpBinOp(ICmpInst &Cmp);
591 Instruction *foldICmpEquality(ICmpInst &Cmp);
593 Instruction *foldICmpTruncConstant(ICmpInst &Cmp, Instruction *Trunc,
595 Instruction *foldICmpAndConstant(ICmpInst &Cmp, BinaryOperator *And,
597 Instruction *foldICmpXorConstant(ICmpInst &Cmp, BinaryOperator *Xor,
599 Instruction *foldICmpOrConstant(ICmpInst &Cmp, BinaryOperator *Or,
601 Instruction *foldICmpMulConstant(ICmpInst &Cmp, BinaryOperator *Mul,
603 Instruction *foldICmpShlConstant(ICmpInst &Cmp, BinaryOperator *Shl,
605 Instruction *foldICmpShrConstant(ICmpInst &Cmp, BinaryOperator *Shr,
607 Instruction *foldICmpUDivConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
609 Instruction *foldICmpDivConstant(ICmpInst &Cmp, BinaryOperator *Div,
611 Instruction *foldICmpSubConstant(ICmpInst &Cmp, BinaryOperator *Sub,
613 Instruction *foldICmpAddConstant(ICmpInst &Cmp, BinaryOperator *Add,
615 Instruction *foldICmpAndConstConst(ICmpInst &Cmp, BinaryOperator *And,
617 Instruction *foldICmpAndShift(ICmpInst &Cmp, BinaryOperator *And,
619 Instruction *foldICmpShrConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
621 Instruction *foldICmpShlConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
624 Instruction *foldICmpBinOpEqualityWithConstant(ICmpInst &Cmp,
627 Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI, const APInt *C);
630 Instruction *foldSelectExtConst(SelectInst &Sel);
631 Instruction *foldSelectOpOp(SelectInst &SI, Instruction *TI, Instruction *FI);
632 Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
633 Instruction *foldSPFofSPF(Instruction *Inner, SelectPatternFlavor SPF1,
634 Value *A, Value *B, Instruction &Outer,
636 Instruction *foldSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
638 Instruction *OptAndOp(Instruction *Op, ConstantInt *OpRHS,
642 bool isSub, Instruction &I);
645 Instruction *PromoteCastOfAllocation(BitCastInst &CI, AllocaInst &AI);
646 Instruction *MatchBSwap(BinaryOperator &I);
648 Instruction *SimplifyMemTransfer(MemIntrinsic *MI);
649 Instruction *SimplifyMemSet(MemSetInst *MI);