diff options
author | Nikita Popov <npopov@redhat.com> | 2022-06-08 10:00:31 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-06-21 14:24:13 +0200 |
commit | ed63fcb232b409310a33dcebe46f5f9c893223e3 (patch) | |
tree | e6852c76fe8d4dde781274684febfd95de4a38d4 /llvm/lib/Analysis/GlobalsModRef.cpp | |
parent | f439b31971a755c19777ae2c6c4114c4d02a54dd (diff) | |
download | llvm-ed63fcb232b409310a33dcebe46f5f9c893223e3.zip llvm-ed63fcb232b409310a33dcebe46f5f9c893223e3.tar.gz llvm-ed63fcb232b409310a33dcebe46f5f9c893223e3.tar.bz2 |
[GlobalsModRef] Remove check for allocator calls
As the FIXME already indicates, I don't see why this code would be
necessary. If there's a call to an allocator function, that should
get treated just like any other function call -- usually it will be
a declaration and handled conservatively based on memory attributes
only. There should be no need to explicitly force it to be modref.
No test failures either, so I think this is just dead code.
Differential Revision: https://reviews.llvm.org/D127273
Diffstat (limited to 'llvm/lib/Analysis/GlobalsModRef.cpp')
-rw-r--r-- | llvm/lib/Analysis/GlobalsModRef.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp index c179fd3..e82d2fa 100644 --- a/llvm/lib/Analysis/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/GlobalsModRef.cpp @@ -597,12 +597,7 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, Module &M) { // We handle calls specially because the graph-relevant aspects are // handled above. if (auto *Call = dyn_cast<CallBase>(&I)) { - auto &TLI = GetTLI(*Node->getFunction()); - if (isAllocationFn(Call, &TLI) || isFreeCall(Call, &TLI)) { - // FIXME: It is completely unclear why this is necessary and not - // handled by the above graph code. - FI.addModRefInfo(ModRefInfo::ModRef); - } else if (Function *Callee = Call->getCalledFunction()) { + if (Function *Callee = Call->getCalledFunction()) { // The callgraph doesn't include intrinsic calls. if (Callee->isIntrinsic()) { if (isa<DbgInfoIntrinsic>(Call)) |