summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Analysis/ConstantFolding.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Analysis/ConstantFolding.h')
-rw-r--r--llvm/include/llvm/Analysis/ConstantFolding.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/ConstantFolding.h b/llvm/include/llvm/Analysis/ConstantFolding.h
index 2aa388714c6..9b0e34984d4 100644
--- a/llvm/include/llvm/Analysis/ConstantFolding.h
+++ b/llvm/include/llvm/Analysis/ConstantFolding.h
@@ -23,6 +23,7 @@
namespace llvm {
class APInt;
template <typename T> class ArrayRef;
+class CallSite;
class Constant;
class ConstantExpr;
class ConstantVector;
@@ -125,6 +126,10 @@ bool canConstantFoldCallTo(const Function *F);
/// with the specified arguments, returning null if unsuccessful.
Constant *ConstantFoldCall(Function *F, ArrayRef<Constant *> Operands,
const TargetLibraryInfo *TLI = nullptr);
+
+/// \brief Check whether the given call has no side-effects.
+/// Specifically checks for math routimes which sometimes set errno.
+bool isMathLibCallNoop(CallSite CS, const TargetLibraryInfo *TLI);
}
#endif
OpenPOWER on IntegriCloud