Home | History | Annotate | Download | only in IPO

Lines Matching refs:GS

83                                const GlobalStatus &GS);
192 static bool AnalyzeGlobal(const Value *V, GlobalStatus &GS,
198 GS.HasNonInstructionUser = true;
204 if (AnalyzeGlobal(CE, GS, PHIUsers)) return true;
206 if (!GS.HasMultipleAccessingFunctions) {
208 if (GS.AccessingFunction == 0)
209 GS.AccessingFunction = F;
210 else if (GS.AccessingFunction != F)
211 GS.HasMultipleAccessingFunctions = true;
214 GS.isLoaded = true;
217 GS.Ordering = StrongerOrdering(GS.Ordering, LI->getOrdering());
225 GS.Ordering = StrongerOrdering(GS.Ordering, SI->getOrdering());
230 if (GS.StoredType != GlobalStatus::isStored) {
243 if (GS.StoredType < GlobalStatus::isInitializerStored)
244 GS.StoredType = GlobalStatus::isInitializerStored;
247 if (GS.StoredType < GlobalStatus::isInitializerStored)
248 GS.StoredType = GlobalStatus::isInitializerStored;
249 } else if (GS.StoredType < GlobalStatus::isStoredOnce) {
250 GS.StoredType = GlobalStatus::isStoredOnce;
251 GS.StoredOnceValue = StoredVal;
252 } else if (GS.StoredType == GlobalStatus::isStoredOnce &&
253 GS.StoredOnceValue == StoredVal) {
256 GS.StoredType = GlobalStatus::isStored;
259 GS.StoredType = GlobalStatus::isStored;
263 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
265 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
267 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
272 if (AnalyzeGlobal(I, GS, PHIUsers)) return true;
274 GS.isCompared = true;
278 GS.StoredType = GlobalStatus::isStored;
280 GS.isLoaded = true;
284 GS.StoredType = GlobalStatus::isStored;
289 GS.HasNonInstructionUser = true;
294 GS.HasNonInstructionUser = true;
1920 GlobalStatus GS;
1922 if (AnalyzeGlobal(GV, GS, PHIUsers))
1925 if (!GS.isCompared && !GV->hasUnnamedAddr()) {
1933 return ProcessInternalGlobal(GV, GVI, PHIUsers, GS);
1941 const GlobalStatus &GS) {
1951 if (!GS.HasMultipleAccessingFunctions &&
1952 GS.AccessingFunction && !GS.HasNonInstructionUser &&
1954 GS.AccessingFunction->getName() == "main" &&
1955 GS.AccessingFunction->hasExternalLinkage() &&
1958 Instruction &FirstI = const_cast<Instruction&>(*GS.AccessingFunction
1974 if (!GS.isLoaded) {
1995 } else if (GS.StoredType <= GlobalStatus::isInitializerStored) {
2018 } else if (GS.StoredType == GlobalStatus::isStoredOnce) {
2023 if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))
2045 if (OptimizeOnceStoredGlobal(GV, GS.StoredOnceValue, GS.Ordering, GVI,
2051 if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))