reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/InstCombine/InstructionCombining.cpp
 3209     if (I == nullptr) continue;  // skip null values.
 3212     if (isInstructionTriviallyDead(I, &TLI)) {
 3213       LLVM_DEBUG(dbgs() << "IC: DCE: " << *I << '\n');
 3214       eraseInstFromFunction(*I);
 3224     if (!I->use_empty() &&
 3225         (I->getNumOperands() == 0 || isa<Constant>(I->getOperand(0)))) {
 3225         (I->getNumOperands() == 0 || isa<Constant>(I->getOperand(0)))) {
 3226       if (Constant *C = ConstantFoldInstruction(I, DL, &TLI)) {
 3227         LLVM_DEBUG(dbgs() << "IC: ConstFold to: " << *C << " from: " << *I
 3231         replaceInstUsesWith(*I, C);
 3233         if (isInstructionTriviallyDead(I, &TLI))
 3234           eraseInstFromFunction(*I);
 3242     Type *Ty = I->getType();
 3243     if (ExpensiveCombines && !I->use_empty() && Ty->isIntOrIntVectorTy()) {
 3244       KnownBits Known = computeKnownBits(I, /*Depth*/0, I);
 3244       KnownBits Known = computeKnownBits(I, /*Depth*/0, I);
 3248                           << " from: " << *I << '\n');
 3251         replaceInstUsesWith(*I, C);
 3253         if (isInstructionTriviallyDead(I, &TLI))
 3254           eraseInstFromFunction(*I);
 3261     if (EnableCodeSinking && I->hasOneUse()) {
 3262       BasicBlock *BB = I->getParent();
 3263       Instruction *UserInst = cast<Instruction>(*I->user_begin());
 3268         UserParent = PN->getIncomingBlock(*I->use_begin());
 3286           if (TryToSinkInstruction(I, UserParent)) {
 3287             LLVM_DEBUG(dbgs() << "IC: Sink: " << *I << '\n');
 3292             for (Use &U : I->operands())
 3301     Builder.SetInsertPoint(I);
 3302     Builder.SetCurrentDebugLocation(I->getDebugLoc());
 3307     LLVM_DEBUG(raw_string_ostream SS(OrigI); I->print(SS); OrigI = SS.str(););
 3310     if (Instruction *Result = visit(*I)) {
 3313       if (Result != I) {
 3314         LLVM_DEBUG(dbgs() << "IC: Old = " << *I << '\n'
 3317         if (I->getDebugLoc())
 3318           Result->setDebugLoc(I->getDebugLoc());
 3320         I->replaceAllUsesWith(Result);
 3323         Result->takeName(I);
 3330         BasicBlock *InstParent = I->getParent();
 3331         BasicBlock::iterator InsertPos = I->getIterator();
 3340         eraseInstFromFunction(*I);
 3343                           << "    New = " << *I << '\n');
 3347         if (isInstructionTriviallyDead(I, &TLI)) {
 3348           eraseInstFromFunction(*I);
 3350           Worklist.AddUsersToWorkList(*I);
 3351           Worklist.Add(I);