summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGISel.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-27 21:36:01 +0000
committerChris Lattner <sabre@nondot.org>2006-10-27 21:36:01 +0000
commit571e434a34e26f295f13db2dd07551de7e25f8a9 (patch)
tree92693ef8e53a6a7c927158b72bb3fb408844c5b1 /include/llvm/CodeGen/SelectionDAGISel.h
parentd0fffc8f29d1dc5cda549826d555363d942e8da7 (diff)
downloadllvm-571e434a34e26f295f13db2dd07551de7e25f8a9.tar.gz
llvm-571e434a34e26f295f13db2dd07551de7e25f8a9.tar.bz2
llvm-571e434a34e26f295f13db2dd07551de7e25f8a9.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGISel.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 604f6a6b9f..83269ab2d0 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -89,8 +89,7 @@ public:
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 @@ protected:
private:
void SplitCritEdgesForPHIConstants(BasicBlock *BB);
- SDOperand CopyValueToVirtualRegister(SelectionDAGLowering &SDL,
- Value *V, unsigned Reg);
void SelectBasicBlock(BasicBlock *BB, MachineFunction &MF,
FunctionLoweringInfo &FuncInfo);