IntervalPartition & IntervalIterator classes have been split out into
[oota-llvm.git] / include / llvm / iOperators.h
1 //===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=//
2 //
3 // This file contains the declarations of all of the Binary Operator classes.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef LLVM_IBINARY_H
8 #define LLVM_IBINARY_H
9
10 #include "llvm/InstrTypes.h"
11
12 //===----------------------------------------------------------------------===//
13 //                 Classes to represent Binary operators
14 //===----------------------------------------------------------------------===//
15 //
16 // All of these classes are subclasses of the BinaryOperator class...
17 //
18
19 class AddInst : public BinaryOperator {
20 public:
21   AddInst(Value *S1, Value *S2, const string &Name = "")
22       : BinaryOperator(Instruction::Add, S1, S2, Name) {
23   }
24
25   virtual string getOpcode() const { return "add"; }
26 };
27
28
29 class SubInst : public BinaryOperator {
30 public:
31   SubInst(Value *S1, Value *S2, const string &Name = "") 
32     : BinaryOperator(Instruction::Sub, S1, S2, Name) {
33   }
34
35   virtual string getOpcode() const { return "sub"; }
36 };
37
38
39 class SetCondInst : public BinaryOperator {
40   BinaryOps OpType;
41 public:
42   SetCondInst(BinaryOps opType, Value *S1, Value *S2, 
43               const string &Name = "");
44
45   virtual string getOpcode() const;
46 };
47
48 #endif