diff options
Diffstat (limited to 'include/llvm/Assembly')
-rw-r--r-- | include/llvm/Assembly/AutoUpgrade.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/Assembly/AutoUpgrade.h b/include/llvm/Assembly/AutoUpgrade.h index 548068f..b8f9e22 100644 --- a/include/llvm/Assembly/AutoUpgrade.h +++ b/include/llvm/Assembly/AutoUpgrade.h @@ -15,11 +15,14 @@ #define LLVM_ASSEMBLY_AUTOUPGRADE_H #include <string> +#include <vector> namespace llvm { class Function; class CallInst; class Instruction; + class Value; + class BasicBlock; /// This function determines if the \p Name provides is a name for which the /// auto-upgrade to a non-overloaded name applies. @@ -39,6 +42,14 @@ namespace llvm { /// @brief Remove overloaded intrinsic function names. Function* UpgradeIntrinsicFunction(Function* F); + Instruction* MakeUpgradedCall( + Function* F, ///< The function to call + const std::vector<Value*>& Params, ///< Operands of the call + BasicBlock* BB, ///< Basic block the caller will insert result to + bool isTailCall = false, ///< True if this is a tail call. + unsigned CallingConv = 0 ///< Calling convention to use + ); + /// In LLVM 1.7, the overloading of intrinsic functions was replaced with /// separate functions for each of the various argument sizes. This function /// implements the auto-upgrade feature from old overloaded names to the new @@ -52,7 +63,7 @@ namespace llvm { /// @param CI The CallInst to potentially auto-upgrade. /// @returns An instrution to replace \p CI with. /// @brief Get replacement instruction for overloaded intrinsic function call. - Instruction* UpgradeIntrinsicCall(CallInst* CI); + Instruction* UpgradeIntrinsicCall(CallInst* CI, Function* newF = 0); /// Upgrade both the function and all the calls made to it, if that function /// needs to be upgraded. This is like a combination of the above two |