[llvm-commits] CVS: llvm/include/llvm/Assembly/AutoUpgrade.h

Reid Spencer reid at x10sys.com
Fri Jan 27 03:49:41 PST 2006



Changes in directory llvm/include/llvm/Assembly:

AutoUpgrade.h updated: 1.3 -> 1.4
---
Log message:

Fix auto-upgrade of intrinsics to work properly with both assembly and
bytecode reading. This code is crufty, the result of much hacking to get things
working correctly. Cleanup patches will follow.


---
Diffs of the changes:  (+12 -1)

 AutoUpgrade.h |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Assembly/AutoUpgrade.h
diff -u llvm/include/llvm/Assembly/AutoUpgrade.h:1.3 llvm/include/llvm/Assembly/AutoUpgrade.h:1.4
--- llvm/include/llvm/Assembly/AutoUpgrade.h:1.3	Thu Jan 19 00:59:26 2006
+++ llvm/include/llvm/Assembly/AutoUpgrade.h	Fri Jan 27 05:49:27 2006
@@ -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 @@
   /// @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 @@
   /// @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






More information about the llvm-commits mailing list