enrich folder interfaces around exactness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2011-02-09 16:44:36 +00:00
parent 74f5c5abea
commit 413c3bd9fd
2 changed files with 20 additions and 28 deletions

View File

@@ -69,17 +69,13 @@ public:
Constant *CreateFMul(Constant *LHS, Constant *RHS) const { Constant *CreateFMul(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getFMul(LHS, RHS); return ConstantExpr::getFMul(LHS, RHS);
} }
Constant *CreateUDiv(Constant *LHS, Constant *RHS) const { Constant *CreateUDiv(Constant *LHS, Constant *RHS,
return ConstantExpr::getUDiv(LHS, RHS); bool isExact = false) const {
return ConstantExpr::getUDiv(LHS, RHS, isExact);
} }
Constant *CreateExactUDiv(Constant *LHS, Constant *RHS) const { Constant *CreateSDiv(Constant *LHS, Constant *RHS,
return ConstantExpr::getExactUDiv(LHS, RHS); bool isExact = false) const {
} return ConstantExpr::getSDiv(LHS, RHS, isExact);
Constant *CreateSDiv(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getSDiv(LHS, RHS);
}
Constant *CreateExactSDiv(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getExactSDiv(LHS, RHS);
} }
Constant *CreateFDiv(Constant *LHS, Constant *RHS) const { Constant *CreateFDiv(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getFDiv(LHS, RHS); return ConstantExpr::getFDiv(LHS, RHS);
@@ -96,11 +92,13 @@ public:
Constant *CreateShl(Constant *LHS, Constant *RHS) const { Constant *CreateShl(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getShl(LHS, RHS); return ConstantExpr::getShl(LHS, RHS);
} }
Constant *CreateLShr(Constant *LHS, Constant *RHS) const { Constant *CreateLShr(Constant *LHS, Constant *RHS,
return ConstantExpr::getLShr(LHS, RHS); bool isExact = false) const {
return ConstantExpr::getLShr(LHS, RHS, isExact);
} }
Constant *CreateAShr(Constant *LHS, Constant *RHS) const { Constant *CreateAShr(Constant *LHS, Constant *RHS,
return ConstantExpr::getAShr(LHS, RHS); bool isExact = false) const {
return ConstantExpr::getAShr(LHS, RHS, isExact);
} }
Constant *CreateAnd(Constant *LHS, Constant *RHS) const { Constant *CreateAnd(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getAnd(LHS, RHS); return ConstantExpr::getAnd(LHS, RHS);

View File

@@ -82,17 +82,11 @@ public:
Constant *CreateFMul(Constant *LHS, Constant *RHS) const { Constant *CreateFMul(Constant *LHS, Constant *RHS) const {
return Fold(ConstantExpr::getFMul(LHS, RHS)); return Fold(ConstantExpr::getFMul(LHS, RHS));
} }
Constant *CreateUDiv(Constant *LHS, Constant *RHS) const { Constant *CreateUDiv(Constant *LHS, Constant *RHS, bool isExact = false)const{
return Fold(ConstantExpr::getUDiv(LHS, RHS)); return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact));
} }
Constant *CreateExactUDiv(Constant *LHS, Constant *RHS) const { Constant *CreateSDiv(Constant *LHS, Constant *RHS, bool isExact = false)const{
return Fold(ConstantExpr::getExactUDiv(LHS, RHS)); return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact));
}
Constant *CreateSDiv(Constant *LHS, Constant *RHS) const {
return Fold(ConstantExpr::getSDiv(LHS, RHS));
}
Constant *CreateExactSDiv(Constant *LHS, Constant *RHS) const {
return Fold(ConstantExpr::getExactSDiv(LHS, RHS));
} }
Constant *CreateFDiv(Constant *LHS, Constant *RHS) const { Constant *CreateFDiv(Constant *LHS, Constant *RHS) const {
return Fold(ConstantExpr::getFDiv(LHS, RHS)); return Fold(ConstantExpr::getFDiv(LHS, RHS));
@@ -109,11 +103,11 @@ public:
Constant *CreateShl(Constant *LHS, Constant *RHS) const { Constant *CreateShl(Constant *LHS, Constant *RHS) const {
return Fold(ConstantExpr::getShl(LHS, RHS)); return Fold(ConstantExpr::getShl(LHS, RHS));
} }
Constant *CreateLShr(Constant *LHS, Constant *RHS) const { Constant *CreateLShr(Constant *LHS, Constant *RHS, bool isExact = false)const{
return Fold(ConstantExpr::getLShr(LHS, RHS)); return Fold(ConstantExpr::getLShr(LHS, RHS, isExact));
} }
Constant *CreateAShr(Constant *LHS, Constant *RHS) const { Constant *CreateAShr(Constant *LHS, Constant *RHS, bool isExact = false)const{
return Fold(ConstantExpr::getAShr(LHS, RHS)); return Fold(ConstantExpr::getAShr(LHS, RHS, isExact));
} }
Constant *CreateAnd(Constant *LHS, Constant *RHS) const { Constant *CreateAnd(Constant *LHS, Constant *RHS) const {
return Fold(ConstantExpr::getAnd(LHS, RHS)); return Fold(ConstantExpr::getAnd(LHS, RHS));