Home | History | Annotate | Download | only in IPO

Lines Matching refs:Function

12 // A hash is computed from the function, based on its type and number of
16 // on each function pair. This takes n^2/2 comparisons per bucket, so it's
17 // important that the hash function be high quality. The equality comparison
21 // overridable, we move the functionality into a new internal function and
30 // Many functions have their address taken by the virtual function table for
75 /// Creates a hash-code for the function which is the same for any two
77 /// inside the function.
78 static unsigned profileFunction(const Function *F) {
102 ComparableFunction(Function *Func, DataLayout *TD)
105 Function *getFunc() const { return Func; }
109 // Drops AssertingVH reference to the function. Outside of debug mode, this
113 "Attempted to release function twice, or release empty/tombstone!");
121 AssertingVH<Function> Func;
158 FunctionComparator(const DataLayout *TD, const Function *F1,
159 const Function *F2)
191 const Function *F1, *F2;
376 // Check for function @f1 referring to itself and function @f2 referring to
494 for (Function::const_arg_iterator f1i = F1->arg_begin(),
561 /// Remove a Function from the FnSet and queue it up for a second sweep of
563 void remove(Function *F);
571 void replaceDirectCallers(Function *Old, Function *New);
576 void mergeTwoFunctions(Function *F, Function *G);
579 void writeThunkOrAlias(Function *F, Function *G);
583 void writeThunk(Function *F, Function *G);
586 void writeAlias(Function *F, Function *G);
625 // Insert only strong functions and merge them. Strong function merging
630 Function *F = cast<Function>(*I);
639 // create thunks to the strong function when possible. When two weak
640 // functions are identical, we create a new strong function with two weak
645 Function *F = cast<Function>(*I);
681 void MergeFunctions::replaceDirectCallers(Function *Old, Function *New) {
696 void MergeFunctions::writeThunkOrAlias(Function *F, Function *G) {
710 void MergeFunctions::writeThunk(Function *F, Function *G) {
723 Function *NewG = Function::Create(G->getFunctionType(), G->getLinkage(), "",
731 for (Function::arg_iterator AI = NewG->arg_begin(), AE = NewG->arg_end();
757 void MergeFunctions::writeAlias(Function *F, Function *G) {
772 // Merge two equivalent functions. Upon completion, Function G is deleted.
773 void MergeFunctions::mergeTwoFunctions(Function *F, Function *G) {
778 // Make them both thunks to the same internal function.
779 Function *H = Function::Create(F->getFunctionType(), F->getLinkage(), "",
818 // Never thunk a strong function to a weak function.
825 Function *DeleteF = NewF.getFunc();
831 // Remove a function from FnSet. If it was already in FnSet, add it to Deferred
833 void MergeFunctions::remove(Function *F) {
834 // We need to make sure we remove F, not a function "equal" to F per the
835 // function equality comparator.
838 // function comparison in favour of a pointer comparison on the underlying
839 // Function*'s.
847 // For each instruction used by the value, remove() the function that contains