Home | History | Annotate | Download | only in IPO

Lines Matching defs:GS

83                                const GlobalStatus &GS);
196 static bool AnalyzeGlobal(const Value *V, GlobalStatus &GS,
202 GS.HasNonInstructionUser = true;
208 if (AnalyzeGlobal(CE, GS, PHIUsers)) return true;
210 if (!GS.HasMultipleAccessingFunctions) {
212 if (GS.AccessingFunction == 0)
213 GS.AccessingFunction = F;
214 else if (GS.AccessingFunction != F)
215 GS.HasMultipleAccessingFunctions = true;
218 GS.isLoaded = true;
221 GS.Ordering = StrongerOrdering(GS.Ordering, LI->getOrdering());
228 GS.Ordering = StrongerOrdering(GS.Ordering, SI->getOrdering());
233 if (GS.StoredType != GlobalStatus::isStored) {
238 if (GS.StoredType < GlobalStatus::isInitializerStored)
239 GS.StoredType = GlobalStatus::isInitializerStored;
242 if (GS.StoredType < GlobalStatus::isInitializerStored)
243 GS.StoredType = GlobalStatus::isInitializerStored;
244 } else if (GS.StoredType < GlobalStatus::isStoredOnce) {
245 GS.StoredType = GlobalStatus::isStoredOnce;
246 GS.StoredOnceValue = StoredVal;
247 } else if (GS.StoredType == GlobalStatus::isStoredOnce &&
248 GS.StoredOnceValue == StoredVal) {
251 GS.StoredType = GlobalStatus::isStored;
254 GS.StoredType = GlobalStatus::isStored;
258 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
260 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
265 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
266 GS.HasPHIUser = true;
268 GS.isCompared = true;
272 GS.StoredType = GlobalStatus::isStored;
274 GS.isLoaded = true;
278 GS.StoredType = GlobalStatus::isStored;
283 GS.HasNonInstructionUser = true;
288 GS.HasNonInstructionUser = true;
1733 GlobalStatus GS;
1735 if (AnalyzeGlobal(GV, GS, PHIUsers))
1738 if (!GS.isCompared && !GV->hasUnnamedAddr()) {
1746 return ProcessInternalGlobal(GV, GVI, PHIUsers, GS);
1754 const GlobalStatus &GS) {
1764 if (!GS.HasMultipleAccessingFunctions &&
1765 GS.AccessingFunction && !GS.HasNonInstructionUser &&
1767 GS.AccessingFunction->getName() == "main" &&
1768 GS.AccessingFunction->hasExternalLinkage() &&
1771 Instruction &FirstI = const_cast<Instruction&>(*GS.AccessingFunction
1787 if (!GS.isLoaded) {
1803 } else if (GS.StoredType <= GlobalStatus::isInitializerStored) {
1826 } else if (GS.StoredType == GlobalStatus::isStoredOnce) {
1831 if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))
1853 if (OptimizeOnceStoredGlobal(GV, GS.StoredOnceValue, GS.Ordering, GVI,
1859 if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))