LLVM 20.0.0git
|
#include "llvm/Analysis/ConstraintSystem.h"
Public Member Functions | |
ConstraintSystem () | |
ConstraintSystem (ArrayRef< Value * > FunctionArgs) | |
ConstraintSystem (const DenseMap< Value *, unsigned > &Value2Index) | |
bool | addVariableRow (ArrayRef< int64_t > R) |
DenseMap< Value *, unsigned > & | getValue2Index () |
const DenseMap< Value *, unsigned > & | getValue2Index () const |
bool | addVariableRowFill (ArrayRef< int64_t > R) |
bool | mayHaveSolution () |
Returns true if there may be a solution for the constraints in the system. | |
bool | isConditionImplied (SmallVector< int64_t, 8 > R) const |
SmallVector< int64_t > | getLastConstraint () const |
void | popLastConstraint () |
void | popLastNVariables (unsigned N) |
unsigned | size () const |
Returns the number of rows in the constraint system. | |
void | dump () const |
Print the constraints in the system. | |
Static Public Member Functions | |
static SmallVector< int64_t, 8 > | negate (SmallVector< int64_t, 8 > R) |
static SmallVector< int64_t, 8 > | negateOrEqual (SmallVector< int64_t, 8 > R) |
Multiplies each coefficient in the given vector by -1. | |
static SmallVector< int64_t, 8 > | toStrictLessThan (SmallVector< int64_t, 8 > R) |
Converts the given vector to form a strict less than inequality. | |
Definition at line 22 of file ConstraintSystem.h.
|
inline |
Definition at line 66 of file ConstraintSystem.h.
Definition at line 67 of file ConstraintSystem.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::ArrayRef< T >::size(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size().
|
inline |
Definition at line 73 of file ConstraintSystem.h.
Definition at line 76 of file ConstraintSystem.h.
References llvm::all_of(), assert(), llvm::CallingConv::C, llvm::SmallVectorImpl< T >::emplace_back(), llvm::SmallVectorBase< Size_T >::empty(), llvm::enumerate(), Idx, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by addVariableRowFill().
Definition at line 100 of file ConstraintSystem.h.
References addVariableRow(), llvm::all_of(), and llvm::CallingConv::C.
Referenced by dumpConstraint().
void ConstraintSystem::dump | ( | ) | const |
Print the constraints in the system.
Definition at line 159 of file ConstraintSystem.cpp.
References llvm::dbgs(), LLVM_DEBUG, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by dumpConstraint(), and mayHaveSolution().
|
inline |
Definition at line 148 of file ConstraintSystem.h.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase< Size_T >::empty().
Definition at line 95 of file ConstraintSystem.h.
Definition at line 96 of file ConstraintSystem.h.
bool ConstraintSystem::isConditionImplied | ( | SmallVector< int64_t, 8 > | R | ) | const |
Definition at line 194 of file ConstraintSystem.cpp.
References llvm::all_of(), llvm::CallingConv::C, and negate().
bool ConstraintSystem::mayHaveSolution | ( | ) |
Returns true if there may be a solution for the constraints in the system.
Definition at line 186 of file ConstraintSystem.cpp.
References llvm::dbgs(), dump(), and LLVM_DEBUG.
|
inlinestatic |
Definition at line 113 of file ConstraintSystem.h.
References llvm::AddOverflow(), and negateOrEqual().
Referenced by isConditionImplied().
|
inlinestatic |
Multiplies each coefficient in the given vector by -1.
Does not modify the original vector.
R | The vector of coefficients to be negated. |
Definition at line 126 of file ConstraintSystem.h.
References llvm::CallingConv::C, and llvm::MulOverflow().
Referenced by negate().
|
inline |
Definition at line 156 of file ConstraintSystem.h.
References llvm::SmallVectorTemplateBase< T, bool >::pop_back().
|
inline |
Definition at line 157 of file ConstraintSystem.h.
|
inline |
Returns the number of rows in the constraint system.
Definition at line 163 of file ConstraintSystem.h.
References llvm::SmallVectorBase< Size_T >::size().
|
inlinestatic |
Converts the given vector to form a strict less than inequality.
Does not modify the original vector.
R | The vector of coefficients to be converted. |
Definition at line 138 of file ConstraintSystem.h.
References llvm::SubOverflow().