class FunctionLoweringInfo;
class HazardRecognizer;
+ namespace SDISelParamFlags {
+ enum Flags {
+ NoFlagSet = 0,
+ Signed = 1<<0,
+ SignedOffs = 0,
+ InReg = 1<<1,
+ InRegOffs = 1,
+ StructReturn = 1<<2,
+ StructReturnOffs = 2,
+ OrigAlignment = 0x1F<<27,
+ OrigAlignmentOffs = 27
+ };
+ }
+
/// SelectionDAGISel - This is the common base class used for SelectionDAG-based
/// pattern-matching instruction selectors.
class SelectionDAGISel : public FunctionPass {
/// 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.
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;
};
bool CheckOrMask(SDOperand LHS, ConstantSDNode *RHS, int64_t DesiredMaskS);
private:
- void SplitCritEdgesForPHIConstants(BasicBlock *BB);
- SDOperand CopyValueToVirtualRegister(SelectionDAGLowering &SDL,
- Value *V, unsigned Reg);
void SelectBasicBlock(BasicBlock *BB, MachineFunction &MF,
FunctionLoweringInfo &FuncInfo);