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, TargetData *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 TargetData *TD, const Function *F1,
159 const Function *F2)
191 const Function *F1, *F2;
378 // Check for function @f1 referring to itself and function @f2 referring to
496 for (Function::const_arg_iterator f1i = F1->arg_begin(),
563 /// Remove a Function from the FnSet and queue it up for a second sweep of
565 void remove(Function *F);
573 void replaceDirectCallers(Function *Old, Function *New);
578 void mergeTwoFunctions(Function *F, Function *G);
581 void writeThunkOrAlias(Function *F, Function *G);
585 void writeThunk(Function *F, Function *G);
588 void writeAlias(Function *F, Function *G);
627 // Insert only strong functions and merge them. Strong function merging
632 Function *F = cast<Function>(*I);
641 // create thunks to the strong function when possible. When two weak
642 // functions are identical, we create a new strong function with two weak
647 Function *F = cast<Function>(*I);
683 void MergeFunctions::replaceDirectCallers(Function *Old, Function *New) {
698 void MergeFunctions::writeThunkOrAlias(Function *F, Function *G) {
712 void MergeFunctions::writeThunk(Function *F, Function *G) {
725 Function *NewG = Function::Create(G->getFunctionType(), G->getLinkage(), "",
733 for (Function::arg_iterator AI = NewG->arg_begin(), AE = NewG->arg_end();
759 void MergeFunctions::writeAlias(Function *F, Function *G) {
774 // Merge two equivalent functions. Upon completion, Function G is deleted.
775 void MergeFunctions::mergeTwoFunctions(Function *F, Function *G) {
780 // Make them both thunks to the same internal function.
781 Function *H = Function::Create(F->getFunctionType(), F->getLinkage(), "",
820 // Never thunk a strong function to a weak function.
827 Function *DeleteF = NewF.getFunc();
833 // Remove a function from FnSet. If it was already in FnSet, add it to Deferred
835 void MergeFunctions::remove(Function *F) {
836 // We need to make sure we remove F, not a function "equal" to F per the
837 // function equality comparator.
840 // function comparison in favour of a pointer comparison on the underlying
841 // Function*'s.
849 // For each instruction used by the value, remove() the function that contains