mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -83,17 +83,17 @@ public:
|
||||
/// 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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user