Lines Matching refs:I
84 for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { in runOnModule() local
85 Changed |= RemoveUnusedGlobalValue(*I); in runOnModule()
87 if (!I->isDeclaration() && !I->hasAvailableExternallyLinkage()) { in runOnModule()
88 if (!I->isDiscardableIfUnused()) in runOnModule()
89 GlobalIsNeeded(I); in runOnModule()
90 else if (const Comdat *C = I->getComdat()) in runOnModule()
91 ComdatGVPairs.insert(std::make_pair(C, I)); in runOnModule()
95 for (Module::global_iterator I = M.global_begin(), E = M.global_end(); in runOnModule() local
96 I != E; ++I) { in runOnModule()
97 Changed |= RemoveUnusedGlobalValue(*I); in runOnModule()
100 if (!I->isDeclaration() && !I->hasAvailableExternallyLinkage()) { in runOnModule()
101 if (!I->isDiscardableIfUnused()) in runOnModule()
102 GlobalIsNeeded(I); in runOnModule()
103 else if (const Comdat *C = I->getComdat()) in runOnModule()
104 ComdatGVPairs.insert(std::make_pair(C, I)); in runOnModule()
108 for (Module::alias_iterator I = M.alias_begin(), E = M.alias_end(); in runOnModule() local
109 I != E; ++I) { in runOnModule()
110 Changed |= RemoveUnusedGlobalValue(*I); in runOnModule()
112 if (!I->isDiscardableIfUnused()) { in runOnModule()
113 GlobalIsNeeded(I); in runOnModule()
114 } else if (const Comdat *C = I->getComdat()) { in runOnModule()
115 ComdatGVPairs.insert(std::make_pair(C, I)); in runOnModule()
119 for (ComdatGVPairsTy::iterator I = ComdatGVPairs.begin(), in runOnModule() local
121 I != E;) { in runOnModule()
122 ComdatGVPairsTy::iterator UB = ComdatGVPairs.upper_bound(I->first); in runOnModule()
123 bool CanDiscard = std::all_of(I, UB, [](ComdatGVPairsTy::value_type Pair) { in runOnModule()
127 std::for_each(I, UB, [this](ComdatGVPairsTy::value_type Pair) { in runOnModule()
131 I = UB; in runOnModule()
140 for (Module::global_iterator I = M.global_begin(), E = M.global_end(); in runOnModule() local
141 I != E; ++I) in runOnModule()
142 if (!AliveGlobals.count(I)) { in runOnModule()
143 DeadGlobalVars.push_back(I); // Keep track of dead globals in runOnModule()
144 I->setInitializer(nullptr); in runOnModule()
149 for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) in runOnModule() local
150 if (!AliveGlobals.count(I)) { in runOnModule()
151 DeadFunctions.push_back(I); // Keep track of dead globals in runOnModule()
152 if (!I->isDeclaration()) in runOnModule()
153 I->deleteBody(); in runOnModule()
158 for (Module::alias_iterator I = M.alias_begin(), E = M.alias_end(); I != E; in runOnModule() local
159 ++I) in runOnModule()
160 if (!AliveGlobals.count(I)) { in runOnModule()
161 DeadAliases.push_back(I); in runOnModule()
162 I->setAliasee(nullptr); in runOnModule()
228 for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) in GlobalIsNeeded() local
229 for (User::op_iterator U = I->op_begin(), E = I->op_end(); U != E; ++U) in GlobalIsNeeded()
243 for (User::op_iterator I = C->op_begin(), E = C->op_end(); I != E; ++I) { in MarkUsedGlobalsAsNeeded() local
245 Constant *Op = dyn_cast<Constant>(*I); in MarkUsedGlobalsAsNeeded()