LLVM: include/llvm/Analysis/FloatingPointPredicateUtils.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_ANALYSIS_FLOATINGPOINTPREDICATEUTILS_H
10#define LLVM_ANALYSIS_FLOATINGPOINTPREDICATEUTILS_H
11
15
16namespace llvm {
17
20
21template <>
23FloatingPointPredicateUtils::queryDenormalMode(const Function &F, Value *Val);
24
25template <>
26LLVM_ABI bool FloatingPointPredicateUtils::lookThroughFAbs(const Function &F,
29
30template <>
31LLVM_ABI std::optional
32FloatingPointPredicateUtils::matchConstantFloat(const Function &F, Value *Val);
33
34
35
36
37
38
39
40
41
42inline std::pair<Value *, FPClassTest>
44 Value *RHS, bool LookThroughSrc = true) {
46 LookThroughSrc = true);
47}
48
49
50
51
52
53
54
55
56
57inline std::pair<Value *, FPClassTest>
59 const APFloat *ConstRHS, bool LookThroughSrc = true) {
61 LookThroughSrc);
62}
63
64inline std::tuple<Value *, FPClassTest, FPClassTest>
66 FPClassTest RHSClass, bool LookThroughSrc = true) {
68 LookThroughSrc);
69}
70
71inline std::tuple<Value *, FPClassTest, FPClassTest>
73 const APFloat &ConstRHS, bool LookThroughSrc = true) {
75 LookThroughSrc);
76}
77
78inline std::tuple<Value *, FPClassTest, FPClassTest>
80 Value *RHS, bool LookThroughSrc = true) {
82 LookThroughSrc);
83}
84
85}
86
87#endif
Utilities for dealing with flags related to floating point properties and mode controls.
This file declares a specialization of the GenericSSAContext class template for LLVM IR.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
static std::tuple< ValueRefT, FPClassTest, FPClassTest > fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, FPClassTest RHSClass, bool LookThroughSrc)
static std::pair< ValueRefT, FPClassTest > fcmpToClassTest(FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, ValueRefT RHS, bool LookThroughSrc)
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
std::tuple< Value *, FPClassTest, FPClassTest > fcmpImpliesClass(CmpInst::Predicate Pred, const Function &F, Value *LHS, FPClassTest RHSClass, bool LookThroughSrc=true)
Definition FloatingPointPredicateUtils.h:65
GenericFloatingPointPredicateUtils< SSAContext > FloatingPointPredicateUtils
Definition FloatingPointPredicateUtils.h:18
FPClassTest
Floating-point class tests, supported by 'is_fpclass' intrinsic.
std::pair< Value *, FPClassTest > fcmpToClassTest(FCmpInst::Predicate Pred, const Function &F, Value *LHS, Value *RHS, bool LookThroughSrc=true)
Returns a pair of values, which if passed to llvm.is.fpclass, returns the same result as an fcmp with...
Definition FloatingPointPredicateUtils.h:43
Represent subnormal handling kind for floating point instruction inputs and outputs.