diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-21 02:47:59 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-21 02:47:59 +0000 |
| commit | 2ad52176f9ea4274061435045ae45473b57d5d07 (patch) | |
| tree | 7ee9cf7301120ffa5df2c4ef07ae364f6da3fdc0 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 3b4e2a7621efcb9115d3a8f11f56d60f0c78407d (diff) | |
| download | bcm5719-llvm-2ad52176f9ea4274061435045ae45473b57d5d07.tar.gz bcm5719-llvm-2ad52176f9ea4274061435045ae45473b57d5d07.zip | |
Move a bit more state over to the LLVMContext.
llvm-svn: 76533
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 3fa6047ad54..0a7b1051bcb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -1149,7 +1149,7 @@ SelectionDAGLowering::EmitBranchForMergedCondition(Value *Cond, } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, Cond, ConstantInt::getTrue(), + CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getConstantIntTrue(), NULL, TBB, FBB, CurBB); SwitchCases.push_back(CB); } @@ -1304,7 +1304,7 @@ void SelectionDAGLowering::visitBr(BranchInst &I) { } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, CondVal, ConstantInt::getTrue(), + CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getConstantIntTrue(), NULL, Succ0MBB, Succ1MBB, CurMBB); // Use visitSwitchCase to actually insert the fast branch sequence for this // cond branch. @@ -1322,9 +1322,11 @@ void SelectionDAGLowering::visitSwitchCase(CaseBlock &CB) { if (CB.CmpMHS == NULL) { // Fold "(X == true)" to X and "(X == false)" to !X to // handle common cases produced by branch lowering. - if (CB.CmpRHS == ConstantInt::getTrue() && CB.CC == ISD::SETEQ) + if (CB.CmpRHS == DAG.getContext()->getConstantIntTrue() && + CB.CC == ISD::SETEQ) Cond = CondLHS; - else if (CB.CmpRHS == ConstantInt::getFalse() && CB.CC == ISD::SETEQ) { + else if (CB.CmpRHS == DAG.getContext()->getConstantIntFalse() && + CB.CC == ISD::SETEQ) { SDValue True = DAG.getConstant(1, CondLHS.getValueType()); Cond = DAG.getNode(ISD::XOR, dl, CondLHS.getValueType(), CondLHS, True); } else |

