mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-17 19:25:48 +00:00
Intrinsics don't read these kinds of global
variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dd595c5998
commit
1abe60b9be
@ -384,11 +384,13 @@ void GlobalsModRef::AnalyzeCallGraph(CallGraph &CG, Module &M) {
|
|||||||
// Can't do better than that!
|
// Can't do better than that!
|
||||||
} else if (F->onlyReadsMemory()) {
|
} else if (F->onlyReadsMemory()) {
|
||||||
FunctionEffect |= Ref;
|
FunctionEffect |= Ref;
|
||||||
// This function might call back into the module and read a global, so
|
if (!F->isIntrinsic()) {
|
||||||
|
// This function might call back into the module and read a global -
|
||||||
// mark all globals read somewhere as being read by this function.
|
// mark all globals read somewhere as being read by this function.
|
||||||
for (std::set<GlobalValue*>::iterator GI = ReadGlobals.begin(),
|
for (std::set<GlobalValue*>::iterator GI = ReadGlobals.begin(),
|
||||||
E = ReadGlobals.end(); GI != E; ++GI)
|
E = ReadGlobals.end(); GI != E; ++GI)
|
||||||
FR.GlobalInfo[*GI] |= Ref;
|
FR.GlobalInfo[*GI] |= Ref;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Can't say anything useful.
|
// Can't say anything useful.
|
||||||
KnowNothing = true;
|
KnowNothing = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user