Lines Matching refs:Function
174 /// value out of a function, it will have an entry in this map, indicating
175 /// what the known return value for the function is.
176 DenseMap<Function*, LatticeVal> TrackedRetVals;
180 DenseMap<std::pair<Function*, unsigned>, LatticeVal> TrackedMultipleRetVals;
182 /// MRVFunctionsTracked - Each function in TrackedMultipleRetVals is
184 SmallPtrSet<Function*, 16> MRVFunctionsTracked;
189 SmallPtrSet<Function*, 16> TrackingIncomingArguments;
240 /// and out of the specified function (which cannot have its address taken),
242 void AddTrackedFunction(Function *F) {
253 void AddArgumentTrackedFunction(Function *F) {
261 /// ResolvedUndefsIn - While solving the dataflow for a function, we assume
266 bool ResolvedUndefsIn(Function &F);
287 const DenseMap<Function*, LatticeVal> &getTrackedRetVals() {
350 if (Function *F = dyn_cast<Function>(V))
351 dbgs() << "Function '" << F->getName() << "'\n";
376 /// value. This function handles the case when the value hasn't been seen yet
399 /// value/field pair. This function handles the case when the value hasn't
773 Function *F = I.getParent()->getParent();
776 // If we are tracking the return value of this function, merge it in.
778 DenseMap<Function*, LatticeVal>::iterator TFRVI =
1263 Function *F = CS.getCalledFunction();
1274 // Otherwise, if we have a single return value case, and if the function is
1302 // If this is a local function that doesn't have its address taken, mark its
1304 // the formal arguments of the function.
1310 for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end();
1312 // If this argument is byval, and if the function is not readonly, there
1330 // If this is a single/zero retval case, see if we're tracking the function.
1335 // If we are tracking this callee, propagate the result of the function
1341 DenseMap<Function*, LatticeVal>::iterator TFRVI = TrackedRetVals.find(F);
1408 /// ResolvedUndefsIn - While solving the dataflow for a function, we assume
1426 bool SCCPSolver::ResolvedUndefsIn(Function &F) {
1427 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
1440 if (Function *F = CS.getCalledFunction())
1614 if (Function *F = CallSite(I).getCalledFunction())
1682 /// SCCP Class - This class uses the SCCPSolver to implement a per-function
1692 // algorithm, and return true if the function was modified.
1694 bool runOnFunction(Function &F);
1734 // and return true if the function was modified.
1736 bool SCCP::runOnFunction(Function &F) {
1737 DEBUG(dbgs() << "SCCP on function '" << F.getName() << "'\n");
1740 function as being executable.
1743 // Mark all arguments to the function as being overdefined.
1744 for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E;++AI)
1757 // If we decided that there are basic blocks that are dead in this function,
1759 // as we cannot modify the CFG of the function.
1761 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
1768 // Iterate over all of the instructions in a function, replacing them with
1840 // Make sure we are calling the function, not passing the address.
1848 // blockaddress doesn't take the address of the function, it takes addr
1865 SmallPtrSet<Function*, 32> AddressTakenFunctions;
1874 // If this is a strong or ODR definition of this function, then we can
1879 // If this function only has direct calls that we can see, we can track its
1891 // Assume the function is called.
1895 for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end();
1928 for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end();
1949 for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
2001 // Now that all instructions in the function are constant folded, erase dead
2052 // If we inferred constant or undef return values for a function, we replaced
2054 // actually returning anything from the function. Replace all return
2059 // if the address of the function isn't taken. In cases where a return is the
2060 // last use of a function, the order of processing functions would affect
2065 const DenseMap<Function*, LatticeVal> &RV = Solver.getTrackedRetVals();
2066 for (DenseMap<Function*, LatticeVal>::const_iterator I = RV.begin(),
2068 Function *F = I->first;
2072 // We can only do this if we know that nothing else can call the function.
2076 for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
2084 Function *F = ReturnsToZap[i]->getParent()->getParent();