[llvm-commits] CVS: llvm-gcc/gcc/llvm-representation.c llvm-representation.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 23 09:33:41 PST 2005
Changes in directory llvm-gcc/gcc:
llvm-representation.c updated: 1.16 -> 1.17
llvm-representation.h updated: 1.12 -> 1.13
---
Log message:
add a new helper function.
---
Diffs of the changes: (+11 -0)
llvm-representation.c | 9 +++++++++
llvm-representation.h | 2 ++
2 files changed, 11 insertions(+)
Index: llvm-gcc/gcc/llvm-representation.c
diff -u llvm-gcc/gcc/llvm-representation.c:1.16 llvm-gcc/gcc/llvm-representation.c:1.17
--- llvm-gcc/gcc/llvm-representation.c:1.16 Tue Nov 30 14:02:18 2004
+++ llvm-gcc/gcc/llvm-representation.c Wed Feb 23 11:33:28 2005
@@ -593,6 +593,15 @@
return New;
}
+llvm_instruction *create_select_inst(const char *Name, llvm_value *Cond,
+ llvm_value *TrueVal, llvm_value *FalseVal){
+ llvm_instruction *New = llvm_instruction_new(TrueVal->Ty, Name, O_Select, 3);
+ New->Operands[0] = Cond;
+ New->Operands[1] = TrueVal;
+ New->Operands[2] = FalseVal;
+ return New;
+}
+
llvm_instruction *create_uncond_branch(llvm_basicblock *Dest) {
llvm_instruction *New = llvm_instruction_new(VoidTy, "", O_Br, 1);
New->Operands[0] = D2V(Dest);
Index: llvm-gcc/gcc/llvm-representation.h
diff -u llvm-gcc/gcc/llvm-representation.h:1.12 llvm-gcc/gcc/llvm-representation.h:1.13
--- llvm-gcc/gcc/llvm-representation.h:1.12 Sun Nov 28 01:54:45 2004
+++ llvm-gcc/gcc/llvm-representation.h Wed Feb 23 11:33:28 2005
@@ -205,6 +205,8 @@
llvm_instruction *create_store_inst(llvm_value *Val, llvm_value *Ptr,int isVol);
llvm_instruction *create_binary_inst(const char *Name, enum InstOpcode Opc,
llvm_value *Op1, llvm_value *Op2);
+llvm_instruction *create_select_inst(const char *Name, llvm_value *Cond,
+ llvm_value *TrueVal, llvm_value *FalseVal);
llvm_instruction *create_uncond_branch(struct llvm_basicblock *Dest);
/* create_cond_branch - Create a conditional branch on Val to the two blocks.
More information about the llvm-commits
mailing list