operator== returns false when two bitvectors have different sizes.
[oota-llvm.git] / include / llvm / Instructions.h
index 1c3ca0f614507a018dd2603701ff48d187e5184f..9fc76019aa6a6b5057fff91699afd582509f737b 100644 (file)
 #define LLVM_INSTRUCTIONS_H
 
 #include "llvm/InstrTypes.h"
-#include <vector>  // fixme remove.
 
 namespace llvm {
 
 class BasicBlock;
 class ConstantInt;
 class PointerType;
-class PackedType;
+class VectorType;
 
 //===----------------------------------------------------------------------===//
 //                             AllocationInst Class
@@ -223,11 +222,18 @@ class LoadInst : public UnaryInstruction {
 public:
   LoadInst(Value *Ptr, const std::string &Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const std::string &Name, BasicBlock *InsertAtEnd);
-  explicit LoadInst(Value *Ptr, const std::string &Name = "",
-                    bool isVolatile = false, Instruction *InsertBefore = 0);
+  LoadInst(Value *Ptr, const std::string &Name, bool isVolatile = false,
+           Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
            BasicBlock *InsertAtEnd);
 
+  LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
+  LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
+  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
+                    Instruction *InsertBefore = 0);
+  LoadInst(Value *Ptr, const char *Name, bool isVolatile,
+           BasicBlock *InsertAtEnd);
+  
   /// isVolatile - Return true if this is a load from a volatile memory
   /// location.
   ///
@@ -700,11 +706,6 @@ public:
   CallInst(Value *F, Value *const *Args, unsigned NumArgs,
            const std::string &Name, BasicBlock *InsertAtEnd);
   
-  CallInst(Value *F, const std::vector<Value*> &Par,
-           const std::string &Name = "", Instruction *InsertBefore = 0);
-  CallInst(Value *F, const std::vector<Value*> &Par,
-           const std::string &Name, BasicBlock *InsertAtEnd);
-
   // Alternate CallInst ctors w/ two actuals, w/ one actual and no
   // actuals, respectively.
   CallInst(Value *F, Value *Actual1, Value *Actual2,
@@ -834,11 +835,13 @@ class VAArgInst : public UnaryInstruction {
 public:
   VAArgInst(Value *List, const Type *Ty, const std::string &Name = "",
              Instruction *InsertBefore = 0)
-    : UnaryInstruction(Ty, VAArg, List, Name, InsertBefore) {
+    : UnaryInstruction(Ty, VAArg, List, 0, InsertBefore) {
+    setName(Name);
   }
   VAArgInst(Value *List, const Type *Ty, const std::string &Name,
             BasicBlock *InsertAtEnd)
-    : UnaryInstruction(Ty, VAArg, List, Name, InsertAtEnd) {
+    : UnaryInstruction(Ty, VAArg, List, 0, InsertAtEnd) {
+    setName(Name);
   }
 
   virtual VAArgInst *clone() const;
@@ -859,7 +862,7 @@ public:
 //===----------------------------------------------------------------------===//
 
 /// ExtractElementInst - This instruction extracts a single (scalar)
-/// element from a PackedType value
+/// element from a VectorType value
 ///
 class ExtractElementInst : public Instruction {
   Use Ops[2];
@@ -913,7 +916,7 @@ public:
 //===----------------------------------------------------------------------===//
 
 /// InsertElementInst - This instruction inserts a single (scalar)
-/// element into a PackedType value
+/// element into a VectorType value
 ///
 class InsertElementInst : public Instruction {
   Use Ops[3];
@@ -937,10 +940,10 @@ public:
 
   virtual bool mayWriteToMemory() const { return false; }
 
-  /// getType - Overload to return most specific packed type.
+  /// getType - Overload to return most specific vector type.
   ///
-  inline const PackedType *getType() const {
-    return reinterpret_cast<const PackedType*>(Instruction::getType());
+  inline const VectorType *getType() const {
+    return reinterpret_cast<const VectorType*>(Instruction::getType());
   }
 
   /// Transparently provide more efficient getOperand methods.
@@ -989,10 +992,10 @@ public:
 
   virtual bool mayWriteToMemory() const { return false; }
 
-  /// getType - Overload to return most specific packed type.
+  /// getType - Overload to return most specific vector type.
   ///
-  inline const PackedType *getType() const {
-    return reinterpret_cast<const PackedType*>(Instruction::getType());
+  inline const VectorType *getType() const {
+    return reinterpret_cast<const VectorType*>(Instruction::getType());
   }
 
   /// Transparently provide more efficient getOperand methods.
@@ -1486,12 +1489,6 @@ class InvokeInst : public TerminatorInst {
   void init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
             Value* const *Args, unsigned NumArgs);
 public:
-  InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
-             const std::vector<Value*> &Params, const std::string &Name = "",
-             Instruction *InsertBefore = 0);
-  InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
-             const std::vector<Value*> &Params, const std::string &Name,
-             BasicBlock *InsertAtEnd);
   InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
              Value* const* Args, unsigned NumArgs, const std::string &Name = "",
              Instruction *InsertBefore = 0);