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

References

lib/Transforms/IPO/GlobalOpt.cpp
 1926   auto &DL = GV->getParent()->getDataLayout();
 1937       GV->getValueType()->isSingleValueType() &&
 1938       GV->getType()->getAddressSpace() == 0 &&
 1939       !GV->isExternallyInitialized() &&
 1940       allNonInstructionUsersCanBeMadeInstructions(GV) &&
 1942       isPointerValueDeadOnEntryToFunction(GS.AccessingFunction, GV,
 1944     const DataLayout &DL = GV->getParent()->getDataLayout();
 1946     LLVM_DEBUG(dbgs() << "LOCALIZING GLOBAL: " << *GV << "\n");
 1949     Type *ElemTy = GV->getValueType();
 1952                                         GV->getName(), &FirstI);
 1953     if (!isa<UndefValue>(GV->getInitializer()))
 1954       new StoreInst(GV->getInitializer(), Alloca, &FirstI);
 1956     makeAllConstantUsesInstructions(GV);
 1958     GV->replaceAllUsesWith(Alloca);
 1959     GV->eraseFromParent();
 1967     LLVM_DEBUG(dbgs() << "GLOBAL NEVER LOADED: " << *GV << "\n");
 1970     if (isLeakCheckerRoot(GV)) {
 1972       Changed = CleanupPointerRootUsers(GV, GetTLI);
 1977           CleanupConstantGlobalUsers(GV, GV->getInitializer(), DL, GetTLI);
 1977           CleanupConstantGlobalUsers(GV, GV->getInitializer(), DL, GetTLI);
 1981     if (GV->use_empty()) {
 1982       GV->eraseFromParent();
 1990     LLVM_DEBUG(dbgs() << "MARKING CONSTANT: " << *GV << "\n");
 1996       GV->setConstant(true);
 1999     CleanupConstantGlobalUsers(GV, GV->getInitializer(), DL, GetTLI);
 1999     CleanupConstantGlobalUsers(GV, GV->getInitializer(), DL, GetTLI);
 2002     if (GV->use_empty()) {
 2005       GV->eraseFromParent();
 2013   if (!GV->getInitializer()->getType()->isSingleValueType()) {
 2014     const DataLayout &DL = GV->getParent()->getDataLayout();
 2015     if (SRAGlobal(GV, DL))
 2024       if (isa<UndefValue>(GV->getInitializer())) {
 2026         GV->setInitializer(SOVConstant);
 2029         CleanupConstantGlobalUsers(GV, GV->getInitializer(), DL, GetTLI);
 2029         CleanupConstantGlobalUsers(GV, GV->getInitializer(), DL, GetTLI);
 2031         if (GV->use_empty()) {
 2034           GV->eraseFromParent();
 2043     if (optimizeOnceStoredGlobal(GV, GS.StoredOnceValue, GS.Ordering, DL,
 2051         if (TryToShrinkGlobalToBoolean(GV, SOVConstant)) {