Unverified Commit 1e835b3f authored by Kazu Hirata's avatar Kazu Hirata Committed by GitHub
Browse files

[ModuleInliner] Skip function declarations during candidate scan (#195567)

This patch skips function declarations during the candidate scan in
ModuleInlinerPass::run as declarations do not have bodies.
parent 5275e727
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,8 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M,
  // Populate the initial list of calls in this module.
  SetVector<std::pair<CallBase *, Function *>> ICPCandidates;
  for (Function &F : M) {
    if (F.isDeclaration())
      continue;
    auto &ORE = FAM.getResult<OptimizationRemarkEmitterAnalysis>(F);
    for (Instruction &I : instructions(F)) {
      if (auto *CB = dyn_cast<CallBase>(&I)) {