Lines Matching full:globals
247 ArrayRef<GlobalVariable *> Globals);
256 ArrayRef<GlobalObject *> Globals);
345 // Create globals to stand in for byte arrays and masks. These never actually
527 /// Given a disjoint set of bitsets and globals, layout the globals, build the
530 ArrayRef<Metadata *> BitSets, ArrayRef<GlobalVariable *> Globals) {
531 // Build a new global with the combined contents of the referenced globals.
533 // contents of the referenced globals and whose odd-indexed elements contain
537 for (GlobalVariable *G : Globals) {
562 // Compute the offsets of the original globals within the new global.
564 for (unsigned I = 0; I != Globals.size(); ++I)
566 GlobalLayout[Globals[I]] = CombinedGlobalLayout->getElementOffset(I * 2);
572 // to the original globals with references to the aliases.
573 for (unsigned I = 0; I != Globals.size(); ++I) {
580 Globals[I]->replaceAllUsesWith(CombinedGlobalElemPtr);
582 assert(Globals[I]->getType()->getAddressSpace() == 0);
584 Globals[I]->getLinkage(), "",
586 GAlias->setVisibility(Globals[I]->getVisibility());
587 GAlias->takeName(Globals[I]);
588 Globals[I]->replaceAllUsesWith(GAlias);
590 Globals[I]->eraseFromParent();
787 // arithmetic that we normally use for globals.
842 ArrayRef<Metadata *> BitSets, ArrayRef<GlobalObject *> Globals) {
847 for (unsigned I = 0; I != Globals.size(); ++I)
848 GlobalIndices[Globals[I]] = I;
850 // For each bitset, build a set of indices that refer to globals referenced by
881 GlobalLayoutBuilder GLB(Globals.size());
886 if (Globals.empty() || isa<GlobalVariable>(Globals[0])) {
888 std::vector<GlobalVariable *> OrderedGVs(Globals.size());
892 Globals[Offset]);
903 std::vector<Function *> OrderedFns(Globals.size());
907 auto Fn = dyn_cast<Function>(Globals[Offset]);
926 // Equivalence class set containing bitsets and the globals they reference.
956 // before. If we have, we don't need to re-add the referenced globals to the
973 // Add the referenced globals to the bitset's equivalence class.
1018 std::vector<GlobalObject *> Globals;
1025 Globals.push_back(MI->get<GlobalObject *>());
1035 buildBitSetsFromDisjointSet(BitSets, Globals);