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

References

lib/Transforms/Scalar/EarlyCSE.cpp
  903     if (isInstructionTriviallyDead(Inst, &TLI)) {
  904       LLVM_DEBUG(dbgs() << "EarlyCSE DCE: " << *Inst << '\n');
  909       if (!salvageDebugInfo(*Inst))
  910         replaceDbgUsesWithUndef(Inst);
  911       removeMSSA(Inst);
  912       Inst->eraseFromParent();
  922     if (match(Inst, m_Intrinsic<Intrinsic::assume>())) {
  924           dyn_cast<Instruction>(cast<CallInst>(Inst)->getArgOperand(0));
  926         LLVM_DEBUG(dbgs() << "EarlyCSE considering assumption: " << *Inst
  930         LLVM_DEBUG(dbgs() << "EarlyCSE skipping assumption: " << *Inst << '\n');
  935     if (match(Inst, m_Intrinsic<Intrinsic::sideeffect>())) {
  936       LLVM_DEBUG(dbgs() << "EarlyCSE skipping sideeffect: " << *Inst << '\n');
  953     if (match(Inst, m_Intrinsic<Intrinsic::invariant_start>())) {
  955       if (!Inst->use_empty())
  957       auto *CI = cast<CallInst>(Inst);
  965     if (isGuard(Inst)) {
  967               dyn_cast<Instruction>(cast<CallInst>(Inst)->getArgOperand(0))) {
  975                          << "EarlyCSE removing guard: " << *Inst << '\n');
  976               removeMSSA(Inst);
  977               Inst->eraseFromParent();
  982               cast<CallInst>(Inst)->setArgOperand(0, KnownCond);
  999     if (Value *V = SimplifyInstruction(Inst, SQ)) {
 1000       LLVM_DEBUG(dbgs() << "EarlyCSE Simplify: " << *Inst << "  to: " << *V
 1006         if (!Inst->use_empty()) {
 1007           Inst->replaceAllUsesWith(V);
 1010         if (isInstructionTriviallyDead(Inst, &TLI)) {
 1011           removeMSSA(Inst);
 1012           Inst->eraseFromParent();
 1024     if (SimpleValue::canHandle(Inst)) {
 1026       if (Value *V = AvailableValues.lookup(Inst)) {
 1027         LLVM_DEBUG(dbgs() << "EarlyCSE CSE: " << *Inst << "  to: " << *V
 1034           I->andIRFlags(Inst);
 1035         Inst->replaceAllUsesWith(V);
 1036         removeMSSA(Inst);
 1037         Inst->eraseFromParent();
 1044       AvailableValues.insert(Inst, Inst);
 1044       AvailableValues.insert(Inst, Inst);
 1048     ParseMemoryInst MemInst(Inst, TTI);
 1064         auto MemLoc = MemoryLocation::get(Inst);
 1083           (isOperatingOnInvariantMemAt(Inst, InVal.Generation) ||
 1085                                InVal.DefInst, Inst))) {
 1086         Value *Op = getOrCreateResult(InVal.DefInst, Inst->getType());
 1088           LLVM_DEBUG(dbgs() << "EarlyCSE CSE LOAD: " << *Inst
 1094           if (!Inst->use_empty())
 1095             Inst->replaceAllUsesWith(Op);
 1096           removeMSSA(Inst);
 1097           Inst->eraseFromParent();
 1107           LoadValue(Inst, CurrentGeneration, MemInst.getMatchingId(),
 1119     if ((Inst->mayReadFromMemory() || Inst->mayThrow()) &&
 1119     if ((Inst->mayReadFromMemory() || Inst->mayThrow()) &&
 1124     if (CallValue::canHandle(Inst)) {
 1127       std::pair<Instruction *, unsigned> InVal = AvailableCalls.lookup(Inst);
 1130                               Inst)) {
 1131         LLVM_DEBUG(dbgs() << "EarlyCSE CSE CALL: " << *Inst
 1137         if (!Inst->use_empty())
 1138           Inst->replaceAllUsesWith(InVal.first);
 1139         removeMSSA(Inst);
 1140         Inst->eraseFromParent();
 1148           Inst, std::pair<Instruction *, unsigned>(Inst, CurrentGeneration));
 1148           Inst, std::pair<Instruction *, unsigned>(Inst, CurrentGeneration));
 1157     if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
 1159         assert(Inst->mayReadFromMemory() && "relied on to prevent DSE above");
 1171           InVal.DefInst == getOrCreateResult(Inst, InVal.DefInst->getType()) &&
 1175           (isOperatingOnInvariantMemAt(Inst, InVal.Generation) ||
 1177                                InVal.DefInst, Inst))) {
 1187         LLVM_DEBUG(dbgs() << "EarlyCSE DSE (writeback): " << *Inst << '\n');
 1192         removeMSSA(Inst);
 1193         Inst->eraseFromParent();
 1205     if (Inst->mayWriteToMemory()) {
 1223                               << "  due to: " << *Inst << '\n');
 1244             LoadValue(Inst, CurrentGeneration, MemInst.getMatchingId(),
 1255           LastStore = Inst;