Lines Matching +full:compute +full:- +full:cb

1 //===- CalledValuePropagation.cpp - Propagate called values -----*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 // run-time. This metadata is added to indirect call sites when the set of
17 //===----------------------------------------------------------------------===//
30 #define DEBUG_TYPE "called-value-propagation"
40 "cvp-max-functions-per-value", cl::Hidden, cl::init(4),
47 /// in-memory values. An LLVM Value can technically be in more than one group.
68 return LHS->getName() < RHS->getName();
76 assert(llvm::is_sorted(this->Functions, Compare()));
123 /// Compute and return a CVPLatticeVal for the given CVPLatticeKey.
130 if (canTrackArgumentsInterprocedurally(A->getParent()))
140 return computeConstant(GV->getInitializer());
167 /// Compute the lattice values that change as a result of executing the given
212 OS << Key.getPointer()->getName();
227 /// Compute a new lattice value for the given constant. The constant, after
234 if (auto *F = dyn_cast<Function>(C->stripPointerCasts()))
244 Function *F = I.getParent()->getParent();
245 if (F->getReturnType()->isVoidTy())
257 void visitCallBase(CallBase &CB,
260 Function *F = CB.getCalledFunction();
261 auto RegI = CVPLatticeKey(&CB, IPOGrouping::Register);
266 IndirectCalls.insert(&CB);
272 if (CB.getType()->isVoidTy())
280 SS.MarkBlockExecutable(&F->front());
282 for (Argument &A : F->args()) {
285 CVPLatticeKey(CB.getArgOperand(A.getArgNo()), IPOGrouping::Register);
292 if (CB.getType()->isVoidTy())
359 /// its work list and inspecting the state of control-flow related values.
390 auto RegI = CVPLatticeKey(C->getCalledOperand(), IPOGrouping::Register);
395 C->setMetadata(LLVMContext::MD_callees, Callees);