Skip to content
SCCP.cpp 74.4 KiB
Newer Older
    assert(!I->second.isOverdefined() &&
           "Overdefined values should have been taken out of the map!");
David Greene's avatar
David Greene committed
    DEBUG(dbgs() << "Found that GV '" << GV->getName() << "' is constant!\n");
    while (!GV->use_empty()) {
      StoreInst *SI = cast<StoreInst>(GV->use_back());
      SI->eraseFromParent();
    }
    M.getGlobalList().erase(GV);
Chris Lattner's avatar
Chris Lattner committed
    ++IPNumGlobalConst;