aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ConstantFolder.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-09 16:44:36 +0000
committerChris Lattner <sabre@nondot.org>2011-02-09 16:44:36 +0000
commit413c3bd9fd820a0969cd0e84124f3a3fadc5cc61 (patch)
tree46c40a94bbdc8d542c8e3bf64083483e6afad9d0 /include/llvm/Support/ConstantFolder.h
parent74f5c5abeafeaabefab470390ce0e7a36754c592 (diff)
enrich folder interfaces around exactness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ConstantFolder.h')
-rw-r--r--include/llvm/Support/ConstantFolder.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/include/llvm/Support/ConstantFolder.h b/include/llvm/Support/ConstantFolder.h
index 93adb3a403..e56d3f6bce 100644
--- a/include/llvm/Support/ConstantFolder.h
+++ b/include/llvm/Support/ConstantFolder.h
@@ -69,17 +69,13 @@ public:
Constant *CreateFMul(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getFMul(LHS, RHS);
}
- Constant *CreateUDiv(Constant *LHS, Constant *RHS) const {
- return ConstantExpr::getUDiv(LHS, RHS);
+ Constant *CreateUDiv(Constant *LHS, Constant *RHS,
+ bool isExact = false) const {
+ return ConstantExpr::getUDiv(LHS, RHS, isExact);
}
- Constant *CreateExactUDiv(Constant *LHS, Constant *RHS) const {
- return ConstantExpr::getExactUDiv(LHS, RHS);
- }
- 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 *CreateSDiv(Constant *LHS, Constant *RHS,
+ bool isExact = false) const {
+ return ConstantExpr::getSDiv(LHS, RHS, isExact);
}
Constant *CreateFDiv(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getFDiv(LHS, RHS);
@@ -96,11 +92,13 @@ public:
Constant *CreateShl(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getShl(LHS, RHS);
}
- Constant *CreateLShr(Constant *LHS, Constant *RHS) const {
- return ConstantExpr::getLShr(LHS, RHS);
+ Constant *CreateLShr(Constant *LHS, Constant *RHS,
+ bool isExact = false) const {
+ return ConstantExpr::getLShr(LHS, RHS, isExact);
}
- Constant *CreateAShr(Constant *LHS, Constant *RHS) const {
- return ConstantExpr::getAShr(LHS, RHS);
+ Constant *CreateAShr(Constant *LHS, Constant *RHS,
+ bool isExact = false) const {
+ return ConstantExpr::getAShr(LHS, RHS, isExact);
}
Constant *CreateAnd(Constant *LHS, Constant *RHS) const {
return ConstantExpr::getAnd(LHS, RHS);