mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 01:15:50 +08:00
[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
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user