Lines Matching full:instruction
110 /// DeleteDeadInstruction - Delete this instruction. Before we do, go through
111 /// and zero out all the operands of this instruction. If any of them become
116 static void DeleteDeadInstruction(Instruction *I,
120 SmallVector<Instruction*, 32> NowDeadInsts;
125 // Before we touch this instruction, remove it from memdep!
127 Instruction *DeadInst = NowDeadInsts.pop_back_val();
130 // This instruction is dead, zap it, in stages. Start by removing it from
142 if (Instruction *OpI = dyn_cast<Instruction>(Op))
154 /// hasMemoryWrite - Does this instruction write some memory? This only returns
156 static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo *TLI) {
194 /// getLocForWrite - Return a Location stored to by the specified instruction.
196 /// describe the memory operations for this instruction.
198 getLocForWrite(Instruction *Inst, AliasAnalysis &AA) {
225 /// instruction if any.
227 getLocForRead(Instruction *Inst, AliasAnalysis &AA) {
229 "Unknown instruction case");
239 /// isRemovable - If the value of this instruction and the memory it writes to
240 /// is unused, may we delete this instruction?
241 static bool isRemovable(Instruction *I) {
272 /// isShortenable - Returns true if this instruction can be safely shortened in
274 static bool isShortenable(Instruction *I) {
295 static Value *getStoredPointerOperand(Instruction *I) {
441 /// This function detects when it is unsafe to remove a dependent instruction
442 /// because the DSE inducing instruction may be a self-read.
443 static bool isPossibleSelfRead(Instruction *Inst,
445 Instruction *DepWrite, AliasAnalysis &AA) {
449 if (!InstReadLoc.Ptr) return false; // Not a reading instruction.
455 // DepWrite instruction if we can prove that it reads from the same location
482 Instruction *Inst = BBI++;
510 // DeleteDeadInstruction can delete the current instruction. Save BBI
516 if (!NextInst) // Next instruction deleted.
518 else if (BBI != BB.begin()) // Revisit this instruction if possible.
535 // Get the memory clobbered by the instruction we depend on. MemDep will
541 // Find out what memory location the dependent instruction stores.
542 Instruction *DepWrite = InstDep.getInst();
567 // DeleteDeadInstruction can delete the current instruction in loop
611 // Can't look past this instruction if it might read 'Loc'.
655 Instruction *InstPt = BB->getTerminator();
660 Instruction *Dependency = Dep.getInst();
671 Instruction *Next = std::next(BasicBlock::iterator(Dependency));
747 Instruction *Dead = BBI++;
769 Instruction *Inst = BBI++;
824 // Instruction doesn't read memory. Note that stores that weren't removed