mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 02:43:51 +00:00
Malloc/Free have mod/ref effects. Do not allow CSE of function calls that
call malloc/free. This fixes PR555. llvm-svn: 21443
This commit is contained in:
parent
0d14436bc5
commit
c638ca05a0
@ -310,6 +310,8 @@ void GlobalsModRef::AnalyzeSCC(std::vector<CallGraphNode *> &SCC) {
|
||||
FunctionEffect |= Ref;
|
||||
else if (isa<StoreInst>(*II))
|
||||
FunctionEffect |= Mod;
|
||||
else if (isa<MallocInst>(*II) || isa<FreeInst>(*II))
|
||||
FunctionEffect |= ModRef;
|
||||
}
|
||||
|
||||
if ((FunctionEffect & Mod) == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user