Lines Matching refs:Function

26 // -- We define Function* container class with custom "operator<" (FunctionPtr).
102 #include "llvm/IR/Function.h"
174 mutable AssertingVH<Function> F;
179 FunctionNode(Function *F) : F(F), Hash(StructuralHash(*F)) {}
181 Function *getFunc() const { return F; }
186 void replaceBy(Function *G) const {
238 bool insert(Function *NewFunction);
240 /// Remove a Function from the FnTree and queue it up for a second sweep of
242 void remove(Function *F);
250 void replaceDirectCallers(Function *Old, Function *New);
255 void mergeTwoFunctions(Function *F, Function *G);
266 void eraseTail(Function *G);
279 void writeThunk(Function *F, Function *G);
282 void writeAlias(Function *F, Function *G);
286 bool writeThunkOrAlias(Function *F, Function *G);
289 void replaceFunctionInTree(const FunctionNode &FN, Function *G);
300 DenseMap<AssertingVH<Function>, FnTreeType::iterator> FNodesInTree;
327 Function *F1 = cast<Function>(*I);
328 Function *F2 = cast<Function>(*J);
349 Function *F3 = cast<Function>(*K);
388 static bool hasDistinctMetadataIntrinsic(const Function &F) {
408 static bool isEligibleForMerging(Function &F) {
423 std::vector<std::pair<IRHash, Function *>> HashedFuncs;
424 for (Function &Func : M) {
455 Function *F = cast<Function>(I);
472 void MergeFunctions::replaceDirectCallers(Function *Old, Function *New) {
477 // Function comparison ensures that the attributes are the same up to
545 void MergeFunctions::eraseTail(Function *G) {
699 static bool canCreateThunkFor(Function *F) {
716 static void copyMetadataIfPresent(Function *From, Function *To,
732 void MergeFunctions::writeThunk(Function *F, Function *G) {
737 Function *NewG = nullptr;
751 NewG = Function::Create(G->getFunctionType(), G->getLinkage(),
759 Function *H = MergeFunctionsPDI ? G : NewG;
817 static bool canCreateAliasFor(Function *F) {
828 void MergeFunctions::writeAlias(Function *F, Function *G) {
853 bool MergeFunctions::writeThunkOrAlias(Function *F, Function *G) {
865 // Merge two equivalent functions. Upon completion, Function G is deleted.
866 void MergeFunctions::mergeTwoFunctions(Function *F, Function *G) {
878 Function *NewF = Function::Create(F->getFunctionType(), F->getLinkage(),
942 Function *G) {
943 Function *F = FN.getFunc();
961 static bool isFuncOrderCorrect(const Function *F, const Function *G) {
980 bool MergeFunctions::insert(Function *NewFunction) {
996 Function *F = OldF.getFunc();
1005 Function *DeleteF = NewFunction;
1012 void MergeFunctions::remove(Function *F) {