[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGISel.h

Chris Lattner sabre at nondot.org
Tue Oct 24 10:58:15 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGISel.h updated: 1.28 -> 1.29
---
Log message:

Generalize CaseBlock a bit more:

Rename LHSBB/RHSBB to TrueBB/FalseBB.  Allow the RHS value to be null,
in which case the LHS is treated as a bool.


---
Diffs of the changes:  (+8 -8)

 SelectionDAGISel.h |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.28 llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.29
--- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.28	Tue Oct 24 12:03:35 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGISel.h	Tue Oct 24 12:57:59 2006
@@ -83,17 +83,17 @@
   /// case switch statements.
   struct CaseBlock {
     CaseBlock(ISD::CondCode cc, Value *cmplhs, Value *cmprhs, 
-              MachineBasicBlock *lhs, MachineBasicBlock *rhs,
-              MachineBasicBlock *me) : 
-    CC(cc), CmpLHS(cmplhs), CmpRHS(cmprhs), LHSBB(lhs), RHSBB(rhs), ThisBB(me){}
+              MachineBasicBlock *truebb, MachineBasicBlock *falsebb,
+              MachineBasicBlock *me)
+      : CC(cc), CmpLHS(cmplhs), CmpRHS(cmprhs),
+        TrueBB(truebb), FalseBB(falsebb), ThisBB(me) {}
     // CC - the condition code to use for the case block's setcc node
     ISD::CondCode CC;
-    // CmpLHS/CmpRHS - The LHS/RHS of the comparison to emit.
+    // CmpLHS/CmpRHS - The LHS/RHS of the comparison to emit.  If CmpRHS is
+    // null, CmpLHS is treated as a bool condition for the branch.
     Value *CmpLHS, *CmpRHS;
-    // LHSBB - the block to branch to if the setcc is true
-    MachineBasicBlock *LHSBB;
-    // RHSBB - the block to branch to if the setcc is false
-    MachineBasicBlock *RHSBB;
+    // TrueBB/FalseBB - the block to branch to if the setcc is true/false.
+    MachineBasicBlock *TrueBB, *FalseBB;
     // ThisBB - the block into which to emit the code for the setcc and branches
     MachineBasicBlock *ThisBB;
   };






More information about the llvm-commits mailing list