1 /*========================== begin_copyright_notice ============================ 2 3 Copyright (C) 2021 Intel Corporation 4 5 SPDX-License-Identifier: MIT 6 7 ============================= end_copyright_notice ===========================*/ 8 9 #ifndef VC_UTILS_GENERAL_FUNCTION_ATTRS 10 #define VC_UTILS_GENERAL_FUNCTION_ATTRS 11 12 #include <llvm/IR/Function.h> 13 14 namespace vc { 15 16 // Transfers DISubporgram node from one function to another 17 void transferDISubprogram(llvm::Function &From, llvm::Function &To); 18 19 // Transfers name and calling convention from one function to another 20 // and set custom attributes 21 void transferNameAndCCWithNewAttr(const llvm::AttributeList Attrs, 22 llvm::Function &From, llvm::Function &To); 23 24 // Returns whether \p F is a function which signature cannot be changed. 25 // Indirectly called function signature cannot be changed in general case, so 26 // this function returns true for such function (though some optimizations may 27 // change it for some cases). False is returned for a kerenl. 28 bool isFixedSignatureFunc(const llvm::Function &F); 29 } // namespace vc 30 31 #endif /* end of include guard: VC_UTILS_GENERAL_FUNCTION_ATTRS */ 32