[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGISel.h
Chris Lattner
sabre at nondot.org
Fri Oct 27 14:36:18 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAGISel.h updated: 1.29 -> 1.30
---
Log message:
Turn conditions like x<Y|z==q into multiple blocks.
This compiles Regression/CodeGen/X86/or-branch.ll into:
_foo:
subl $12, %esp
call L_bar$stub
movl 20(%esp), %eax
movl 16(%esp), %ecx
cmpl $5, %eax
jl LBB1_1 #cond_true
LBB1_3: #entry
testl %ecx, %ecx
jne LBB1_2 #UnifiedReturnBlock
LBB1_1: #cond_true
call L_bar$stub
addl $12, %esp
ret
LBB1_2: #UnifiedReturnBlock
addl $12, %esp
ret
instead of:
_foo:
subl $12, %esp
call L_bar$stub
movl 20(%esp), %eax
movl 16(%esp), %ecx
cmpl $4, %eax
setg %al
testl %ecx, %ecx
setne %cl
testb %cl, %al
jne LBB1_2 #UnifiedReturnBlock
LBB1_1: #cond_true
call L_bar$stub
addl $12, %esp
ret
LBB1_2: #UnifiedReturnBlock
addl $12, %esp
ret
And on ppc to:
cmpwi cr0, r29, 5
blt cr0, LBB1_1 ;cond_true
LBB1_3: ;entry
cmplwi cr0, r30, 0
bne cr0, LBB1_2 ;UnifiedReturnBlock
instead of:
cmpwi cr7, r4, 4
mfcr r2
addic r4, r3, -1
subfe r30, r4, r3
rlwinm r29, r2, 30, 31, 31
and r2, r29, r30
cmplwi cr0, r2, 0
bne cr0, LBB1_2 ;UnifiedReturnBlock
---
Diffs of the changes: (+1 -4)
SelectionDAGISel.h | 5 +----
1 files changed, 1 insertion(+), 4 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.29 llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.30
--- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.29 Tue Oct 24 12:57:59 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGISel.h Fri Oct 27 16:36:01 2006
@@ -89,8 +89,7 @@
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. If CmpRHS is
- // null, CmpLHS is treated as a bool condition for the branch.
+ // CmpLHS/CmpRHS - The LHS/RHS of the comparison to emit.
Value *CmpLHS, *CmpRHS;
// TrueBB/FalseBB - the block to branch to if the setcc is true/false.
MachineBasicBlock *TrueBB, *FalseBB;
@@ -128,8 +127,6 @@
private:
void SplitCritEdgesForPHIConstants(BasicBlock *BB);
- SDOperand CopyValueToVirtualRegister(SelectionDAGLowering &SDL,
- Value *V, unsigned Reg);
void SelectBasicBlock(BasicBlock *BB, MachineFunction &MF,
FunctionLoweringInfo &FuncInfo);
More information about the llvm-commits
mailing list